pimd: demote a warning to a debug to avoid spamming the logsIf a router/switch keeps sending us a general igmp query with
a flag we don't expect, we shouldn't spam the logs, especially
if the condition is totally harmless and can be just ignored.
Just move it under a debug config.
Sample log firing every 15 seconds:
```
02:10:32 pimd: General IGMP query v3 from 192.168.1.1 on eth0: Suppress Router-Side Processing flag is clear
02:10:47 pimd: General I...
tests: Convert bfd_isis_topo1 and bfd_ospf_topo1 to unified configStart the conversion of some tests to using a unified config for bfd.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
tests: Allow bfdd to be part of the unified config worldThe unified config loader was not properly handling bfdd.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
zebra: Add `show zebra client json` commandAdd the ability to grab data about the `show zebra client`
command as json.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bfdd: Return an error before using negative fd for setsockopt()"sd" is passed to a parameter that cannot be negative for bp_set_ipopts().
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd: Crash due to usage of freed up evpn_overlay attrReason:
Use-after-free in evpn_overlay due to incorrect reference counting when storing
routes in Adj-RIB-In.
1) In bgp_update_receive, we parse the attributes first in bgp_attr_parse_ret
and it will intern those attributes, so refcnt for them would become 0->1. We
can't do evpn_overlay attribute processing here, as it requires NLRI/EVPN
knowledge, which happens via bgp_nlri_parse lat...
bgpd: Notify all incoming/outgoing on peer group notify unconfigThe peer_group_notify_unconfig function was only sending Notification
to either the incoming or outgoing connection, but not both.
If you are in early stages of bringing up a neighbor on both
incoming and outgoing connections. If the cli is changed
that something about a peer group changes the code is only
notifying either incoming or outgoing, but not both. If
we need to reset the connections...
vrrpd: IPv6 VRRP macvlan doesn't have IPv6 link-local addressProblem description:
In some race conditions, vrrp doesnot get newlink update notifications
from zebra.
Fix:
Kernel flags are updated in ifp->flags in all scenarios as per our code
though protodown is set. So when proto is coming up, is_up has already set
when kernel sends UP status even when protodown happened so it is called with
false instead of true. Made code changes accordingly to send t...
tests: Rename bgp_route_map_unused to route_map_check_unusedThis is going to be extended in the future not only for BGP, so let it be more
generic.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd: Double check all connection events are stopped on peer shutdown.We have a address sanitizer issue where a event is directly leaked that
is related to the connection for a peer. At this point I cannot make
the problem happen nor can I come up with a scenario where this is even
possible. But the peer removal code is playing a bit loose with
the connection events. Let's just go through all of them and
ensure that they are all stopped.
Signed-off-by: Donald...
tests: Add a cluster-length testUpon examination of the gcoverage I noticed that there were no tests
that ensure that the cluster-length is working as expected. I've
added this test.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
test: bgp_extcomm_list_delete add regex casecurrently the "delete" operation on "extcommunity-list expanded"
(ie regex selected) case is not tested.
we added a step in bgp_extcomm-list_delete scenario
Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
lib: Set the correct timeout attribute in ppollfd_poll does not honor timer_wait less than 1000usec which causes ppoll
to spin until timer_wait ticks to 0 causing high CPU.
Also, set 1 msec floor to poll() to not let poll() spin as well for
tv_usec < 1000 and > 0.
Also moving timeout related if-else ladder into #else poll compilation
to not hit SA cland dead code warning.
Signed-off-by: Nishant <nshntsharma86@gmail.com>
pbrd: fix memleak during pbr map deletion1. Free memeory pbrms->src, before free is done for pbrms
2. Free lists pbrm->incoming and pbrm->seqnumbers
before pbrm is deleted.
3. Change pbr_map_interface_list_delete to only free up
memory for pbr_map_interface.
pbr_map_interface_list_delete at present, sends the (pbr_map_seq, interface) delete to
zebra and then frees up pbr_map_interface memory.
This zebra update is redu...
bgpd: Track route-map references for srv6 when rmap is usedWhen we have something like:
```
address-family ipv4 unicast
sid export auto route-map test
exit-address-family
```
show route-map-unused never shows that this `test` route-map is used.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
bgpd: EVPN fix memleak in adv type5 rmapFree the route-map from bgp instance deletion,
and decrement reference when free is called from cli
==1239068== 12 bytes in 2 blocks are definitely lost in loss record 1 of
3
==1239068== at 0x48417B4: malloc (vg_replace_malloc.c:381)
==1239068== by 0x4C83999: strdup (strdup.c:42)
==1239068== by 0x49437DC: qstrdup (memory.c:123)
==1239068== by 0x24816F: bgp_evpn_advertise_type5
(bgp...
zebra: EVPN fix show interface vxlan jsonThe VxLAN device can be SVD or non-SVD mode.
TVD: Traditional VxLAN Device where
one VLAN and VNI mapped under the VxLAN device.
SVD: Single VxLAN Device where multiple VLAN and
VNI mappins exists.
The current show interface vxlan-device command displays
only one of the mapping for SVD rather than all mapped
VNI information like it does in non-json output.
The change in json hierarchy is requ...