CVSROOT:        /cvs
Module name:    src
Changes by:     [email protected] 2026/06/02 02:23:56

Modified files:
        usr.sbin/bgpd  : rde.c rde.h rde_attr.c 

Log message:
Reimplement aspath_merge() in a more cynical fashion

Mergin AS4_PATH into ASPATH can be done a bit simpler by using the fact
that AS4_PATH must be a subset of ASPATH. The resulting path has the same
size and layout as the ASPATH. bgpd inflates the 2-byte ASPATH to 4-byte
representation early on so this simplifies the merge.

When mering the path be strict and any difference in the two paths triggers
a treat-as-withdraw error. Something is off so refuse to work with this path.
This is harsher than RFC 6793 but the concerns then no longer matter.

Use ibuf for all the buffers to have memory safety during this merge operation.

OK tb@

Reply via email to