Commit Graph

29152 Commits

Author SHA1 Message Date
Christian Hopps
1623dc4c9c tests: check memleaks end of module and ignore daemonizing parent
- ignore parent from daemonize valgrind files these allocations will be
checked in the child.
- check for memleaks at end of module/file not just after tests.

Signed-off-by: Christian Hopps <chopps@labn.net>
2022-07-14 13:16:01 -04:00
Christian Hopps
11c9ab3202
zebra: free neighbor state before exit to avoid memleaks
Signed-off-by: Christian Hopps <chopps@labn.net>
2022-07-14 12:20:01 -04:00
Chromico Rek
3aaf96aafb topotests: Remove typo on IP
Signed-off-by: Nathan Mangar <nathan@thundergear.io>

topotests: Remove static route

Signed-off-by: Nathan Mangar <nathan@thundergear.io>
2022-07-14 19:07:48 +04:00
Francois Dumontet
5dde29654e bmp: add L3VPN support
Support for BMP L3VPN monitoring messages through SAFI_MPLS_VPN address
family.

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
2022-07-13 17:28:37 +02:00
David Lamparter
1004137bf3
Merge pull request #11598 from patrasar/pim_get_instance 2022-07-13 16:54:39 +02:00
David Lamparter
c9aa57dcf1
Merge pull request #11585 from patrasar/sg_str 2022-07-13 16:51:10 +02:00
David Lamparter
69de2a1c88
Merge pull request #11593 from mobash-rasool/fixes 2022-07-13 16:49:27 +02:00
mobash-rasool
9d8dc1b901
Merge pull request #11597 from opensourcerouting/pimd-packed-member
pimd: fix unaligned accesses
2022-07-13 17:29:30 +05:30
Mobashshera Rasool
c6c615c12b pimd,pim6d: Set RP to true if the address matches, ignore prefix-length
The API pim_rp_check_interface_addrs checks if the RP address matches
with the primary address then it returns true.
In case of PIMv4 this condition is true, therefore the router becomes RP.
But in case of PIMv6, this condition does not pass because primary address
for PIMv6 is link-local address.

Also PIMv4 allows secondary addresses to be used as RP
if it is a host route in case primary does not match.

Fixing it by only checking the configured
RP address with the interface address and ignoring the prefix
length since it does not matter.

Fixes: #11335

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-07-12 22:51:27 -07:00
mobash-rasool
b343e3a00c
Merge pull request #11576 from anlancs/fix/minor-5
zebra: remove redundant flags assignment
2022-07-13 09:42:07 +05:30
anlan_cs
9faf4e426c zebra: remove redundant flags assignment
The assignment of neigh flags on ES peers is set twice. Just clean it.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-07-12 14:18:18 -04:00
Donatas Abraitis
4c316f2b00
Merge pull request #11566 from louis-6wind/rename-mplsvpn
bgpd: rename "struct bgp" variables in mplsvpn and cleanup
2022-07-12 19:09:32 +03:00
Jafar Al-Gharaibeh
cbf73b0272
Merge pull request #11572 from opensourcerouting/fix/avoid_double_quotes_when_cat
tools: Do not wrap the pidfile into double-quotes for frrcommon.sh
2022-07-12 09:55:23 -06:00
Mark Stapp
b33396cb75
Merge pull request #11461 from mobash-rasool/pimv6-enable
pim6d: Enable/disable pim6d daemons on different platforms based on flags
2022-07-12 11:44:29 -04:00
David Lamparter
8cb56fb273
Merge pull request #11285 from iqras23/conditional_def_orig 2022-07-12 17:41:09 +02:00
Russ White
455b860f9d
Merge pull request #11577 from opensourcerouting/fix/memory_leak_bgp_gr_notification
bgpd: Free ->raw_data from Hard Notification message after we use it
2022-07-12 10:23:01 -04:00
Sarita Patra
db79e6ba84 pimd: Remove pim_get_pim_instance defination in pim_cmd_common.h
Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-07-12 06:09:06 -07:00
Sarita Patra
af9c8e7666 pimd: Avoid unnecessary vrf lookup
In several places, we are getting the vrf structure using
vrf_lookup_by_name(). Again we are passing vrf->vrf_id to
pim_get_pim_instance() to get the pim_instance.

