Commit Graph

28993 Commits

Author SHA1 Message Date
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
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
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
Donatas Abraitis
6ea484cf74
Merge pull request #11568 from anlancs/fix/minor-4
bgpd: fix missing rmac value in debug
2022-07-08 22:16:28 +03:00
Russ White
36153aa328
Merge pull request #10962 from louis-6wind/lfa-netlink
isisd: apply fast-reroute as soon an interface or an adjacency falls down
2022-07-08 11:14:07 -04:00
David Lamparter
b08967fbbc pim6d: add clear ipv6 pim bsr-data
This is needed for ANVL between testruns, and already in IPv4 too.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-07-08 14:58:38 +02:00
David Lamparter
37e7007373 bgpd: work around GCC/plugin shortcomings
The GCC extended printf format checking plugin runs into some GCC
shortcomings regarding casts on printf function parameters.  While this
can be fixed with a small GCC patch, patching GCC is "nontrivial" to say
the least.  Luckily, it happens that this is /almost/ not an issue for
the FRR source base.

Since we fix SA "misunderstandings" too, let's just fix places where the
format checking plugin runs into this limitation to keep things working
extra smoothly.

(It's not a huge effort either, these two spots in bgpd are the only
places that trigger the plugin limitation, and it's been "clean" before
that for more than a year if my memory is right.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-07-08 14:08:03 +02:00
Louis Scalbert
1dc6c5991c bgpd: show prefix in leak_update_nexthop_valid debug
Add prefix information in a leak_update_nexthop_valid() debug log.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-07-08 11:40:22 +02:00
Louis Scalbert
659251db5b bgpd: fix setting BGP_PATH_VALID flag in leak_update
(Un)set the BGP_PATH_VALID flag appropriately in the leak_update
function.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-07-08 11:35:05 +02:00
Louis Scalbert
f99b8a312c bgpd: factorize nexthop validation code in leak_update function
Factorize some duplicated codes about nexthop validation in the
leak_update function.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-07-08 11:25:49 +02:00
David Lamparter
bc0e6b1993
Merge pull request #10592 from patrasar/master_pimv6_bsm 2022-07-08 10:46:35 +02:00