Commit Graph

28421 Commits

Author SHA1 Message Date
sarita patra
007784ccff pimd: fixing wrong diplay registerTx
Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-03 08:53:47 -07:00
Donatas Abraitis
8f14ae47c1 bgpd: Add rpki reset to ENABLE node
`rpki stop` and `rpki start` were already, let's add `rpki reset` as well.

Instead of going into configure mode.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-03 17:11:29 +03:00
Donatas Abraitis
0e3d96bf4b bgpd: Convert some variables from int to bool for RPKI
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-03 17:11:29 +03:00
Donatas Abraitis
c70fdb2794 doc: Add missing commands for RPKI
rpki expire_interval
	rpki retry_interval

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-03 17:11:29 +03:00
Donatas Abraitis
d67485c67a bgpd: Make sure we print stats if we are sync at least with a single group
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-03 17:11:29 +03:00
Donatas Abraitis
d2e3f8a203 Revert "bgpd: Handle TCP connection errors with connection callbacks for RPKI"
This reverts commit db3aca462b.

Connection handling is already fixed in librtr 0.8.0.
https://github.com/rtrlib/rtrlib/releases/tag/v0.8.0

179e7efb59

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-03 17:10:07 +03:00
Donatas Abraitis
d18ca3ad14 Revert "bgpd: Fix while(read()) for RPKI sync callback"
This reverts commit b4fc876a32.
2022-05-03 15:08:35 +03:00
Sri Mohana Singamsetty
bf81632610
Merge pull request #11110 from anlancs/fix/bfdd-wrong-local
bfdd: fix wrong local address of display command
2022-05-02 16:53:42 -07:00
Donatas Abraitis
4f43a04cd1
Merge pull request #11136 from donaldsharp/stupidity
tests: Use XCALLOC instead of XMALLOC for threads
2022-05-02 22:48:38 +03:00
Donald Sharp
cd5b52482a
Merge pull request #11128 from opensourcerouting/feature/rfc8538
bgpd: Implement GR N-Bit and CEASE/Hard Reset notification
2022-05-02 14:08:04 -04:00
Donald Sharp
53f60d5d5b
Merge pull request #11113 from opensourcerouting/pim6-icmp6-replace-bpf
pim6d: use ICMP6_FILTER instead of BPF on mroute
2022-05-02 13:19:47 -04:00
Donald Sharp
6c65d0e8dc
Merge pull request #11132 from anlancs/fix/bgpd-prefix
bgpd: delay "stream_new" in str2prefix_rd()
2022-05-02 13:17:08 -04:00
Donald Sharp
b7597a8532 tests: Use XCALLOC instead of XMALLOC for threads
Someone decided to do malloc testing over make check.

Fixes: #11120
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-02 13:00:47 -04:00
anlan_cs
8e3aae66ce *: remove the checking returned value for hash_get()
Firstly, *keep no change* for `hash_get()` with NULL
`alloc_func`.

Only focus on cases with non-NULL `alloc_func` of
`hash_get()`.

Since `hash_get()` with non-NULL `alloc_func` parameter
shall not fail, just ignore the returned value of it.
The returned value must not be NULL.
So in this case, remove the unnecessary checking NULL
or not for the returned value and add `void` in front
of it.

Importantly, also *keep no change* for the two cases with
non-NULL `alloc_func` -
1) Use `assert(<returned_data> == <searching_data>)` to
   ensure it is a created node, not a found node.
   Refer to `isis_vertex_queue_insert()` of isisd, there
   are many examples of this case in isid.
2) Use `<returned_data> != <searching_data>` to judge it
   is a found node, then free <searching_data>.
   Refer to `aspath_intern()` of bgpd, there are many
   examples of this case in bgpd.

Here, <returned_data> is the returned value from `hash_get()`,
and <searching_data> is the data, which is to be put into
hash table.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-05-03 00:41:48 +08:00
anlan_cs
ac390ef8ac bgpd: fix memory leak for evpn
If `hash_get()` returns NULL, the list created with
`list_new()` is not be freed.

Since `hash_get()` should not fail, we don't need
`list_delete()` and other boring `XFREE()`s for its
failure case.

