Commit Graph

30870 Commits

Author SHA1 Message Date
Donatas Abraitis
8e23fef97d lib: Destroy any flag when creating a prefix-list entry with prefix
The same as 61c07b9d43, but forgot to put IPv6
in place.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 14c1e0a169)
2023-03-19 22:39:22 +00:00
Donatas Abraitis
aa1ca32dbc tests: Check if prefix-lists with IPv6 any works fine
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit d8986f0134)
2023-03-19 22:39:22 +00:00
Donald Sharp
6da712b9e9
Merge pull request #13041 from FRRouting/mergify/bp/stable/8.5/pr-13038 2023-03-19 18:39:02 -04:00
Donatas Abraitis
d96b1906b5
Merge pull request #13043 from FRRouting/mergify/bp/stable/8.5/pr-13026
pbrd:fix mismatching in match src-dst (backport #13026)
2023-03-19 22:58:04 +02:00
Donatas Abraitis
d100d24386
Merge pull request #13045 from FRRouting/mergify/bp/stable/8.5/pr-13025
Ospf ti lfa leaks (backport #13025)
2023-03-19 22:57:53 +02:00
Donald Sharp
610c449198 ospfd: Free up q_space in early return path
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 52ff0e3ed4)
2023-03-19 04:45:23 +00:00
Donald Sharp
05dee7a121 ospfd: Fix ospf_ti_lfa drop of an entire table
The new_rtrs variable was just generated and then dropped.  Let's
fix that entirely

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit eb7e14011f)
2023-03-19 04:45:23 +00:00
Chirag Shah
907a881e64 pbrd:fix mismatching in match src-dst
upstream commit 67765a232d has incorect
address family check which prevent from
deleting src/dst config under pbr rule.

Ticket:#3405024
Issue:3405024
Testing Done:

Config:

pbr-map map6 seq 1
 match src-ip 2000::200:100💯0/96
 match dst-ip 2000:💯100💯0/96
 set nexthop-group group3

Before:
torc-12(config)# pbr-map map6 seq 1
torc-12(config-pbr-map)# no match src-ip 2000::200:100💯0/96
Cannot mismatch families within match src/dst

After:
torc-12(config)# pbr-map map6 seq 1
torc-12(config-pbr-map)# no match src-ip 2000::200:100💯0/96
torc-12(config-pbr-map)#

Signed-off-by: Chirag Shah <chirag@nvidia.com>
(cherry picked from commit 03494887ed)
2023-03-19 04:43:02 +00:00
Donald Sharp
89992e547c ospfd: Cleanup some memory leaks on shutdown in ospf_apiserver.c
Clean up some memory leaks found in ospf_apiserver.c  Also
a crash in the original implementation.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 7773d0071a)
2023-03-19 04:29:22 +00:00
Donald Sharp
e4aa127939
Merge pull request #13035 from FRRouting/mergify/bp/stable/8.5/pr-13024
lib: Adjust only any flag for prefix-list entries if destroying (backport #13024)
2023-03-18 13:14:57 -04:00
Donatas Abraitis
6d7a03d0b1 lib: Adjust only any flag for prefix-list entries if destroying
Before this patch, if we destroy `any` flag for a prefix-list entry, we always
set destination as 0.0.0.0/0 and/or ::/0.

This means that, if we switch from `ip prefix-list r1-2 seq 5 deny any` to
`ip prefix-list r1-2 seq 5 permit 10.10.10.10/32` we will have
`permit any` eventually, which broke ACLs.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 61c07b9d43)
2023-03-18 11:31:55 +00:00
Donatas Abraitis
444a4716fb tests: Check if route-map works correctly if modifying prefix-lists
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit a1e538178c)
2023-03-18 11:31:54 +00:00
Donatas Abraitis
bba9437b6e
Merge pull request #13015 from FRRouting/mergify/bp/stable/8.5/pr-13009
bgpd: Use interface name instead of pointer value (backport #13009)
2023-03-18 00:04:59 +02:00
Donatas Abraitis
a121fa4900
Merge pull request #13021 from FRRouting/mergify/bp/stable/8.5/pr-13016
ospfd, ospfd6: Add more logging (backport #13016)
2023-03-18 00:04:22 +02:00
Martin Winter
07751d58e1 ospfd: Log Adjacency Changes with Neighbor IP in addition to Neighbor ID
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 386d232a1a)
2023-03-17 11:55:54 +00:00
Donatas Abraitis
922429d123 ospfd, ospf6d: Add more logging details
Basically just router-id or interface/IP.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit ba427e6348)
2023-03-17 11:55:53 +00:00
Donald Sharp
53737303c8 bgpd: Use interface name instead of pointer value
Log message is borked in a manner that makes it unusable:
bgpd[52]: [VX6SM-8YE5W][EC 33554460] 2000:31:0:53::2: nexthop_set failed, resetting connection - intf 0x561eb9005a30

