Commit Graph

29216 Commits

Author SHA1 Message Date
Donald Sharp
0418cf2e26 lib: Remove usage of inet_ntop in lib/sockopt.c
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-02 10:37:55 -04:00
Sai Gomathi N
614b77fef5 pim6d: Change the show running commands for pimv6 debugs
Change the show running commands for bsm and vxlan pimv4 and pimv6
debug commands based on the address family.
Including bsm and vxlan in no debug pimv6 debug.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-08-02 06:34:30 -07:00
Russ White
084ad13530
Merge pull request #11684 from donaldsharp/cleanup_for_dev_builds
Cleanup for dev builds
2022-08-02 09:02:55 -04:00
Sai Gomathi N
2af7b0450b pim6d: Removing the to-do item in pimv6 debug
Removing the temporary enabling of all debugs for pimv6

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-08-02 05:50:02 -07:00
Sai Gomathi N
1f2ecfe5ab pim6d: Add 'show debugging [pimv6]' CLI
Adding show debugging CLI for pimv6 debugs.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-08-02 05:36:02 -07:00
Abhishek N R
8656814dac pim6d: Implementing "clear ipv6 pim interface traffic" command.
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-08-01 22:08:40 -07:00
Olivier Dugeon
9bf9bd1a0b lib: Correct valgrind errors
In CSPF topo test, valgrind detects uninitialized bytes when exporting TE
Opaque information through ZEBRA. This is due to C pragma compilation directive
__attribute__(aligned(8)) in struct ls_node_id in link_state.h. Valgrind
consideris that struct ls_node_id nid = {} doesn't initialized the padding
bytes introduced by gcc.

This patch simply removes the C pragma compilation directive and also takes
opportunity to remove the transmission of remote node id for vertices and
subnets which is not known. Indeed, remote node id is only pertinent for
edges.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2022-08-01 17:32:56 +02:00
Donald Sharp
ad9b47e65e
Merge pull request #11691 from mxyns/bmp-vpnv4monupd-fix
bgpd: fixed bmp vpnv4 monitoring sending withdraws instead of updates
2022-08-01 07:49:18 -04:00
Donald Sharp
102aeba008
Merge pull request #11692 from opensourcerouting/fix/bgpd_as_override
bgpd: Override ASN without checking if an entire as-path is from a single ASN
2022-08-01 07:19:11 -04:00
Donald Sharp
d758d2a9b2
Merge pull request #11712 from mobash-rasool/fixes2
pimd: Simply the code a bit, reduce code complexity
2022-08-01 07:18:10 -04:00
Mobashshera Rasool
0c7f978ec9 pimd: Simply the code a bit, reduce code complexity
Combine all the if conditions in api pim_if_addr_add_all to
reduce nested loops.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-07-31 23:43:28 -07:00
Donald Sharp
9edb601666 lib: Use pI4 instead of inet_ntop in sockopt.c
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-29 18:31:58 -04:00
Donald Sharp
a17eb04734 zebra: Remove usage of newline in zlog_X message
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-29 18:31:58 -04:00
Donald Sharp
7b6cee8975 bgpd: use pI4
The bgp_path_info_to_ipv6_nexthop will correctly set
the nexthop value. There is no need to test this to
display something that won't be used in debug

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-29 18:31:58 -04:00
Donald Sharp
be4b502a76 ospfd: Remove usage of inet_ntop
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-29 18:31:58 -04:00
Donald Sharp
c4a97dc54a lib: Coverity wants strlen to include null character
Ensure that the string has the null terminating character available
as well.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-29 15:55:01 -04:00
Donald Sharp
068dfd62a2 tests: Fix test_ospf_topo1 as that it sometimes fails
This test is sometimes failing when it looks at the
v6 routes in the fib.  Since the step before is
ensuring that v3 ospf has just converged let's
give it a bit of time to find and see if things
have had a chance to install the routes too.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-29 14:19:12 -04:00
Donald Sharp
676fa219f9 tests: Split up test_multicast_pim_static_rp.py into 3 test suites
This test directory takes almost 7 minutes to complete splitting
this up into 3 test files drops it down to just over 3 minutes.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-29 14:19:12 -04:00
mxyns
e7e1561fbb bgpd: fixed bmp vpnv4 monitoring are withdraws instead of updates
fixes the recent support bmp monitor of VPNv4 afi/safi
the bmp updates messages (MP_REACH_NLRI) are never sent for VPNv4 and bmp withdraws (MP_UNREACH_NRLI) are sent instead
this is caused by bgp_node_lookup which fails to find VPNv4 bgp_node in the rib which results in NULL path info attributes passed to bmp_monitor
using bgp_afi_node_lookup instead of bgp_node_lookup solves the problem

