diff options
| author | Ashwini Reddy <ashred@nvidia.com> | 2023-04-19 11:35:25 -0700 |
|---|---|---|
| committer | Chirag Shah <chirag@nvidia.com> | 2023-05-05 14:37:52 -0700 |
| commit | 5bb87732f62d8dc0d92cad264fce568e5cf12366 (patch) | |
| tree | 25ac8ea129d55c7482ae3c26d313af1fcc5b91b5 /lib/nexthop.c | |
| parent | 4ead6555c9ed47d6e512512b4a1989830be90d94 (diff) | |
zebra: re-install nhg on interface up
Intermittently zebra and kernel are out of sync
when interface flaps and the add's/dels are in
same processing queue and zebra assumes no change in nexthop.
Hence we need to bring in a reinstall to kernel
of the nexthops and routes to sync their states.
Upon interface flap kernel would have deleted NHGs
associated to a interface (the one flapped),
zebra retains NHGs for 3 mins even though upper
layer protocol removes the nexthops (associated NHG).
As part of interface address add ,
re-add singleton NHGs associated to interface.
Ticket: #3173663
Issue: 3173663
Signed-off-by: Ashwini Reddy <ashred@nvidia.com>
Signed-off-by: Chirag Shah <chirag@nvidia.com>
Diffstat (limited to 'lib/nexthop.c')
| -rw-r--r-- | lib/nexthop.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/nexthop.c b/lib/nexthop.c index b04c95c05e..dcbb76b68e 100644 --- a/lib/nexthop.c +++ b/lib/nexthop.c @@ -1076,3 +1076,12 @@ static ssize_t printfrr_nh(struct fbuf *buf, struct printfrr_eargs *ea, } return -1; } + +bool nexthop_is_ifindex_type(const struct nexthop *nh) +{ + if (nh->type == NEXTHOP_TYPE_IFINDEX || + nh->type == NEXTHOP_TYPE_IPV4_IFINDEX || + nh->type == NEXTHOP_TYPE_IPV6_IFINDEX) + return true; + return false; +} |