Let's print out the interface name instead.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 50e049db76)
2023-03-17 07:56:45 +00:00
Donatas Abraitis
9b62b5d8c2
Merge pull request #13001 from FRRouting/mergify/bp/stable/8.5/pr-12996
tools: frr-reload fix list value not present (backport #12996)
2023-03-15 19:20:41 +02:00
Donatas Abraitis
34e3719e80
Merge pull request #12987 from FRRouting/mergify/bp/stable/8.5/pr-12978
pimd: IN_MULTICAST needs host order (backport #12978)
2023-03-15 14:09:34 +02:00
Chirag Shah
082061db90 tools: frr-reload fix list value not present
Check for value present in list before removing
as in certain python3 ValueError traceback is observed.

Traceback (most recent call last):
  File "/usr/lib/frr/frr-reload.py",
		line 2278, in <module>
    (lines_to_add, lines_to_del, restart_frr)
	= compare_context_objects(newconf, running)
  File "/usr/lib/frr/frr-reload.py",
		line 1933, in compare_context_objects
    lines_to_add, lines_to_del
  File "/usr/lib/frr/frr-reload.py",
		line 1549, in ignore_delete_re_add_lines
    lines_to_del.remove((ctx_keys, line))
ValueError: list.remove(x): x not in list

Ticket:#3389979
Issue:3389979

Testing Done:
With fix perform frr-relaod on frr.conf config where earlier
traceback was seen.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Chirag Shah <chirag@nvidia.com>
(cherry picked from commit 1543f58b55)
2023-03-15 12:00:32 +00:00
Donald Sharp
39a0e558ed pimd: IN_MULTICAST needs host order
New correct behavior:

eva# conf
eva(config)# ip pim rp 192.168.1.224 224.0.0.0/24
No Path to RP address specified: 192.168.1.224
eva(config)# ip pim rp 224.1.2.3 224.0.0.0/24
% Bad RP address specified: 224.1.2.3
eva(config)#

Fixes: #12970
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 8083e71356)
2023-03-14 05:49:02 +00:00
Jafar Al-Gharaibeh
86a5e5a04d FRR Release 8.5
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2023-03-13 09:01:47 -05:00
Jafar Al-Gharaibeh
38a01043af debian, redhat: updating changelog for new release
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2023-03-13 09:01:30 -05:00
Donatas Abraitis
c353c87453
Merge pull request #12980 from FRRouting/mergify/bp/stable/8.5/pr-12974
bgpd: Increment version number even when no data is sent (backport #12974)
2023-03-13 07:11:48 +02:00
Donald Sharp
b5e938eee9 bgpd: Increment version number even when no data is sent
When an update group decides to not send a prefix
announcement because it has not changed, still increment
the version number.  Why?  To allow for the situation
where you have say 2 peers in 1 peer group and shortly
after they come up a 3rd peer comes up.  It will be
placed into a separate update group and could be
coalesced down, when it finishes updating all data
to it.  Now imagine that a single prefix changes at
this point in time as well.  Then first 2 peers may
decide to not send the data, since nothing has changed.
While the 3rd peer will and since the versions numbers
never match they will never coalesce.  So when the decision
is made to skip, update the version number as well.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit a8038460bd)
2023-03-12 19:49:38 +00:00
Donatas Abraitis
27f213516d
Merge pull request #12973 from FRRouting/mergify/bp/stable/8.5/pr-12962
bgpd: Check if the peer is configured as interface when checking NHT (backport #12962)
2023-03-11 09:38:20 +02:00
Donatas Abraitis
3efc883ad7 tests: Check if IPv6 BGP Link-Local peering works
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 0f4a09ac25)
2023-03-11 05:09:54 +00:00
Donatas Abraitis
3704fee75d bgpd: Check if the peer is configured as interface when checking NHT
This causes early return. peer->conf is NULL for IPv6 link-local peering,
and the session never establish.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit e9ad26e53f)
2023-03-11 05:09:53 +00:00
Donatas Abraitis
9f31d57664
Merge pull request #12956 from FRRouting/mergify/bp/dev/8.5/pr-12951
bgpd: Fix use beyond end of stream of labeled unicast parsing (backport #12951)
2023-03-06 08:53:57 +02:00
Donald Sharp
ab362eae68 bgpd: Fix use beyond end of stream of labeled unicast parsing
Fixes a couple crashes associated with attempting to read
beyond the end of the stream.

Reported-by: Iggy Frankovic <iggyfran@amazon.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 7404a914b0)
2023-03-05 18:52:31 +00:00
Donatas Abraitis
ab09ebf717
Merge pull request #12952 from FRRouting/mergify/bp/dev/8.5/pr-12950
babeld: fix #11808 to avoid infinite loops (backport #12950)
2023-03-05 20:49:09 +02:00
harryreps
0a95d121ca babeld: fix #11808 to avoid infinite loops
Replacing continue in loops to goto done so that index of packet buffer
increases.

