diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-12-08 15:26:56 -0800 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2015-12-08 15:26:56 -0800 |
| commit | ef16372d77e3822c13f23370e55a280b784aeef2 (patch) | |
| tree | ff113dc4e0766fc8e497f33559c4b5c5ebf8e6f4 /zebra/interface.c | |
| parent | a565fbdd91d21ed8cc2f7ecc29033acfce35b1dc (diff) | |
| parent | 2bf26d4184cd6b6fdea42629725cd2005f8bef47 (diff) | |
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Diffstat (limited to 'zebra/interface.c')
| -rw-r--r-- | zebra/interface.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index bd1e404d23..2768e69a6d 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1730,6 +1730,8 @@ ipv6_address_install (struct vty *vty, struct interface *ifp, /* Add to linked list. */ listnode_add (ifp->connected, ifc); + + ipv6_nd_suppress_ra_set (ifp, RA_ENABLE); } /* This address is configured from zebra. */ @@ -1765,6 +1767,20 @@ ipv6_address_install (struct vty *vty, struct interface *ifp, return CMD_SUCCESS; } +/* Return true if an ipv6 address is configured on ifp */ +int +ipv6_address_configured (struct interface *ifp) +{ + struct connected *connected; + struct listnode *node; + + for (ALL_LIST_ELEMENTS_RO (ifp->connected, node, connected)) + if (CHECK_FLAG (connected->conf, ZEBRA_IFC_REAL) && (connected->address->family == AF_INET6)) + return 1; + + return 0; +} + static int ipv6_address_uninstall (struct vty *vty, struct interface *ifp, const char *addr_str, const char *peer_str, @@ -1814,6 +1830,10 @@ ipv6_address_uninstall (struct vty *vty, struct interface *ifp, return CMD_WARNING; } + /* Enable RA suppression if there are no IPv6 addresses on this interface */ + if (! ipv6_address_configured(ifp)) + ipv6_nd_suppress_ra_set (ifp, RA_SUPPRESS); + UNSET_FLAG (ifc->conf, ZEBRA_IFC_QUEUED); /* This information will be propagated to the zclients when the * kernel notification is received. */ |
