diff options
| author | Don Slice <dslice@cumulusnetworks.com> | 2020-02-10 18:58:41 +0000 | 
|---|---|---|
| committer | Don Slice <dslice@cumulusnetworks.com> | 2020-02-14 17:03:16 +0000 | 
| commit | 2a85576310187cd6f4e43849e028faed986b551b (patch) | |
| tree | f765ee40de1685a4325e74c973e1bcc87704db0a /zebra/connected.c | |
| parent | 547b989938068d9be646a79c60f87296fdba3558 (diff) | |
zebra: add all ipv6 global addresses to RA messages
RFC 4861 states that ipv6 RA messages sent out an interface should
contain all global ipv6 addresses on that interface. This fix adds
that capability.  To override the default flags and timer settings
for a particular prefix, the existing "ipv6 nd prefix ..." command
should be used via vtysh under the appropriate interface.
Ticket: CM-20363
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Diffstat (limited to 'zebra/connected.c')
| -rw-r--r-- | zebra/connected.c | 8 | 
1 files changed, 8 insertions, 0 deletions
diff --git a/zebra/connected.c b/zebra/connected.c index 0ff474d787..0ee41afa8f 100644 --- a/zebra/connected.c +++ b/zebra/connected.c @@ -490,6 +490,10 @@ void connected_add_ipv6(struct interface *ifp, int flags, struct in6_addr *addr,  	p->prefixlen = prefixlen;  	ifc->address = (struct prefix *)p; +	/* Add global ipv6 address to the RA prefix list */ +	if (!IN6_IS_ADDR_LINKLOCAL(&p->prefix)) +		rtadv_add_prefix(ifp->info, p); +  	if (dest) {  		p = prefix_ipv6_new();  		p->family = AF_INET6; @@ -533,6 +537,10 @@ void connected_delete_ipv6(struct interface *ifp, struct in6_addr *address,  	memcpy(&p.u.prefix6, address, sizeof(struct in6_addr));  	p.prefixlen = prefixlen; +	/* Delete global ipv6 address from RA prefix list */ +	if (!IN6_IS_ADDR_LINKLOCAL(&p.u.prefix6)) +		rtadv_delete_prefix(ifp->info, &p); +  	if (dest) {  		memset(&d, 0, sizeof(struct prefix));  		d.family = AF_INET6;  | 