Signed-off-by: Maxence Younsi <mx.yns@outlook.fr>
2022-07-29 20:07:21 +02:00
Donatas Abraitis
9bbdb4572d bgpd: Do not check if the whole as-path has target ASN when using as-override
as-override didn't work if the entire as-path is not a single ASN (as a target).

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-07-29 20:43:22 +03:00
Donald Sharp
e279bfdf06
Merge pull request #11707 from kuldeepkash/pim_v6
doc: Update /doc/topotests.rst documentation
2022-07-29 10:10:26 -04:00
Donatas Abraitis
fbc3ab74ee
Merge pull request #11706 from donaldsharp/safi_hate
bgpd: Safi can be SAFI_MAX which would allow a write beyond alloced
2022-07-29 15:30:03 +03:00
Donald Sharp
84d681e6db
Merge pull request #11702 from patrasar/pim_11675
pimd: Update mroute IIF based on Nexthop received from Zebra
2022-07-29 07:05:50 -04:00
Kuldeep Kashyap
c73d2974b2 doc: Update /doc/topotests.rst documentation
Updated /doc/topotests.rst with socat details,
which is needed to run PIMv6 tests. Socat tool
is used to send PIMv6 join and traffic.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-07-28 21:57:51 -07:00
mobash-rasool
1020efd501
Merge pull request #11703 from donaldsharp/blimey
isisd: Prevent leak of global_ipv6_addrs
2022-07-29 10:23:17 +05:30
Donald Sharp
f609bcd6a6 bgpd: Safi can be SAFI_MAX which would allow a write beyond alloced
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-28 18:01:09 -04:00
Jafar Al-Gharaibeh
90937e420c pimd: fix static mroute to also take into account the input interface
Allow the same group/source route to be configured on more than one interface.
Currently FRR doesn't allow adding the same mroute on different input interfaces.

Current behavior, if we have the following config:

```
interface eth1
   ip mroute eth0 239.0.0.1

interface eth2
   ip mroute eth0 239.0.0.1
```

Only one multicast route will be installed with an input interface of the last
interface configured.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2022-07-28 16:27:19 -05:00
Sarita Patra
f789683690 pimd: Update mroute IIF based on Nexthop received from Zebra
Topology:
R1(LHR) ---- R2 ----R4(FHR)
        ---- R3 ----

R2 = RP

Steps to reproduce:
1. R1(LHR) sends IGMP join, R4(FHR) sends multicast traffic.
   Verify traffic is flowing from FHR to LHR.
2. Restart R1(LHR).
3. Below sequence of events are happening after FRR restart in R1(LHR).
4. R1(LHR) Register RP address to Zebra.
5. R1(LHR) Receive update from Zebra that R2(RP) is reachable via R3.
6. R1(LHR) Receive IGMP join for group 225.1.1.1, will create pim upstream
   and (*,G) mroute with IIF towards R3.
7. R1(LHR) Receive update from Zebra that RP is reachable via R2(RP).
8. R1(LHR) Update the PIM upstream IIF, but not updating the (*,G) IIF
   even there is RPF change.
9. R1(LHR) receives IGMP join for group 225.1.1.2, will create (*,G) with
   IIF towards R2(RP), both upstream and (,G) created with IIF towards R2(RP).

Root Cause:
Mroute IIF is not getting updated when better route update
received. It is still pointing to the older nexthop.

Fix:
Update the mroute IIF when there is change in nexthop.