The API pim_get_pim_instance() again get the VRF structure using
vrf_lookup_by_id(). This is avoided in this PR.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-07-12 06:09:04 -07:00
Sarita Patra
4d69e1ca61 pim6d: Longest possible length of a (S,G) string is 94 bytes
Longest possible length of a IPV6 (S,G) string is 94 bytes
INET6_ADDRSTRLEN * 2 = 46 * 2
(,) = 1
NULL Character at end = 1

Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-07-12 04:46:57 -07:00
Sarita Patra
9deed2ad77 pimd: Fix description for PIM_SG_LEN
Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-07-12 04:46:56 -07:00
David Lamparter
554350c87a
Merge pull request #11580 from patrasar/remove_pim_addr.h
pimd: removal double inclusion of pim_addr.h
2022-07-12 12:55:42 +02:00
David Lamparter
cefb7247f0 pimd: fix unaligned accesses
These are in packed structs at weird offsets (e.g. 2 bytes), and as such
need a memcpy to get them into proper alignment.

It'd be even better if the pimd code used proper de/serialization, but
let's get this improved one step at a time.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-07-12 12:48:04 +02:00
Jafar Al-Gharaibeh
a770da1b1c
Merge pull request #11588 from opensourcerouting/fix/babeld_missing_routes
babeld: Install route to RIB if parse_update_subtlv() is false
2022-07-12 00:15:47 -06:00
Donatas Abraitis
d5260dc123 babeld: Install route to RIB if parse_update_subtlv() is false
We installed the route only if the type was SUBTLV_MANDATORY.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-07-11 20:36:25 +03:00
Donatas Abraitis
1cd5f86b1f
Merge pull request #11583 from mobash-rasool/fixes
pimd: Correct the order of show json for interface traffic
2022-07-11 19:40:06 +03:00
Louis Scalbert
b3e97f087a bgpd: fix wrong nexthop bgp struct for nexthop validation
The bgp_nexthop must be the source bgp structure. It cannot be the
destination bgp one.

Use bgp_orig source bgp struct by default.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-07-11 16:08:37 +02:00
Louis Scalbert
02212dee26 bgpd: rename "struct bgp" variables in mplsvpn
The "struct bgp" variable names in the mplsvpn bgp code do not
explicitly say whether they refer to a source or destination BGP
instance. Some variable declarations are commented out with "from" and
"to" but this does not avoid confusion within the functions. The names
of "struct bgp" variables are reused in different functions but their
names sometimes refer to a source instance and sometimes to a
destination instance.

Rename the "struct bgp" variable names to from_bgp and to_bgp.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-07-11 16:08:37 +02:00
Louis Scalbert
88ef29918c bgpd: remove duplicated arg in leak_update
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-07-11 16:08:33 +02:00
Sarita Patra
9362da2dff pimd: removal double inclusion of pim_addr.h
Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-07-11 04:51:03 -07:00
Donatas Abraitis
9dedc9eb37 tools: Do not wrap the pidfile into double-quotes for frrcommon.sh
The problem is that when we run watchfrr.sh/frrinit.sh, we get something like:

