bgpd: fix aggregate->count undercount when dampening is clearedbgp_damp_info_clean() calls bgp_aggregate_increment() while the path
still carries BGP_PATH_DAMPED (and BGP_PATH_HISTORY), so the increment
is skipped because BGP_PATH_HOLDDOWN() is true. bgp_damp_info_free()
then clears those flags, leaving the route active in the RIB with no
HOLDDOWN. When the route is later deleted, bgp_aggregate_decrement()
proceeds normally, driving count one below where...
bgpd: Prevent assert on shutdown in evpn setupI am seeing this crash on shutdown:
(gdb) bt
0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:44
1 __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
2 __GI___pthread_kill (threadid=<optimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
3 0x000073b03f64527e in __GI_raise (sig=6) at ../sysd...
bgpd: Define a maximum number of TLVs for ENCAP attributeAdding just a guard against the memory going crazy (too much malloc()s) with
legitimate TLVs, but sort of "malformed"/crafted packet.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd: Replace assert() with a boundary check conditionJust to avoid randomly killing bgpd daemon with a malformed packet.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd: dynamic neighbors not up with md5 in non default vrfIssue:
When non default vrf, bgp instance and peer group with dynamic neighbors
and md5 config are configured together, bgp peer config happens first.
But bgp vrf enable notification is received later.
BGP listerner socket get created now, but the md5 password is not set on
listening FD. Due to this tcp session not getting established.
Fix: walk through the bgp peer group listening socket rang...
pimd: Provide better ordering for calling pim_upstream_use_rptIn pim_upstream_new, call pim_upstream_use_rpt after the rpf_update
as that pim_upstream_use_rpt can make a decision about what is
done based upon rpf changes. This aligns the two together.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
pimd: fix crash in JP agg list due to stale upstream entryWhen pim_upstream_rpf_clear() nulls the RPF interface, it does not
remove the upstream from the old RPF neighbor's JP aggregation list.
This leaves a stale entry that becomes a dangling pointer after the
upstream is eventually freed. When the neighbor's JP timer fires and
iterates the list, it dereferences the freed upstream causing a
SIGSEGV.
Fix by finding the RPF neighbor and removing the u...
tests: add tests for info msgs on config applyAdd a YANG test module with config, conditionally load it and add CLI
commands to set. Add a test which covers both the classic CLI path as
well as the EDIT config path.
Signed-off-by: Christian Hopps <chopps@labn.net>
mgmtd: allow info msg on successful config applyAllow for return of informational messages from backend NB callbacks
back to the frontend on successful commits. Backend clients can now send
any errmsg set during the APPLY phase in the CFG_APPLY_REPLY variable
data. mgmtd collects messages from all backends and forwards the result
to the frontend in the COMMIT_REPLY message. The vty frontend will now
displays them as well.
Signed-off-by: Chr...
bgpd: move auto config flag from bgp to srv6 unicast policyMove SID allocation auto mode on bgp to srv6 unicast policy. This is a
better fit and rename to SRV6_POLICY_FLAG_SID_AUTO.
Signed-off-by: Loïc Sang <loic.sang@6wind.com>
zebra: Fix incorrect update of 'nhe_received' in route_entry_update_nhe()The variable 'nhe_received' stores the NHG received from the upper-level
protocol. It should not be unconditionally overwritten during route
processing, as doing so loses the original NHG.
In route_entry_update_nhe(), replace the unconditional update of
nhe_received with a conditional one: only clear nhe_received (and
decrement its ref) when it points to the same NHG as nhe, which
is being rep...
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...