Commit Graph

28532 Commits

Author SHA1 Message Date
Donatas Abraitis
00b0b74847
Merge pull request #11145 from donaldsharp/bgp_capability
Bgp capability
2022-05-05 22:28:56 +03:00
Donatas Abraitis
f2ca5c5b95 bgpd: Add CLI knob to enable graceful restart for BGP notifications
N-bit flag should be exchanged in BGP OPEN messages, not only when the
bgpd is restarted/started.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-05 12:35:03 +03:00
Donatas Abraitis
50f1f2e724
Merge pull request #11059 from anlancs/fix/bgpd-evnp-wrong-check-hashget
bgpd: fix memory leak for evpn
2022-05-04 21:19:51 +03:00
Donald Sharp
d98de984a9
Merge pull request #11144 from ton31337/fix/bgp_notification_gr
bgpd: Fix memory leak for bgp_notify_receive()
2022-05-04 12:05:50 -04:00
Donald Sharp
28168b1bf6 bgpd: peer groups should not toggle interface based nht tracking
Peer groups when various forms of `bgp capability extended-nexthop`
is entered on them are toggling the nexthop tracking status of peers
in their peer group.  This is ok when the peer is not interface based.
But it is not ok when the peer is interface based as that it will turn
off the ability of FRR to properly work with that peer type.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-04 07:51:20 -04:00
Donald Sharp
c4786405b5 bgpd: Refuse to let interfaced peering to change capability extended-nexthop
Do not interface based peers change anything about when a
[no] neighbor <interface> capability extended-nexthop
is entered.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-04 07:51:20 -04:00
Donald Sharp
8e89adc1ed bgpd: enhanced capability is always turned on for interface based peers
FRR is displaying that the peer enhanced capability command is not
turned on when the interface is part of a peer group.  Saving the
config and then reloading actually turns it off.

Fix the code so that FRR does not display the enhanced capability
for interface based peers.

Fixes: #11108
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-05-04 07:51:14 -04:00
Donald Sharp
59ba003346
Merge pull request #11137 from opensourcerouting/if-name-len-fixes
*: standardize interface name maximum length
2022-05-04 07:44:26 -04:00
Donatas Abraitis
10d476d4b9 bgpd: Fix memory leak for bgp_notify_receive()
Initialize outer/inner bgp_notify structs to zero.

Free bgp_notify.raw_data after use.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-04 13:40:15 +03:00
Rafael Zalamena
8bc5979049
Merge pull request #11142 from patrasar/pim_register_show_fix
pimd: fixing wrong diplay registerTx
2022-05-03 17:01:30 -03:00
Donatas Abraitis
c1a68b6245 bgpd: Show which RPKI server we are connected to
Before we just showed always the first server which is wrong.

Now we have:

```
spine1-debian-11# show rpki cache-connection
Connected to group 1
rpki tcp cache 192.168.10.17 8283 pref 1
rpki tcp cache 192.168.10.17 8282 pref 2 (connected)
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-05-03 22:09:04 +03:00
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