Signed-off-by: harryreps <harryreps@gmail.com>
(cherry picked from commit ae1e0e1fed)
2023-03-04 11:09:53 +00:00
Donatas Abraitis
c811c252d7
Merge pull request #12927 from FRRouting/mergify/bp/dev/8.5/pr-12903
pimd, pim6d: Don't track nexthop for RP 0.0.0.0 & 0::0 (backport #12903)
2023-03-02 12:41:30 +02:00
Donatas Abraitis
0a9a5c38b8
Merge pull request #12926 from FRRouting/mergify/bp/dev/8.5/pr-12921
pimd: Prevent crash when pimreg already exists. (backport #12921)
2023-03-02 11:21:04 +02:00
Donatas Abraitis
d6c7332418
Merge pull request #12925 from FRRouting/mergify/bp/dev/8.5/pr-12008
pimd, pim6d: Fix RPF check (backport #12008)
2023-03-02 10:36:37 +02:00
Sarita Patra
4801fe9ec4 pimd, pim6d: Don't track nexthop for RP 0.0.0.0 & 0::0
Topology:
========
FHR----Source

Problem:
=======
When FHR receives multicast traffic, there is no RP configured,
PIMD does NHT register for RP address 0.0.0.0 and group 224.0.0.0/4
PIM6D does NHT register for RP address 0::0 and group FF00::0/8

frr# show ip pim nexthop
Number of registered addresses: 1
Address         Interface        Nexthop
---------------------------------------------

frr# show ipv6 pim nexthop
Number of registered addresses: 1
Address         Interface        Nexthop
---------------------------------------------

Fix:
====
Dont track nexthop for RP 0.0.0.0 & 0::0.

frr# show ip pim nexthop
Number of registered addresses: 0

frr# show ipv6 pim nexthop
Number of registered addresses: 0

Issue: #12104

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit 201a31b977)
2023-03-02 07:55:41 +00:00
Donald Sharp
c7df55983c pimd: Prevent crash when pimreg already exists.
If the pimreg device exists but it has not been set to the pim->pimreg pointer we can have
a crash.  Just prevent the crash since it's some sort of startup / re-org the network
issue.

(gdb) bt
0  0x00007f0485b035cb in raise () from /lib/x86_64-linux-gnu/libpthread.so.0
1  0x00007f0485c0fbec in core_handler (signo=6, siginfo=0x7ffdc0198030, context=<optimized out>) at lib/sigevent.c:264
2  <signal handler called>
3  0x00007f04859668eb in raise () from /lib/x86_64-linux-gnu/libc.so.6
4  0x00007f0485951535 in abort () from /lib/x86_64-linux-gnu/libc.so.6
5  0x00007f0485c3af76 in _zlog_assert_failed (xref=xref@entry=0x55692269b940 <_xref.23164>, extra=extra@entry=0x0) at lib/zlog.c:680
6  0x00005569226150d0 in pim_if_new (ifp=0x556922c82900, gm=gm@entry=false, pim=pim@entry=false, ispimreg=ispimreg@entry=true,
    is_vxlan_term=is_vxlan_term@entry=false) at pimd/pim_iface.c:124
7  0x0000556922615140 in pim_if_create_pimreg (pim=pim@entry=0x556922cc11e0) at pimd/pim_iface.c:1549
8  0x0000556922616bc8 in pim_if_create_pimreg (pim=0x556922cc11e0) at pimd/pim_iface.c:1613
9  pim_ifp_create (ifp=0x556922cc0e70) at pimd/pim_iface.c:1641
10 0x00007f0485c32cf9 in zclient_interface_add (cmd=<optimized out>, zclient=<optimized out>, length=<optimized out>, vrf_id=77) at lib/zclient.c:2214
11 0x00007f0485c3346a in zclient_read (thread=<optimized out>) at lib/zclient.c:4003
12 0x00007f0485c215ed in thread_call (thread=thread@entry=0x7ffdc0198880) at lib/thread.c:2008
13 0x00007f0485bdbbc8 in frr_run (master=0x556922a10470) at lib/libfrr.c:1223
14 0x000055692260312b in main (argc=<optimized out>, argv=0x7ffdc0198b98, envp=<optimized out>) at pimd/pim_main.c:176

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 7ae7a3bfd6)
2023-03-02 06:15:21 +00:00
Sarita Patra
0770149af7 pimd, pim6d: Fix join prune handling
When upstream RPF address is secondary address, and
neighborship is built with primary address,
then pim_neighbor_find() fails.

