summaryrefslogtreecommitdiff
path: root/zebra/rtadv.h
diff options
context:
space:
mode:
authorvivek <vivek@cumulusnetworks.com>2016-05-02 13:53:38 -0700
committervivek <vivek@cumulusnetworks.com>2016-05-02 13:53:38 -0700
commit4a04e5f7968d46e446bdb530724da18b90b7f5f8 (patch)
tree2fe905811f344992b24d54fc6a81d4ec6ef40567 /zebra/rtadv.h
parent6f16f5a01976f16ee0676b2435fc24382bcc29e9 (diff)
BGP: Trigger IPv6 router advertisements upon config of unnumbered neighbor
Instead of turning on IPv6 RA on every interface as soon as it has an IPv6 address, only enable it upon configuration of BGP neighbor. When the BGP neighbor is deleted, signal that RAs can be turned off. To support this, introduce new message interaction between BGP and Zebra. Also, take appropriate actions in BGP upon interface add/del since the unnumbered neighbor could exist prior to interface creation etc. Only unnumbered IPv6 neighbors require RA, the /30 or /31 based neighbors don't. However, to keep the interaction simple and not have to deal with too many dynamic conditions (e.g., address deletes or neighbor change to/from 'v6only'), RAs on the interface are triggered upon any unnumbered neighbor configuration. BGP-triggered RAs will cause RAs to be initiated on the interface; however, if BGP asks that RAs be stopped (upon delete of unnumbered neighbor), RAs will continue to be exchanged if the operator has explicitly enabled. Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Ticket: CM-10640 Reviewed By: CCR-4589 Testing Done: Various manual and automated (refer to defect)
Diffstat (limited to 'zebra/rtadv.h')
-rw-r--r--zebra/rtadv.h22
1 files changed, 2 insertions, 20 deletions
diff --git a/zebra/rtadv.h b/zebra/rtadv.h
index a3ea425931..3011505dbc 100644
--- a/zebra/rtadv.h
+++ b/zebra/rtadv.h
@@ -108,26 +108,8 @@ typedef enum {
extern void rtadv_init (struct zebra_ns *);
extern void rtadv_terminate (struct zebra_ns *);
extern void rtadv_cmd_init (void);
-extern void ipv6_nd_suppress_ra_set (struct interface *ifp, ipv6_nd_suppress_ra_status status);
+extern void zebra_interface_radv_set (struct zserv *client, int sock, u_short length,
+ struct zebra_vrf *zvrf, int enable);
-/* Can we turn on IPv6 RAs automatically on this interface? */
-static inline int
-interface_ipv6_auto_ra_allowed (struct interface *ifp)
-{
-#if defined (HAVE_RTADV)
- if (if_is_loopback (ifp) ||
- CHECK_FLAG(ifp->status, ZEBRA_INTERFACE_VRF_LOOPBACK))
- return 0;
-#if defined (HAVE_CUMULUS)
- if ((strncmp (ifp->name, "eth", strlen("eth")) == 0) ||
- (strncmp (ifp->name, "switch", strlen("switch")) == 0))
- return 0;
-#endif
- return 1;
-#else
- return 0;
-#endif
-}
-
#endif /* _ZEBRA_RTADV_H */