This is an extension to graceful restart and requires graceful restart to
be enabled to work. The NOTIFICATION bits are implemented as specified but
a much more strict stand was taken as to when send a graceful reset.
bgpd only sends graceful notifications for a few cease cases (same as in
the RFC) and for the holdtimer and sendholdtimer errors. Everything else
is a hard error because the other side is not trustworthy.
OK tb@
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@
prefixes to the update / withdraw queue if the peer is up.
For updates the Adj-RIB-Out is already updated and nothing more needs to happen.
For withdraws the prefix is unlinked and needs to be destroyed if the peer is
not up. For this to work correctly make the prefix as dead.
Right now this is a no-op since the functions are only called if the peer
is up.
OK tb@
and is stopped when the session comes up (ESTABLISHED state).
Right now it is used to remove cloned sessions. For that the SessionDownTimer
is also started when a clone is created.
OK tb@
The pointer passed to pt_writebuf() is bad and there is no reason to limp
further. Someone else will trip over this at a later stage so better to
do it now.
OK tb@
Rename the upcall and done callbacks:
- rde_up_adjout_force_upcall() to peer_blast_upcall() and same for done
- rde_up_dump_upcall() to peer_dump_upcall() and same for done
Introduce peer_blast() which blasts out the Adj-RIB-Out including all
the route refresh messages (BEGIN_RR, EOR and END_RR) needed.
peer_dump() now always throttles the peer before starting the table walk to
fill the Adj-RIB-Out and calls peer_blast() in all cases (either directly or
via the peer_dump_done() call.
OK tb@
This extends the maximum message size of BGP from 4096 to 65535.
This mostly follows rfc8654 with the following differences:
- NOTIFICATIONS are always truncated to fit in 4096 bytes.
- There is no message reduction using "attribute discard" in case of overflow.
- Large messages are only sent if both sides announced extended message support.
OK tb@
Adj-RIB-Out and in that case set F_CTL_ADJ_OUT on the request.
With this 'bgpctl show rib out' and 'bgpctl show rib table Adj-RIB-Out'
return the same results.
OK tb@
The tricky bit here is the fact that the peer wbuf needs to be allocated
and freed in the right places (when a peer is setup and when it is freed).
During lifetime we just flush the msgbuf with msgbuf_clear().
mrt has a similar issue. I think that freeing the msgbuf in mrt_clean is right.
OK tb@
Single out the auth_config yacc rules. Even though this requires an
extra merge_auth_conf() function to handle manual IPsec setups but
even with that this seems like a net gain.
There is no rtr cache that does tcp md5 on OpenBSD so those bits remain
untested for now.
OK tb@
Instead use struct auth_config and struct auth_state in the pfkey calls
and those tcp_md5 calls where it matters.
This is preparation work to allow RTR to use TCP MD5 as well.
OK tb@