Commit Graph

29152 Commits

Author SHA1 Message Date
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
Donatas Abraitis
4ccacc3a40
Merge pull request #11553 from patrasar/clear_ip_mroute
pimd, pim6d: Fix description for clear ip[v6] mroute command
2022-07-08 09:50:44 +03:00
anlan_cs
2304139a62 bgpd: fix missing rmac value in debug
`attr.rmac` is not set in debug as expected for its wrong place in code.

Just move the debug process (`bgp_debug_zebra(NULL)`) after possible `rmac`
value is set.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-07-08 00:27:00 -04:00
sarita patra
691a58faa1 pim6d: removed pim6_stubs.c file
pim6_stub.c file is no more needed.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07 10:56:45 -07:00
sarita patra
7b56b13fc7 pim6d: Adjust pim_show_bsm_db for IPV6
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07 10:56:45 -07:00
sarita patra
c0590b1c59 pim6d: IPV6 adjust in hash_calc_on_grp_rp
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07 10:56:45 -07:00
sarita patra
f0e91749df Revert "pim6d: IPv6-adjust BSM code"
This reverts commit 809c11a9d8.
2022-07-07 10:56:45 -07:00
sarita patra
cefd2343d6 pim6d: remove unused variable neigh_src_str
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07 10:56:45 -07:00
sarita patra
17dd168097 pim6d: running pim_bsm.c for pimv6
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07 10:56:45 -07:00
sarita patra
81a688bc7b pim6d: add pimv6 support for bsmmsg_grpinfo
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07 10:56:45 -07:00
sarita patra
1407e40fc8 pim6d: add pimv6 support for bsmmsg_rpinfo
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07 10:56:45 -07:00
sarita patra
1ae87bdd38 pim6d: add pimv6 support for bsm_hdr
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07 10:56:45 -07:00
sarita patra
11e1593f9f pim6d: Add pim_addr rp_addr in bsm_rpinfo
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07 10:56:43 -07:00
Donald Sharp
79771c8752
Merge pull request #11541 from opensourcerouting/zebra-mr-netlink
zebra: fix various multicast routing netlink API bits
2022-07-07 12:23:07 -04:00
Donald Sharp
af8432d713
Merge pull request #11545 from opensourcerouting/fix/memory_leak_for_bmp_listener
bgpd: Free memory for BMP listeners when deleting BGP instance
2022-07-07 12:22:19 -04:00
Jafar Al-Gharaibeh
6e09ecef0f
Merge pull request #11549 from opensourcerouting/fix/logrotate
tools: Add missing bfdd to logrotate config
2022-07-07 08:56:34 -06:00
sarita patra
53bbfd535a pim6d: bsr nht handling for IPV6
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07 07:53:40 -07:00
sarita patra
e309769ae7 pim6d: modify in_addr current_bsr to pim_addr current_bsr
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-07 07:51:33 -07:00
Martin Winter
0e98be9eea debian: Add pkg.frr.pim6d build profile
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2022-07-07 07:14:27 -07:00
Mobashshera Rasool
9289b93373 redhat: Always disable PIM6d on CentOS 6 and RedHat 6 systems
Since these systems are too old to correctly support the protocol
disabling the PIM6d.
Also by default disable on all. Use --enable-pim6d flag to
enable it.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-07-07 07:14:27 -07:00
Mobashshera Rasool
7e08c08069 pim6d: Disable pim6d compilation by default
By default, disable pim6d compilation. If someone
wants to enable the compilation, should use ./configure option
with --enable-pim6d.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-07-07 07:14:27 -07:00
Christian Hopps
0238d27f50
Merge pull request #11552 from opensourcerouting/pkgfix
Package build fixes
2022-07-07 10:09:26 -04:00
David Lamparter
3eade02f13
Merge pull request #10715 from patrasar/pim_rpf_prefix_to_pimaddr
pim6d: modify pim_rpf from struct prefix to pim_addr
2022-07-07 15:36:57 +02:00
Sarita Patra
14a3e390e9 pim6d: Fix description for "clear ipv6 mroute" cmd
Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-07-07 06:12:03 -07:00
Sarita Patra
215d10a104 pimd: Fix description for "clear ip mroute" cmd
Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-07-07 06:06:06 -07:00
Martin Winter
d2b48927bb
snapcraft: Version must be quoted in snap store
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2022-07-07 12:31:03 +02:00
Martin Winter
b78535682c
debian: Fix version requirement for rtrlib to allow distro specific names
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2022-07-07 12:30:49 +02:00
David Lamparter
ca8a395da8 zebra: debug decode RTA_EXPIRES and RTA_MFC_STATS
Just adding two more attributes to decode and show nicely in netlink
msgdump debug output.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-07-07 11:36:44 +02:00
David Lamparter
e1cd4bb178 zebra: fix remaining MR RTM_GETROUTE oddities
The IPv6 version needs rtm_src_len and rtm_dst_len filled in due to
strict validation.  IPv4 also has this requirement, but zebra is running
in non-strict mode there so the kernel accepts it...