Just ignore returning value of `hash_get()` in these
cases.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-05-03 00:41:48 +08:00
Rafael Zalamena
79378e4d10 lib: change FRR interface name length definition
Use the OS provided maximum name length instead of defining an arbitrary
one.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2022-05-02 13:03:19 -03:00
Rafael Zalamena
3682bd90f3 *: use FRR interface name definition everywhere
Don't rely on the OS interface name length definition and use the FRR
definition instead.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2022-05-02 13:00:12 -03:00
ewlumpkin
e9cea444a4 bfdd: remove "local_address" of bfd session
The "local_address" of bfd is only used in `show bfd peers brief`
for single hop sessions which are configured without "local address".
Since it is set by destination address of received packet, not
completely correct, so remove it.

Signed-off-by: ewlumpkin <ewlumpkin@gmail.com>
Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-05-02 10:40:53 -04:00
Rafael Zalamena
024e37fd87 pbrd: fix interface compare usage
Don't use `strncmp` when we expect to match the whole string.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2022-05-02 11:33:48 -03:00
Rafael Zalamena
5bcc6b469c bgpd: fix interface name compare
We always want to compare the whole string, lets not use `strncmp` for
this case.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2022-05-02 11:33:48 -03:00
anlan_cs
af785cf2df bgpd: delay "stream_new" in str2prefix_rd()
`stream_new` in `str2prefix_rd()` can be called after some
checkings are passed, so the last `if (s)` in this fuction will
make sense.

Additionally some changes for `str2prefix_rd()`:
1) Use `RD_BYTES` instead of hard number for `stream_new()`
2) Remove unnecessary `lret` variable

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-05-02 09:23:51 -04:00
mobash-rasool
de416e6782
Merge pull request #10742 from plsaranya/pim_register
pim6d: Register message send handling
2022-05-02 13:16:03 +05:30
Donatas Abraitis
eea685b6d3 bgpd: Implement CEASE/Hard Reset notification
Also, add N-Bit (Notification) flag for Graceful Restart.

This is a preparation for RFC8538.

More information: https://datatracker.ietf.org/doc/html/rfc8538

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-02 09:43:40 +03:00
Donatas Abraitis
e3209edce7
Merge pull request #11119 from kuldeepkash/pim_v6
tests: [PIMv6] Using generic names for PIM verification APIs
2022-04-30 17:04:38 +03:00
Kuldeep Kashyap
4fafd29f0f tests: [PIMv6] Using generic names for pim verification APIs
1. Modified pim APIs name to generic one, same APIs would be used for PIMv4 and PIMv6
verifications
2. Modified all affacted scripts and ran multiple times locally to avoid CI failures

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2022-04-30 10:57:31 +05:30
Igor Ryzhov
23a8660ea4
Merge pull request #11122 from ak503/bgp_esi_str
bgpd: fix size of esi_buf
2022-04-29 18:59:59 +03:00
Donald Sharp
9ad0725081
Merge pull request #11118 from opensourcerouting/time-fmt-nulls
lib: format NULL timevals correctly
2022-04-29 10:00:05 -04:00
Dmitrii Turlupov
5f933e1eca bgpd: fix size of esi_buf
Fixes: #11111
Signed-off-by: Dmitrii Turlupov <dturlupov@factor-ts.ru>
2022-04-29 14:56:25 +03:00
David Lamparter
46a3bfa695
Merge pull request #10988 from AbhishekNR/ipv6_mroute_cli 2022-04-29 10:23:37 +02:00
mobash-rasool
c4aa8aa669
Merge pull request #11114 from opensourcerouting/vrf-declvar-macros
lib, zebra, pimd: clean up/fix VRF DECLVAR macros
2022-04-29 13:53:08 +05:30
David Lamparter
ac83c58ddd
Merge pull request #10964 from mobash-rasool/pim-zebra
zebra, pimd, pim6d: Modify code to get multicast IPv6 stats from kernel
2022-04-29 10:22:41 +02:00
plsaranya
30b277e158 pim6d: Register message send handling
Register and Null register send handling
In IPv6 PIM Null Register message if dummy PIM Header is included as
data, this dummy PIM header checksum needs to be valuated

