CVSROOT: /cvs
Module name: src
Changes by: [email protected] 2024/12/12 13:19:03
Modified files:
usr.sbin/bgpd : bgpd.h rde.c rde.h rde_peer.c rde_rib.c
session.c session.h
Log message:
Cache the Adj-RIB-Out for sessions that have not been down for more than
INTERVAL_SESSION_DOWN (3600) seconds.
Rebuilding the Adj-RIB-Out is a lot of work while keeping the RIB in sync
is reasonably trivial. So avoid the work for the case that a session
was just quickly reset. This only works if the same peer settings are
used in the old and new session.
For this introduce a IMSG_SESSION_DELETE that tells the RDE to remove the
peer and split peer_down into a part that takes the session down (and
clears the Adj-RIB-In) and a part the frees the peer (peer_delete).
The SE now sends an IMSG_SESSION_ADD command on first connect and skips
that imsg on later connects unless IMSG_SESSION_DELETE was called before.
During config reload the IMSG_SESSION_ADD calls only need to happen when
the RDE actually has that information.
OK tb@