Verify the upstream  RPF address is present in the
neighbor primary and secondary address list.

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit d77da853f0)
2023-03-02 06:11:18 +00:00
Sarita Patra
cb8d50ecd9 pimd, pim6d: Fix pim upstream rpf change
When upstream RPF address is secondary, and
neighborship is built with primary address,
then pim_neighbor_find() fails, due to which when there
is upstream change it wont send prune.

Verify the nexthop is present in the neighbor primary
and secondary address list.

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit 689b9f10fc)
2023-03-02 06:11:18 +00:00
Sarita Patra
8fcc9daf7c pimd, pim6d: fix pim neighbor check in pim_nexthop_lookup
When there is a mismatch in nexthop address (secondary address)
and neighborship address(primary address) on the same interface,
RPF check fails.

This is fixed now.

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit e14ba24874)
2023-03-02 06:11:18 +00:00
Sarita Patra
bfd120c5f3 pimd, pim6d: Fix RP Unknown IIF
When route to RP is having nexthop secndary address,
neighborship is built with primary address,
then pim_neighbor_find() fails, which causes RP IIF
Unknown.

Fix:
Verify pim neighborship on the RP connected interface.

Issue: #11526

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit ae5bcac0ae)
2023-03-02 06:11:17 +00:00
Sarita Patra
ca163640f1 pimd, pim6d: Fix BSM packet process
Problem 1:
When route to BSR is having nexthop secondary address,
neighborship is built with primary address,
then pim_neighbor_find() fails, which cause drop of BSM
packet.

Fix 1:
Verify pim neighborship on the BSM received interface.
Problem 2:

Problem 2:
Source IP BSM address is primary address, where
as nexthop also can be primary or secondary address.

Fix 2:
Avoiding the check (nhaddr == src_ip) for PIMV6

Issue: #11957

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit 2c6a32f9be)
2023-03-02 06:11:17 +00:00
Sarita Patra
0320f687e6 pimd,pim6d: Modify pim_neighbor_find() API
Modify pim_neighbor_find() API to find the neighbor
in neighbor secondary list.

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit 3dbf370ac0)
2023-03-02 06:11:17 +00:00
Sarita Patra
26a7da3637 zebra: Send nexthop ifindex for type NEXTHOP_TYPE_IPV6
Once RP/BSR address is learned in PIMD, PIMD does nexthop tracking
in Zebra.
For IPV6 address, the nexthop type is either NEXTHOP_TYPE_IPV6
or NEXTHOP_TYPE_IPV6_IFINDEX.
Zebra should send nexthop ifindex information along with nexthop address
to the client (PIMD).

Issue: #11526
Issue: #11957

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit ed9323604a)
2023-03-02 06:11:16 +00:00
Donatas Abraitis
614a18415d
Merge pull request #12910 from FRRouting/mergify/bp/dev/8.5/pr-12899
pim6d: Fix display issue in "show ipv6 mld interface" command (backport #12899)
2023-02-28 10:26:14 +02:00
Donatas Abraitis
dbf2b160e6
Merge pull request #12909 from FRRouting/mergify/bp/dev/8.5/pr-12906
pimd, pim6d: Upstream IIF pointing towards PIM and IGMP disabled source conn… (backport #12906)
2023-02-27 23:30:42 +02:00
Sarita Patra
a3350c9487 pim6d: Fix missing parameters in "show ipv6 mld interface" command
Before fix:
==========
frr# show ipv6 mld interface
Interface         State  V  Querier                    Timer               Uptime
ens224            up     1  fe80::250:56ff:feb7:a7e3   query 00:00:24.219  00:00:07.031

After fix:
=========
frr(config-if)# do show ipv6 mld interface
 Interface  State  Address                   V  Querier  QuerierIp                 Query Timer   Uptime
 ens224     up     fe80::250:56ff:feb7:a7e3  1  local    fe80::250:56ff:feb7:a7e3  00:01:22.263  00:08:00.237

Issue: #11241

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit cbb1e51311)
2023-02-27 19:03:11 +00:00
Sarita Patra
43bcbda9b4 pim6d: Display primary address in "show ipv6 mld interface json" cmd
Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit 3ab119a4bb)
2023-02-27 19:03:11 +00:00
Sarita Patra
aa3f3511de pim6d: Don't display MLD disabled or down interfaces in "show ipv6 mld interface" cmd
We should not display down interfaces or MLD disabled interfaces in
"show ipv6 mld interface" command.

