From 30a3822f2bc1db2fa3fbee8bec42898996ecbb07 Mon Sep 17 00:00:00 2001 From: vivek Date: Thu, 18 Feb 2016 18:47:32 -0800 Subject: Zebra: Restrict automatic RA enable to relevant interfaces When enabling IPv6 Router Advertisements automatically based on the presence of IPv6 address on an interface, do it only for relevant interfaces. Note: This needs a configure option for completion. Ticket: CM-9358 Reviewed By: CCR-4116 Testing Done: Manual verification --- zebra/interface.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'zebra/interface.c') diff --git a/zebra/interface.c b/zebra/interface.c index 051b116b9b..8b25c33f17 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1871,7 +1871,9 @@ 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); + /* Enable RA on this interface */ + if (interface_ipv6_auto_ra_allowed (ifp)) + ipv6_nd_suppress_ra_set (ifp, RA_ENABLE); } /* This address is configured from zebra. */ @@ -1971,8 +1973,11 @@ ipv6_address_uninstall (struct vty *vty, struct interface *ifp, } /* 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); + if (interface_ipv6_auto_ra_allowed (ifp)) + { + 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 -- cgit v1.2.3