I rewrote the interface handling code, so that it supports multiple
addresses per interface (needed for example for IPv6 support). Visible changes: o struct iface now contains a list of all interface addresses (represented by struct ifa), iface->addr points to the primary address (if any). o Interface has IF_UP set iff it's up and it has a primary address. o IF_UP is now independent on IF_IGNORED (i.e., you need to test IF_IGNORED in the protocols; I've added this, but please check). o The if_notify_change hook has been simplified (only one interface pointer etc.). o Introduced a ifa_notify_change hook. (For now, only the Direct protocol does use it -- it's wise to just listen to device routes in all other protocols.) o Removed IF_CHANGE_FLAGS notifier flag (it was meaningless anyway). o Updated all the code except netlink (I'll look at it tomorrow) to match the new semantics (please look at your code to ensure I did it right). Things to fix: o Netlink. o Make krt-iface interpret "eth0:1"-type aliases as secondary addresses.
Showing
- TODO 2 additions, 0 deletionsTODO
- nest/iface.c 247 additions, 86 deletionsnest/iface.c
- nest/iface.h 37 additions, 16 deletionsnest/iface.h
- nest/protocol.h 4 additions, 1 deletionnest/protocol.h
- nest/rt-dev.c 11 additions, 12 deletionsnest/rt-dev.c
- proto/ospf/ospf.c 11 additions, 11 deletionsproto/ospf/ospf.c
- proto/rip/rip.c 11 additions, 9 deletionsproto/rip/rip.c
- proto/static/static.c 4 additions, 4 deletionsproto/static/static.c
- sysdep/linux/netlink/netlink.c 7 additions, 3 deletionssysdep/linux/netlink/netlink.c
- sysdep/unix/io.c 4 additions, 4 deletionssysdep/unix/io.c
- sysdep/unix/krt-iface.c 26 additions, 18 deletionssysdep/unix/krt-iface.c
Loading
Please register or sign in to comment