Also the table ID hack is IPv4 only.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-07-07 11:36:40 +02:00
Donatas Abraitis
9763474278 tools: Add missing bfdd to logrotate config
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-07-07 11:05:00 +03:00
Donatas Abraitis
967e4a1787
Merge pull request #11530 from ARShreenidhi/default_originate_testcase
tests : bgp default originate test cases
2022-07-07 10:11:45 +03:00
Donatas Abraitis
17b923c885
Merge pull request #11548 from paulc39/check_hostname_in_resolver_resolve
lib: check hostname in resolver_resolve
2022-07-07 10:09:42 +03:00
kevinshen
30220d1e35 lib: check hostname in resolver_resolve
resolver_resolve should check hostname is null or not.

if ares_gethostbyname() get null hostname string, the hostname string will access a null pointer and crash.

Signed-off-by: kevinshen <kevinshen@inspur.com>
2022-07-07 12:10:03 +08:00
Donatas Abraitis
5cb3a15300 bgpd: Free memory for BMP listeners when deleting BGP instance
When using `no router bgp` we MUST free the memory for the listeners too.

Replicate with:
```
router bgp 100
bmp targets server1
bmp listener 0.0.0.0 port 65535
no router bgp
router bgp 100
bmp targets server1
bmp listener 0.0.0.0 port 65535
no router bgp
router bgp 100
bmp targets server1
bmp listener 0.0.0.0 port 65535
no router bgp
```

Before:
```
Type                          : Current#   Size       Total     Max#  MaxBytes
BMP targets                   :        0    240           0        1       248
BMP targets name              :        0      8           0        1        24
BMP listener                  :       12    152        1824       12      1824
BMP instance state            :        0     88           0        1        88
```

After:
```
Type                          : Current#   Size       Total     Max#  MaxBytes
BMP targets                   :        0    240           0        1       248
BMP targets name              :        0      8           0        1        24
BMP listener                  :        0    152           0        1       152
BMP instance state            :        0     88           0        1        88
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-07-06 22:27:23 +03:00
ARShreenidhi
fbad2f3af9 tests : Topotest support to bgp_default_originate
When there is change in route-map policy associated with default-originate, changes does not reflect.
When route-map associated with default-originate is deleted, default route doesn't get withdrawn
Update message is not being sent when only route-map is removed from the default-originate config.
SNT counter gets incremented on change of every policy associated with default-originate
Route-map with multiple match clauses causes inconsistencies with default-originate.
Default-originate behaviour on BGP-attributes

Signed-off-by: ARShreenidhi <rshreenidhi@vmware.com>
2022-07-06 11:06:54 -07:00
Iqra Siddiqui
a633fb579e bgpd: Fix insonsistencies with default-originate route-map
Description:
- When there are multiple policies configured with
  route-map then the first matching policy is not
  getting applied on default route originated with
  default-originate.

- In BGP we first run through the BGP RIB and then
  pass it to the route-map to find if its permit or
  deny. Due to this behaviour the first route in
  BGP RIB that passes the route-map will be applied.

Fix:
- Passing extra parameter to routemap_apply so that
  we can get the preference of the matching policy,
  keep comparing it with the old preference and finally
  consider the policy with less preference.

Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com>
Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
2022-07-06 11:06:49 -07:00
mobash-rasool
237d29803d
Merge pull request #11542 from opensourcerouting/bfd-coverity
bfdd: fix coverity scan issues
2022-07-06 20:15:58 +05:30
Mark Stapp
bd7e1bf675
Merge pull request #11540 from opensourcerouting/typesafe-assume-explain
lib: use assume() for SA fixing, add explainer
2022-07-06 09:52:05 -04:00
Mobashshera Rasool
8d0f0b02f3 pimd: During prune pending, behave as NOINFO state
Fixed ANVL Conformance PIM-SM 16.3 test case.

When (S,G,rpt) prune is received, we were installing
the mroute immediately with none as OIF.
This leads to dropping the (S,G) traffic during prune
pending time as well.

Also we should not install the mroute if there is no
change in the rpf update.

These 2 things lead to the failure of the test case.

Fixed it by blocking the installation in this scenario.
When prune pending timer pops, it will take care of
installing the mroute with  none as OIF.

Fixes: #11535

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-07-06 05:18:38 -07:00
Rafael Zalamena
f14233edbd bfdd: fix coverity memory overrun
Use the destination for the operator `sizeof()` instead of the source
which could (and is) be bigger than destination.

We are not truncating any data here it just happens that the zebra
interface data structure hardware address can be bigger due to different
types of interface.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2022-07-06 07:52:17 -03:00
Rafael Zalamena
500fe387a0 bfdd: fix coverity scan resource leak
Close the descriptor if something fails and we don't return it.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2022-07-06 07:49:56 -03:00
sarita patra
e6e5300636 pim6d: Pass pim_addr for pim_nht callbacks.
For pim callbacks, we pass pim_addr as value, not pointer.
So making it consistent for pim_nht callbacks.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-06 02:56:43 -07:00
sarita patra
b502add84f pimd: Adjust rpf_addr in show commands
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-06 02:56:42 -07:00