Skip to content

Commit

Permalink
isisd, ospf6d, ripngd: Do not allow v6 LL's to be redist connected in
Browse files Browse the repository at this point in the history
The rib process of handling routes has been unified a bit more
and as a result v6 LL routes are now showing up as a result
of a `redistribute connected`.  Doing anything with these
routes is a policy decision that should be enforced by the
individual routing daemons not by zebra.  As such add a bit
of code to isisd, ripngd and opsf6d to handle them.  The bgp daemon
already handles this situation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
  • Loading branch information
donaldsharp committed Mar 27, 2019
1 parent 906b54d commit 9fb2b87
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions isisd/isis_zebra.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ static int isis_zebra_read(int command, struct zclient *zclient,
if (zapi_route_decode(zclient->ibuf, &api) < 0)
return -1;

if (api.prefix.family == AF_INET6
&& IN6_IS_ADDR_LINKLOCAL(&api.prefix.u.prefix6))
return 0;

/*
* Avoid advertising a false default reachability. (A default
* route installed by IS-IS gets redistributed from zebra back
Expand Down
3 changes: 3 additions & 0 deletions ospf6d/ospf6_zebra.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ static int ospf6_zebra_read_route(int command, struct zclient *zclient,
if (CHECK_FLAG(api.message, ZAPI_MESSAGE_SRCPFX))
return 0;

if (IN6_IS_ADDR_LINKLOCAL(&api.prefix.u.prefix6))
return 0;

ifindex = api.nexthops[0].ifindex;
nexthop = &api.nexthops[0].gate.ipv6;

Expand Down
3 changes: 3 additions & 0 deletions ripngd/ripng_zebra.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ static int ripng_zebra_read_route(int command, struct zclient *zclient,
if (CHECK_FLAG(api.message, ZAPI_MESSAGE_SRCPFX))
return 0;

if (IN6_IS_ADDR_LINKLOCAL(&api.prefix.u.prefix6))
return 0;

nexthop = api.nexthops[0].gate.ipv6;
ifindex = api.nexthops[0].ifindex;

Expand Down

0 comments on commit 9fb2b87

Please sign in to comment.