Skip to content

Commit

Permalink
zebra: Move nhg reinstallation into if_up proper
Browse files Browse the repository at this point in the history
The function call in to zebra_interface_nhg_reinstall
is an action that takes place on interface up events
*not* when the connected addresses are added to
a system.  this will prevent this function being
called when new connected interfaces come alive
that is an independent operation of the interface
coming up.

Signed-off-by: Donald Sharp <[email protected]>
  • Loading branch information
donaldsharp committed Feb 8, 2024
1 parent fbce923 commit e28162b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 8 additions & 0 deletions zebra/interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,14 @@ void if_up(struct interface *ifp, bool install_connected)
if (install_connected)
if_install_connected(ifp);

/*
* Interface associated NHG's have been deleted on
* interface down events, now that this interface
* is coming back up, let's resync the zebra -> dplane
* nhg's so that they can be continued to be used.
*/
zebra_interface_nhg_reinstall(ifp);

/* Handle interface up for specific types for EVPN. Non-VxLAN interfaces
* are checked to see if (remote) neighbor entries need to be installed
* on them for ARP suppression.
Expand Down
4 changes: 0 additions & 4 deletions zebra/redistribute.c
Original file line number Diff line number Diff line change
Expand Up @@ -605,10 +605,6 @@ void zebra_interface_address_add_update(struct interface *ifp,
client, ifp, ifc);
}
}
/* interface associated NHGs may have been deleted,
* re-sync zebra -> dplane NHGs
*/
zebra_interface_nhg_reinstall(ifp);
}

/* Interface address deletion. */
Expand Down

0 comments on commit e28162b

Please sign in to comment.