```
cat: '"/var/run/frr/staticd.pid"': No such file or directory
cat: '"/var/run/frr/babeld.pid"': No such file or directory
cat: '"/var/run/frr/zebra.pid"': No such file or directory
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-07-11 14:47:09 +03:00
Donatas Abraitis
c73d236383 bgpd: Free ->raw_data from Hard Notification message after we use it
==175785== 0 bytes in 1 blocks are definitely lost in loss record 1 of 88
==175785==    at 0x483DD99: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==175785==    by 0x492EB8E: qcalloc (in /usr/local/lib/libfrr.so.0.0.0)
==175785==    by 0x269823: bgp_notify_decapsulate_hard_reset (in /usr/lib/frr/bgpd)
==175785==    by 0x26C85D: bgp_notify_receive (in /usr/lib/frr/bgpd)
==175785==    by 0x26E94E: bgp_process_packet (in /usr/lib/frr/bgpd)
==175785==    by 0x4985349: thread_call (in /usr/local/lib/libfrr.so.0.0.0)
==175785==    by 0x491D521: frr_run (in /usr/local/lib/libfrr.so.0.0.0)
==175785==    by 0x1EBEE8: main (in /usr/lib/frr/bgpd)
==175785==

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-07-11 14:46:46 +03:00
Mobashshera Rasool
e638968324 pimd: Correct the order of show json for interface traffic
"show ip pim interface traffic json" shows pruneTx first and then
pruneRx stats
where as
"show ip pim interface <ifname> json" shows pruneRx first and then
pruneTx stats.

Although the values are right but the display looks odd.

Making it same as other stats, first display Rx and then Tx.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-07-11 04:37:46 -07:00
Mark Stapp
3fb4bef537
Merge pull request #11579 from opensourcerouting/fix/revert_isis_fast_reroute
isisd: Revert fast-reroute recent changes
2022-07-11 07:37:00 -04:00
Kuldeep Kashyap
a7bccdc582 tests: Fix multicast_pim_bsm_topo2 static route issue
API to verify static route was checking whether
router is installed with expected nexthop. In
this particular scenario we has same route as
Connected and Static both. In heavy loaded
system static routes was taking time to get
installed and API was doing the verification
on Connected route instead Static route.
Enhanced scripts to check only static routes.

Issue: https://github.com/FRRouting/frr/issues/11563

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-07-10 22:18:50 -07:00
Donatas Abraitis
d8bebc08aa Revert "isisd: apply fast-reroute on an adjacency failure"
This reverts commit 7125297323.
2022-07-10 21:41:25 +03:00
Donatas Abraitis
96d1200e3e Revert "isisd: remove previous labels before fast-reroute"
This reverts commit a254fa54e3.
2022-07-10 21:41:21 +03:00
Donatas Abraitis
74b95643d7 Revert "isisd: allow nexthop lookup on interface only"
This reverts commit a11742dc53.
2022-07-10 21:41:17 +03:00
Donatas Abraitis
1700ed6d52 Revert "isisd: apply fast-reroute when an interface falls down"
This reverts commit 62e458278b.
2022-07-10 21:41:12 +03:00
Donatas Abraitis
c179a46b86 Revert "isisd: avoid fast-reroute on down adjacency when the interface is down"
This reverts commit 08e4960ab4.
2022-07-10 21:41:07 +03:00
Donatas Abraitis
2ba9ccf735 Revert "isisd: avoid fast-reroute from running twice on a down interface event"
This reverts commit d526476184.
2022-07-10 21:41:02 +03:00
Donatas Abraitis
790b48b635 Revert "topotests: isis-tilfa add a switchover test after linkdown"
This reverts commit bac0d1e606.
2022-07-10 21:40:55 +03:00
Donatas Abraitis
bbd3d821dd Revert "topotests: isis-tilfa add a switchover test after BFD down"
This reverts commit e83a52698b.
2022-07-10 21:40:49 +03:00
Donatas Abraitis
fbf0fc22f0 Revert "isisd: fix metric calculation of classic lfa backup prefixes"
This reverts commit e45958e9cf.
2022-07-10 21:40:43 +03:00
Donatas Abraitis
8ab2f0d18d Revert "isisd: fix SPF scheduling on IPv6 only topology"
This reverts commit d95cd33545.
2022-07-10 21:40:32 +03:00
Donatas Abraitis
82f4ef9c90 Revert "topotests: isis-lfa add a switchover test after linkdown"
This reverts commit 5558ac984f.
2022-07-10 21:40:16 +03:00
Donatas Abraitis
378b4a5b06 Revert "topotests: isis-lfa add a switchover test after hello timeout"
This reverts commit c99ef48962.
2022-07-10 21:40:11 +03:00
Donatas Abraitis
567534e93c Revert "topotests: isis-lfa add a switchover test after neighbor clear"
This reverts commit 9cdc099bb5.
2022-07-10 21:40:05 +03:00
Donatas Abraitis
e0d6dad2fb Revert "topotests: isis-lfa add a switchover test after BFD down"
This reverts commit c8d2816ee5.
2022-07-10 21:39:59 +03:00
mobash-rasool
cfab3187bc
Merge pull request #11570 from opensourcerouting/pim6-bsr-clear
pim6d: add `clear ipv6 pim bsr-data`
2022-07-09 09:49:36 +05:30
Donald Sharp
42e172499d
Merge pull request #11569 from opensourcerouting/gcc-plugin-shortcomings-220708
bgpd: work around GCC/plugin shortcomings
2022-07-08 21:30:54 -04:00