zebra: fix EVPN MACIP DEL flag mixup in neighbor delete pathOn ZEBRA_MACIP_DEL, zebra_evpn_neigh_send_del_to_client() was passing
ZEBRA_NEIGH_* flags into zebra_evpn_macip_send_msg_to_client(), while
debug output decodes those bits as ZEBRA_MACIP_TYPE_* flags. Because bit
values overlap, DEL logs could incorrectly print "Sticky MAC".
This is a flag-domain mismatch on DEL reporting, not a behavior change in
BGP processing (DEL uses state).
Fix by sendi...
ospfd: Fix setting of typeThere exists a code path where the vertex is already
created but the type has not been set. When
ospf_te_parse_router_lsa is called it was not
updating the type. This caused the test_ospf_te_topo1.py
topotest to fail, because it is looking for a type
but it is not present. Modify the code
to set the type here always.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
pimd: reject truncated IP datagrams before IGMP/mtrace handling- Validate IPv4 total length against recv buffer in pim_igmp_verify_header()
so downstream code cannot trust ip_hdr->ip_len past the bytes we hold (e.g.
mtrace sendto length).
- Drop recvmsg results with MSG_TRUNC in pim_socket_recvfromto() so callers
never process a truncated buffer as a full datagram.
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
pimd: cap PIM Hello secondary address list parsingBound how many encoded unicast addresses we accept from a single
PIM_MSG_OPTION_TYPE_ADDRESS_LIST TLV. The cap is the minimum of
limits derived from interface MTU, TLV length, and PIM_HELLO_SECONDARY_ADDR_MAX.
Reject with cleanup when exceeded to avoid unbounded allocation from
link-local Hellos. Free the temporary address list on parse failure in
pim_hello_recv.
Signed-off-by: Jafar Al-Ghara...
tests: Ensure test_bgp_vpnv4_per_nexthop_label.py actually has a chanceThe test is not actually giving time for the withdrawal to happen,
modify the check for the second prefix to be a run_and_expect
loop as well.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests: Fix some pim tests to account for multipathBoth the test_multicast_pim6_static_rp2.py and test_multicast_pim_uplink_topo1.py
test scripts have multipath available as possible paths that pim
can take. Depending on ordering of how routes are received
in the underlay's protocol's. You can very rarely have
the streams take unexpected paths from the RP towards the
source or from the source towards the RP. Modify the
code base to be a bit ...
tests: Fix verify_upstream_iif error messageThe test is specifying in_interface for the expected value
when the failure is detected, but this just happens to be
the last value in the loop instead of what it was actually
looking for.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests: modify test_pim.py to send more multicast packetsCurrently the send of the multicast stream is 40 * 2ms in length
which is only 80ms. If the underlay has not fully converged we
may never be able to transition to a correct state. Modify
the code to give a bunch more time for sending the multicast
stream.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Merge pull request #21532 from opensourcerouting/fix/bgp_confederation_equal_bgp_externalbgpd: Do not reject the route if confederation AS matches peer AS
lib: fix mgmt_msg recv to deal with mis-alignmentWe need our messages to start on 64 bit boundaries as the message buffer
is accessed directly as structured data. In particular on ARM32 arch
using the data this way lead to unaligned access and SIGBUS.
The minor optimization of reading multiple messages into a single stream
buffer complicated this. Instead we KISS and switch to one message per
stream buffer.
Fixes #20087.
Signed-off-by: Chr...
Merge pull request #21430 from karthikeyav/kmuppalla/upstream-advertisement-delaybgpd: add advertisement-delay to hold route advertisements after startup
Merge pull request #21400 from sougatahitcs/sougatab/_static-route-bfd-admin-down-state-handling-improvementsstatic route bfd admin down state handling improvements
tests: Add BGP-LS BGP-only fabric topotestThe BGP-only fabric draft (draft-ietf-idr-bgp-ls-bgp-only-fabric)
defines advertising topology and reachability via BGP-LS NLRIs.
Add a topotest topology with rr (AS65000) collecting BGP-LS from four
routers (r1-r4) using mixed iBGP/eBGP peerings and link-state AF.
The test verifies baseline Node/Link/Prefix NLRI output against an
expected JSON snapshot, and validates originate/withdraw behav...
bgpd: Add per-neighbor route-map commands under BGP-LS AFEnable per-neighbor route-map configuration under address-family
link-state:
```
router bgp <asn>
address-family link-state link-state
neighbor <peer> route-map <rmap-name>
```
This wires neighbor_route_map_cmd and no_neighbor_route_map_cmd into
BGP_LS_NODE so route-map policy can be applied to BGP-LS neighbors
consistently with other address families.
Signed-off-by: Carmine Scarpitta <cs...
bgpd: Add per-neighbor BGP-LS local/remote link-id CLIsAdd per-neighbor CLI knobs to set BGP-LS link identifiers:
```
router bgp <asn
neighbor <peer> local-link-id <1-4294967295>
neighbor <peer> remote-link-id <1-4294967295>
```
These values let operators control link descriptor identifiers for
BGP-LS Link NLRIs. If distribution is active, changing or removing
either value triggers a withdraw/re-originate cycle so exported
topology stays consis...
bgpd: Add CLI to enable BGP-LS distribution for BGP-only fabricsIntroduce a new router-mode command to control BGP-LS export for
BGP-only fabrics:
```
router bgp 65001
address-family link-state link-state
distribute bgp-fabric-link-state [instance-id WORD]
```
When enabled, bgpd exports the current topology as BGP-LS
Node/Link/Prefix NLRIs. When disabled, bgpd withdraws all NLRIs
originated through this feature. If the instance-id changes while
distrib...
bgpd: Trigger BGP-LS link originate/withdraw on peer state eventsThe BGP-only fabric draft (draft-ietf-idr-bgp-ls-bgp-only-fabric)
defines advertising BGP session topology as BGP-LS Link NLRIs.
When a peer session is established, call bgp_ls_originate_bgp_link()
to originate the corresponding BGP-LS Link NLRI.
When a peer session goes down, call bgp_ls_withdraw_bgp_link()
to withdraw the corresponding BGP-LS Link NLRI.
Signed-off-by: Carmine Scarpitta <cs...
bgpd: Re-export BGP-LS topology on router-id and instance eventsThe BGP-only fabric draft (draft-ietf-idr-bgp-ls-bgp-only-fabric)
defines topology advertisement using BGP-LS Node and Link NLRIs.
When the local router-id changes, withdraw all BGP-LS NLRIs and
re-export topology with the new router-id.
When a BGP instance is created, call bgp_ls_originate_bgp_node()
to originate the corresponding BGP-LS Node NLRI.
Signed-off-by: Carmine Scarpitta <cscarpit...
bgpd: Trigger BGP-LS prefix originate/withdraw on route eventsThe BGP-only fabric draft (draft-ietf-idr-bgp-ls-bgp-only-fabric)
defines advertising unicast prefix reachability as BGP-LS Prefix NLRIs.
When a unicast route is added or updated, call
bgp_ls_originate_bgp_prefix() to originate the corresponding BGP-LS
Prefix NLRI.
When a unicast route is deleted, call
bgp_ls_withdraw_bgp_prefix() to withdraw the corresponding BGP-LS
Prefix NLRI.
Signed-off-...
tests: add topotest for bgp advertisement-delayAdd topotest exercising the advertisement-delay feature with a simple
r1--r2--r3 topology where r2 is the UUT.
Test cases:
- Initial convergence without any delay configured
- show bgp router json / show bgp summary json show configured value
- advertisement-delay in progress: peers Established, pfxSnt=0
- RIB is populated during delay (only advertisements are held)
- delay completes: pfxSnt>0...
doc: add advertisement-delay documentation to bgp user guideDocument the bgp advertisement-delay CLI (global and per-vrf).
Clarify that the delay applies to all AFI/SAFI, re-triggers on
clear ip bgp *, and is unrelated to the per-neighbor
advertisement-interval.
Signed-off-by: Karthikeya Venkat Muppalla <kmuppalla@nvidia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd: Add BGP-LS originate/withdraw functions for BGP-only fabricAdd functions to originate and withdraw BGP-LS NLRIs representing the
local BGP topology for BGP-only fabrics, per
draft-ietf-idr-bgp-ls-bgp-only-fabric:
- bgp_ls_originate_bgp_node(): originate a Node NLRI for the local
BGP router.
- bgp_ls_originate_bgp_link(): originate a Link NLRI for a BGP
session to a peer.
- bgp_ls_originate_bgp_prefix(): originate a Prefix NLRI for a BGP
unicast ...
bgpd: Add BGP Route Type TLV support to BGP-LS prefix descriptorImplement support for BGP Route Type TLV in BGP-LS prefix descriptors as
specified in draft-ietf-idr-bgp-ls-bgp-only-fabric. This includes:
- Encoding/decoding of BGP Route Type TLV (1 byte value)
- Support for 5 route type values: Local, Attached, External/Internal BGP, Redistributed
- Hash key generation and descriptor comparison
- Display and JSON output formatting
Signed-off-by: Carmine Sc...
bgpd: Add BGP Router-ID (TLV 516) support to BGP-LS node descriptorAdd full support for the BGP Router-ID sub-TLV (TLV 516) in BGP-LS
node descriptors, as required by
draft-ietf-idr-bgp-ls-bgp-only-fabric.
- Define TLV 516 constant, bit flag, size macro, and add
bgp_router_id field to struct bgp_ls_node_descriptor
- Encode and decode BGP Router-ID TLV with length validation
- Relax NLRI validation to accept BGP Router-ID in place of
IGP Router-ID for Node...
tests: Update pytestmark value in scriptsNoticed while examining a test today that the pytest marks were
not 100% correct. Wrote a script that compared what was loaded
via configuration -vs- what the pytestmark values where, then
I adjusted all the pytestmark values to be more accurate. There
still might be a few that are `wrong` but we are much closer now.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgpd: add advertisement-delay to hold route advertisements after startupAdd advertisement-delay CLI and logic that holds route advertisements to
peers for a configured number of seconds after the first peer reaches
Established state.
- Global: bgp advertisement-delay (1-3600)
- Per-instance: advertisement-delay (1-3600)
- With update-delay: both timers start at T0 (first peer Established).
Advertisements released at max(time_FIB_ready, T0 + A).
- Without update-...