Signed-off-by: plsaranya <Saranya_Panjarathina@dell.com>
2022-04-29 11:05:57 +05:30
Donald Sharp
4c53ec41b9
Merge pull request #11090 from ton31337/fix/plist_alist_duplicate
lib: Ignore duplicate alist/plist entries in CLI
2022-04-28 12:42:18 -04:00
David Lamparter
782fe5e450 lib: format NULL timevals correctly
Passing NULL for a `%pTVMs` would result in `(null)Ms`, i.e. the `Ms`
flags not eaten up.  Change to eat those up, and print `-` instead for
NULL times.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-28 15:51:00 +02:00
Donald Sharp
8bb5f1db16
Merge pull request #11107 from opensourcerouting/prefix-more-unionizing
lib: `struct prefix` spring cleaning
2022-04-28 08:25:30 -04:00
sarita patra
53749ba70b pimd: Print secondary address using %pFX
Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-28 03:28:17 -07:00
sarita patra
d58395d1f3 pim6d: Adjust IPV6 secondary address list
Within one Address List Hello option, all the addresses MUST be of
the same address family.  It is not permitted to mix IPv4 and IPv6
addresses within the same message.  In addition, the address family
of the fields in the message SHOULD be the same as the IP source and
destination addresses of the packet header.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-04-28 03:27:42 -07:00
Mobashshera Rasool
0696c2ff20 pim6d: Make pim_zlookup_sg_statistics available for v6
Since pim_zlookup.c is available for pimv6,
Call pim_zlookup_sg_statistics api for v6.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-04-28 02:40:56 -07:00
Abhishek N R
f5e14dff2b doc: Updated the doc for show ipv6 mroute commands
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-04-28 02:17:13 -07:00
Abhishek N R
74e8197b33 pim6d: Implementing "show ipv6 mroute summary" CLI
Adding new show CLI to display ipv6 mroute summary information.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-04-28 02:14:49 -07:00
Abhishek N R
c41a9dcfa2 pim6d: Implementing "show ipv6 mroute count" CLI
Adding new show CLI to display ipv6 mroute count information.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-04-28 02:14:49 -07:00
Abhishek N R
50ba39bf4c pim6d: Implementing "show ipv6 mroute" CLI
Adding new show CLI to display ipv6 mroute information.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-04-28 02:14:48 -07:00
David Lamparter
0cbed9511a lib, zebra, pimd: clean up/fix VRF DECLVAR macros
There's a common pattern of "get VRF context for CLI node" here, which
first got a helper macro in zebra that then permeated into pimd.

Unfortunately the pimd copy wasn't quite adjusted correctly and thus
caused two coverity warnings (CID 1517453, CID 1517454).

Fix the PIM one, and clean up by providing a common base macro in
`lib/vty.h`.

Also rename the macros (add `_VRF`) to make more clear what they do.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-28 11:09:26 +02:00
David Lamparter
fef295d439 pim6d: use ICMP6_FILTER instead of BPF on mroute
The ICMP6_FILTER option is always checked by the kernel, so the cost is
taken whether or not anything is set there.  Use it instead of taking on
additional cost with a BPF program.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-04-28 10:46:57 +02:00
Abhishek N R
1d06e3547a zebra: Removed show_ipv6_mroute cli from zebra_vty.c
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-04-28 01:43:19 -07:00
Abhishek N R
3b767e4b6d pimd: Moving the common functions from pim_cmd.c
Moving the functions that are used by both IPV4 and IPV6 to a
common file pim_cmd_common.c file

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-04-28 01:43:19 -07:00
Mobashshera Rasool
51f4fd9810 zebra, pimd: Add a field family in the message ZEBRA_IPMR_ROUTE_STATS
1. Adding a field family in the existing ZEBRA_IPMR_ROUTE_STATS
to get the ipv4 as well as ipv6 trafic stats between pim and zebra.
2. Modify the debug to print both v4/v6 prefixes

pimd: pim6d: Modify pim_zlookup_sg_statistics to get ipv6 stats

Modify the pim_zlookup_sg_statistics api to
get ipv4/ipv6 stats from zebra. Making the api
common.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-04-28 01:10:49 -07:00
Mobashshera Rasool
4d3b4b1851 zebra: Modify base code to get ipv6 stats from kernel
Modify the structure mcast_route_data to store ipv4/ipv6
addr and lastused multicast information from kernel.
Adjust the related APIs to parse ipv4/ipv6 informations.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-04-28 01:10:49 -07:00
David Lamparter
633a50d11c
Merge pull request #11031 from AbhishekNR/v6_multicast 2022-04-28 10:06:00 +02:00
David Lamparter
89c7e4fc00
Merge pull request #11106 from donaldsharp/werror_error_error 2022-04-28 09:49:49 +02:00