Commit Graph

30591 Commits

Author SHA1 Message Date
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
Abhishek N R
5c1b3cd2d9 pim6d: Completing "ipv6 mld" command.
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-07-07 04:36:33 -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
David Lamparter
d1757dd5cd
Merge pull request #11521 from patrasar/pimv6_drpriority
pim6d: Fix [no] ipv6 pim drpriority command
2022-07-06 11:43:05 +02:00
sarita patra
8d61ad0f17 pimd: Handle rpf_addr in pim_ifchannel code
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-06 02:41:48 -07:00
sarita patra
6288ebcf22 pimd: Handle rpf_addr in pim nht
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-06 02:41:48 -07:00
sarita patra
5d58abc161 pimd: Handle rpf_addr in register send/recv
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-06 02:41:48 -07:00
sarita patra
fc9f6f88e5 pimd: Handle rpf_addr in join/prune processing
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-06 02:41:48 -07:00
sarita patra
5262018dbf pim6d: Handle rpf_addr in pim_msg_build_jp_groups()
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-06 02:41:47 -07:00
sarita patra
bad81cbc7b pim6d: Handle rpf_addr in on_neighbor_jp_timer()
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-06 02:41:47 -07:00
sarita patra
4a8336cfa8 pim6d: Handle rpf_addr in pim_if_addr_add()
Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-06 02:41:47 -07:00
sarita patra
6b362f9fb1 pim6d: Adjust rpf_addr in pim_tib code
In this PR, we are handling the pim_tib code
after rpf_addr modified from prefix to pim_addr.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-06 02:41:47 -07:00
sarita patra
122c31403e pim6d: Adjust rpf_addr in pim_vxlan_orig_mr_up_add
In this PR, we are handling the pim_vxlan_orig_mr_up_add()
after rpf_addr modified from prefix to pim_addr.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-06 02:41:47 -07:00
sarita patra
144035b741 pim6d: Adjust rpf_addr in pim_zebra
In this PR, we are handling the pim_zebra code
after rpf_addr modified from prefix to pim_addr.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-07-06 02:41:47 -07:00