Before fix:
==========
frr# show ipv6 mld interface
Interface         State  V  Querier                    Timer               Uptime
ens192            up     2  fe80::250:56ff:feb7:d04    query 00:00:25.432  00:00:07.038
ens224            up     1  fe80::250:56ff:feb7:a7e3   query 00:00:24.219  00:00:07.031
pim6reg            down

After fix:
=========
frr# show ipv6 mld interface
Interface         State  V  Querier                    Timer               Uptime
ens192            up     2  fe80::250:56ff:feb7:d04    query 00:00:25.432  00:00:07.038
ens224            up     1  fe80::250:56ff:feb7:a7e3   query 00:00:24.219  00:00:07.031

Issue: #11241

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit fe4db62c3d)
2023-02-27 19:03:11 +00:00
Sarita Patra
a7d5d735d1 pimd, pim6d: Upstream IIF pointing towards PIM and IGMP disabled source connected interface
Topology:
=========
RP---FHR<ens224>---Source

Problem Statement:
=================
Step 1:
Enable PIM and IGMP on source connected interface ens224

Step 2:
Start multicast traffic. (s,g) mroute and upstream will be created as expected.

dev# show ip mroute
IP Multicast Routing Table
Flags: S - Sparse, C - Connected, P - Pruned
       R - SGRpt Pruned, F - Register flag, T - SPT-bit for SSM FHR
 Source    Group      Flags  Proto  Input   Output  TTL  Uptime
 50.0.0.4  225.1.1.1  SF     PIM    ens224  pimreg  1    00:37:55

dev# show ip pim upstream
 Iif     Source    Group      State      Uptime    JoinTimer  RSTimer   KATimer   RefCnt
 ens224  50.0.0.4  225.1.1.1  NotJ,RegJ  00:37:57  --:--:--   --:--:--  00:02:43  1

Step 3:
Disable PIM on source connected interafce ens224

dev# show ip mroute
IP Multicast Routing Table
Flags: S - Sparse, C - Connected, P - Pruned
       R - SGRpt Pruned, F - Register flag, T - SPT-bit for SSM FHR
 Source    Group      Flags  Proto  Input   Output  TTL  Uptime
 50.0.0.4  225.1.1.1  SF     PIM    ens224  pimreg  1    00:38:05

dev# show ip pim upstream
 Iif     Source    Group      State      Uptime    JoinTimer  RSTimer   KATimer   RefCnt
 ens224  50.0.0.4  225.1.1.1  NotJ,RegJ  00:38:08  --:--:--   --:--:--  00:02:32  1

Step 4:
Disable IGMP on source connected interface ens224

dev# show ip pim upstream
 Iif     Source    Group      State      Uptime    JoinTimer  RSTimer   KATimer   RefCnt
 ens224  50.0.0.4  225.1.1.1  NotJ,RegJ  00:38:15  --:--:--   --:--:--  00:03:27  1

dev# show ip mroute
IP Multicast Routing Table
Flags: S - Sparse, C - Connected, P - Pruned
       R - SGRpt Pruned, F - Register flag, T - SPT-bit for SSM FHR
 Source    Group      Flags  Proto  Input   Output  TTL  Uptime
 50.0.0.4  225.1.1.1  SF     PIM    <iif?>  pimreg  1    00:38:18

Pim upstream IIF is still pointing towards the source connected
interface which is not pim enabled and not IGMP enabled and
Mroute is still present in the kernel and KAT timer is still running
on the interface, where ifp->info is already set to NULL.
This leads to crash.

Root Cause:
==========
When "no ip pim" commands get executed on source connected interface,
we are updating upstream IIF only when IGMP is not enabled on the same
interface.

Fix:
===
When PIM is disabled on source connected interface, update upstream IIF
no matter if IGMP is enabled or not on the same interface.

Issue: #12848
Issue: #10782

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit 9e01548593)
2023-02-27 18:56:17 +00:00