diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2023-08-21 15:37:32 -0400 | 
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-08-21 15:49:09 -0400 | 
| commit | c937582491565d84e40bbd34a9371a3839a0a646 (patch) | |
| tree | 045a575b00530a32679bda502f1fd60592db3c24 /zebra/interface.c | |
| parent | 451fb24b17cb9272981d3809f755985d9ce52f79 (diff) | |
zebra: Prevent protodown_rc from going Bzonkas
The code that handles the protodown_rc setting for
VRRP interfaces in zebra is sending a interface
to be set into a protodown state *before* the
interface has been learned by the kernel.  Resulting
in crashes when the data plane sends the ctx back
to us saying hey man you are uncool.
Additionally change the protodown code to refuse
to send any protodown_rc codes *until* the interface
has actually been learned about from the kernel.
Ticket: 3582375
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/interface.c')
| -rw-r--r-- | zebra/interface.c | 6 | 
1 files changed, 6 insertions, 0 deletions
diff --git a/zebra/interface.c b/zebra/interface.c index 90787f3aa0..9ca330571f 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -1195,6 +1195,12 @@ static bool if_ignore_set_protodown(const struct interface *ifp, bool new_down,  	zif = ifp->info; +	/* +	 * FRR does not have enough data to make this request +	 */ +	if (ifp->ifindex == IFINDEX_INTERNAL) +		return true; +  	/* Current state as we know it */  	old_down = !!(ZEBRA_IF_IS_PROTODOWN(zif));  	old_set_down = !!CHECK_FLAG(zif->flags, ZIF_FLAG_SET_PROTODOWN);  | 