Fixing Issue #11675

Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-07-28 13:03:46 -07:00
Donald Sharp
27383c1c8e isisd: Prevent leak of global_ipv6_addrs
adj->global_ipv6_addrs was not being freed on deletion
of the adjacency.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-28 13:58:14 -04:00
Jafar Al-Gharaibeh
b5e08672ea
Merge pull request #11685 from sri-mohan1/sri-ospf
ospfclient: condition optimization
2022-07-28 11:59:53 -05:00
Donatas Abraitis
8ff746efcb
Merge pull request #11695 from donaldsharp/afi_max
bgpd: Ensure we are not using AFI_MAX
2022-07-28 18:32:24 +03:00
Donald Sharp
dda5a082af
Merge pull request #11693 from opensourcerouting/fix/unlock_bgp_dest
bgpd: Unlock bgp_node after bgp_node_lookup
2022-07-28 11:30:11 -04:00
mobash-rasool
9982282d41
Merge pull request #11697 from donaldsharp/bgp_work
two things
2022-07-28 17:07:06 +05:30
Donatas Abraitis
a25ae82fd4 bgpd: Unlock bgp_node after bgp_node_lookup
bgp_node_lookup increments lock, we should decrement it after use.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-07-28 14:36:38 +03:00
Donatas Abraitis
e8e28f4f4c
Merge pull request #11701 from kuldeepkash/pim_v6
tests: [PIMv6] Updated topology for static rp suite
2022-07-28 14:33:04 +03:00
Kuldeep Kashyap
855995e505 tests: [PIMv6] Update topology for static rp suite
Updated topology for static rp suite as per testcase.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-07-27 19:51:43 -07:00
Mark Stapp
11f9f70c9d
Merge pull request #11696 from sri-mohan1/sri-debug
ospf6d: corrected the debug string
2022-07-27 15:17:23 -04:00
sri-mohan1
abc14fa02b ospf6d: corrected the debug string
Corrected the gramatical error for debug string

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2022-07-27 22:29:02 +05:30
Donald Sharp
c33e80d5f7 ospfd: Coverity warns that we could possibly use unininted data
In ospf_handle_exnl_lsa_lsId_chg there is a code path
where that we may be using uninitialized data for decisions.
Doubtful that this happens but let's make it less likely to
even more.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-27 12:17:50 -04:00
Donald Sharp
7622259e3c bgpd: Improve indentation in bgp_updgrp_adv.c
This file was hard to read due to heavy indentation.
Let's fix it up some.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-27 12:17:16 -04:00
Donald Sharp
d335feeff8
Merge pull request #11682 from opensourcerouting/frr-format-gcc-12
tools/gcc-plugins: make GCC 12 compatible
2022-07-27 11:44:39 -04:00
Donald Sharp
528d3d87bf
Merge pull request #11689 from opensourcerouting/fix/port_for_unnumbered
bgpd: Allow setting custom port for unnumbered sessions
2022-07-27 11:42:09 -04:00
Donald Sharp
d880a643d7 bgpd: Ensure we are not using AFI_MAX
When using bgp_vty_afi_from_str it can
return AFI_MAX( but in practice never will with
our cli ).  In bgp_default_afi_safi_cmd the code
directly references:
	bgp->default_afi[afi][safi] = TRUE;

and if afi is AFI_MAX FRRR would be accessing
memory where it should not be.

Let's just provide some assurances for coverity
that this never happens.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-07-27 09:36:17 -04:00
Donatas Abraitis
ada423318a tests: Check if BGP as-override works correctly
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-07-27 13:33:11 +03:00
sri-mohan1
ac62d9fdca ospfclient: condition optimization
Its better to check the length and then the type of the LSA

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2022-07-27 14:59:53 +05:30
Donatas Abraitis
c41e93720a bgpd: Reset BGP sessions when changing the port
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-07-27 11:44:07 +03:00
Donatas Abraitis
a3aecc99d5 bgpd: Allow setting custom port for BGP unnumbered peers
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-07-27 11:36:15 +03:00
Martin Winter
8d4abfc9b9
Merge pull request #11164 from kuldeepkash/pim_v6 2022-07-27 10:05:25 +02:00
Donatas Abraitis
6310965c21
Merge pull request #11681 from donaldsharp/valgrind_issues
pimd: Fix a couple coverity issues with mtracebis_netlink.c
2022-07-27 10:51:25 +03:00
Donatas Abraitis
4a16d62977
Merge pull request #11678 from donaldsharp/valgrind_me
Valgrind me
2022-07-27 10:29:29 +03:00