diff options
author | hasso <hasso> | 2004-10-03 18:46:08 +0000 |
---|---|---|
committer | hasso <hasso> | 2004-10-03 18:46:08 +0000 |
commit | 4c588a4bee7afa84badd9f21349ba8fc50afd57f (patch) | |
tree | 31646f3b627b1490eda0c994910c8c3af7317cf8 /zebra/connected.c | |
parent | ef0e3c5349349d9e0a6501fd70c8178532227423 (diff) | |
download | quagga-4c588a4bee7afa84badd9f21349ba8fc50afd57f.tar.bz2 quagga-4c588a4bee7afa84badd9f21349ba8fc50afd57f.tar.xz |
New way to handle secondary addresses from Gilad Arnold.
Diffstat (limited to 'zebra/connected.c')
-rw-r--r-- | zebra/connected.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/zebra/connected.c b/zebra/connected.c index 21af3e9c..df0b56a0 100644 --- a/zebra/connected.c +++ b/zebra/connected.c @@ -32,6 +32,7 @@ #include "zebra/zserv.h" #include "zebra/redistribute.h" +#include "zebra/interface.h" /* If same interface address is already exist... */ struct connected * @@ -136,6 +137,8 @@ connected_add_ipv4 (struct interface *ifp, int flags, struct in_addr *addr, /* Update interface address information to protocol daemon. */ if (! CHECK_FLAG (ifc->conf, ZEBRA_IFC_REAL)) { + if_subnet_add (ifp, ifc); + SET_FLAG (ifc->conf, ZEBRA_IFC_REAL); zebra_interface_address_add_update (ifp, ifc); @@ -203,16 +206,15 @@ connected_delete_ipv4 (struct interface *ifp, int flags, struct in_addr *addr, { zebra_interface_address_delete_update (ifp, ifc); + if_subnet_delete (ifp, ifc); + connected_down_ipv4 (ifp, ifc); UNSET_FLAG (ifc->conf, ZEBRA_IFC_REAL); } - if (! CHECK_FLAG (ifc->conf, ZEBRA_IFC_CONFIGURED)) - { - listnode_delete (ifp->connected, ifc); - connected_free (ifc); - } + listnode_delete (ifp->connected, ifc); + connected_free (ifc); } #ifdef HAVE_IPV6 @@ -389,10 +391,7 @@ connected_delete_ipv6 (struct interface *ifp, struct in6_addr *address, UNSET_FLAG (ifc->conf, ZEBRA_IFC_REAL); } - if (! CHECK_FLAG (ifc->conf, ZEBRA_IFC_CONFIGURED)) - { - listnode_delete (ifp->connected, ifc); - connected_free (ifc); - } + listnode_delete (ifp->connected, ifc); + connected_free (ifc); } #endif /* HAVE_IPV6 */ |