Commit Graph

29651 Commits

Author SHA1 Message Date
Donald Sharp
aa9fbdf485
Merge pull request #11749 from ad8-bdl/patch-1
doc/user/ripd: clarify unicast behaviour
2022-08-05 07:37:44 -04:00
Ben
cdbf7b0d28 doc/user/ripd: clarify unicast behaviour
Current wording _implies_ `neighbor` updates are sent unicast; this makes it explicit.

Signed-off-by: Ben L <47653825+ad8-bdl@users.noreply.github.com>
2022-08-05 17:11:43 +10:00
Donald Sharp
f07b1a9fb4
Merge pull request #11716 from mobash-rasool/fixes2
pimd, pim6d: Send register msg via reg socket, solve FHR/RP same node issue
2022-08-04 22:06:49 -04:00
Donald Sharp
41e5409857
Merge pull request #11705 from Jafaral/pim-static
pimd: fix static mroute to also take into account the input interface
2022-08-04 22:04:02 -04:00
Donald Sharp
01b7de7256
Merge pull request #11730 from SaiGomathiN/ttable
pimd, pim6d: Using ttable for displaying purpose
2022-08-04 16:40:14 -04:00
Trey Aspelund
7226bc40d6 bgpd: ignore NEXT_HOP for MP_REACH_NLRI
RFC 4760 states we SHOULD ignore the NEXT_HOP attribute for BGP Update
messages carrying only MP_REACH_NLRI attributes. Thus we should use the
Network Address of Next Hop field of the MP_REACH_NLRI as the nexthop.

Instead of always looking for BGP_ATTR_NEXT_HOP, this commit ensures:
1) we set mp_nexthop_len to BGP_ATTR_NHLEN_IPV4 for v4 bgp_static routes
2) we check mp_nexthop_len when choosing the nexthop to use for nht
3) we check mp_nexthop_len when choosing the nexthop to send to zebra
4) we check mp_nexthop_len when picking the nexthop to shown by vtysh

Reported-by: Binon Gorbutt <binon@aervivo.com>
Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2022-08-04 20:36:49 +00:00
Pdoijode
02dd2dd6c3 bgpd: addition of vxlanFlooding field to show output
Instead of changing the value of 'BUM flooding' field in
'show bgp l2vpn evpn vni' vty and JSON command from
'Head-end replication' to 'enabled', adding a new field named
'vxlanFlooding' to 'show bgp l2vpn evpn vni' vty and JSON output.

This is done to maintain backward compatibility.'BUM flooding' field
in vty and JSON output will be deprecated later.

Signed-off-by: Pooja Doijode <pdoijode@nvidia.com>
2022-08-04 11:28:33 -07:00
Trey Aspelund
109153dde8 bgpd: add BGP_ATTR_MP_NEXTHOP_LEN_IP6 macro
Move the logic to check the mp_nexthop_len against v6 lengths into its
own macro so we can apply that logic elsewhere on its own without always
checking for presence of BGP_ATTR_NEXT_HOP.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2022-08-04 17:54:42 +00:00
Donald Sharp
8bb6d4a00c
Merge pull request #11745 from mjstapp/fix_a_dot_py
*: remove test python file
2022-08-04 13:24:50 -04:00
Mark Stapp
e8fd069012 *: remove test python file
Looks like a test script was added recently; remove it.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2022-08-04 11:06:59 -04:00
Sai Gomathi N
7d1b675857 pimd, pim6d: Using ttable for displaying
Using termtable for show ip|ipv6 pim interface
for dynamic space alignments

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2022-08-04 04:35:42 -07:00
Donald Sharp
06479e6658
Merge pull request #11739 from opensourcerouting/fix/bgp_best_path_select_defer
bgpd: bgp_best_path_select_defer never returns negative
2022-08-04 07:18:47 -04:00
Mobashshera Rasool
7cf66a2220 lib: Add errno details to the sockopt_reuseaddr api
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-08-04 01:38:33 -07:00
Mobashshera Rasool
9461953914 pimd, pim6d: Send register msg via register socket
The problem here is when the same node is FHR as well as RP,
then the node keeps on sending the register packet.
Register-stop is not sent as well.

This problem has occurred because the RP is the same node
and there is no socket created on loopback interface, so the
packet is never send out and never received back on the same
node, so register recv could not be processed on the node and
hence no register-stop is sent.

Since register packets are unicast packets, its better to handle
the send of register packet via a separate register socket.
This fixes the problem mentioned above as well.

Fixes: #11331
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-08-04 00:49:10 -07:00
Donatas Abraitis
7ae6e084e2
Merge pull request #11742 from taspelund/evpn_rd_crash
bgpd: fix show bgp l2vpn evpn route rd crashes
2022-08-04 10:36:38 +03:00
Trey Aspelund
8923315db4 bgpd: fix show bgp l2vpn evpn route rd crashes
bgpd was crashing every time `show bgp l2vpn evpn route rd` was issued
with an RD that didn't match "all".  This was introduced by 9b01d28988
which changed how argv_find() is handled in various vtysh commands, but
the new changes forgot a "!".  So let's re-add the "!".

Before:
```
ub20# show bgp l2vpn evpn route rd 399672:100
vtysh: error reading from bgpd: Resource temporarily unavailable (11)Warning: closing connection to bgpd because of an I/O error!
ub20#

ub20# show bgp l2vpn evpn route rd 399672:100 mac 11:11:11:11:11:11
vtysh: error reading from bgpd: Resource temporarily unavailable (11)Warning: closing connection to bgpd because of an I/O error!
ub20#
```

After:
```
ub20# show bgp l2vpn evpn route rd 399672:100
ub20#

ub20# show bgp l2vpn evpn route rd 399672:100 mac 11:11:11:11:11:11
% Network not in table
ub20#
```

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
2022-08-04 01:50:54 +00:00
Donatas Abraitis
42c9383767 bgpd: bgp_best_path_select_defer never returns negative
Just drop the test and convert to void.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-08-03 18:43:01 +03:00
Sarita Patra
4459f499c4 pim6d: fix clear ipv6 mroute
Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-08-03 07:47:36 -07:00
Donald Sharp
3aa7d2b2c4
Merge pull request #11731 from opensourcerouting/feature/show_bgp_access-list
bgpd: Add `show bgp access-list` command
2022-08-03 10:29:30 -04:00
Stephen Worley
098a55c5f8
Merge pull request #11713 from anlancs/fix/evpn-mh-bond-redirect
zebra: fix bond down for evpn-mh
2022-08-03 10:11:08 -04:00
Donatas Abraitis
6121628609 doc: Add show bgp access-list command
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-08-03 13:27:07 +03:00
Donatas Abraitis
1aee0a44ae
Merge pull request #11722 from donaldsharp/qdb
qpb: Tell coverity the actual size we are copying
2022-08-03 13:24:10 +03:00
Donatas Abraitis
ed12638288 bgpd: Add show bgp access-list command to filter routes by ACL
The same as with prefix-list/route-maps/etc.

```
donatas-pc# show ip access-list spine
ZEBRA:
Zebra IP access list spine
    seq 5 permit 200.200.200.200/32
BGP:
Zebra IP access list spine
    seq 5 permit 200.200.200.200/32
PIM:
Zebra IP access list spine
    seq 5 permit 200.200.200.200/32
BABELD:
Zebra IP access list spine
    seq 5 permit 200.200.200.200/32
donatas-pc# show bgp ipv4 unicast access-list
  ACCESSLIST_NAME  Access-list name
     spine
donatas-pc# show bgp ipv4 unicast access-list spine
BGP table version is 9, local router ID is 172.17.0.3, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

   Network          Next Hop            Metric LocPrf Weight Path
*> 200.200.200.200/32
                    enp3s0                   0             0 65000 3456 ?

Displayed  1 routes and 10 total paths
donatas-pc#
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-08-03 12:58:14 +03:00
Donatas Abraitis
08c2bd9953
Merge pull request #11710 from donaldsharp/split_up_test_multicast_pim_static_rp
some test fixes and a coverity fix
2022-08-03 11:11:37 +03:00
anlan_cs
df6c198269 zebra: fix bond down for evpn-mh
The test case is with `redirect-off` in evpn multi-homing environment:
```
evpn mh redirect-off
```

After the environment is setup, do the following steps:
1) Let one member of ES learn one mac:
```
2e:52:bb:bb:2f:46 dev ae1 vlan 100 master bridge0 static
```
Now everything is ok and the mac can be synced to other ES peers.

2) Shutdown bond1. At this time, zebra will get three netlink messages,
not one as current code expected. Like:
```
e4:f0:04:89:b6:46 dev vxlan10030 vlan 30 master bridge0 static <-A
e4:f0:04:89:b6:46 dev vxlan10030 nhid 536870913 self extern_learn <-B
e4:f0:04:89:b6:46 dev vxlan10030 vlan 30 self <-C
```

With A), zebra will wrongly remove this mac again:
```
ZEBRA: dpAdd remote MAC e4:f0:04:89:b6:46 VID 30
ZEBRA: Add/update remote MAC e4:f0:04:89:b6:46 intf vxlan10030(26) VNI 10030 flags 0xa01 - del local
ZEBRA: Send MACIP Del f None  MAC e4:f0:04:89:b6:46 IP (null) seq 0 L2-VNI 10030 ESI - to bgp
```

With C), zebra will wrongly add this mac again:
```
ZEBRA: Rx RTM_NEWNEIGH AF_BRIDGE IF 26 VLAN 30 st 0x2 fl 0x2 MAC e4:f0:04:89:b6:46 nhg 0
ZEBRA: dpAdd remote MAC e4:f0:04:89:b6:46 VID 30
```

zebra should skip the two messages with `vid`. Otherwise, it will send many
*wrong* messages to bgpd, and the logic is wrong.

`nhg/dst` is in 2nd message without `vid`, it is useful to call
`zebra_evpn_add_update_local_mac()`. But it will fail with "could not find EVPN"
warning for no `vid`, can't call `zebra_evpn_add_update_local_mac()`:
With B):
```
ZEBRA: Rx RTM_NEWNEIGH AF_BRIDGE IF 26 st 0x2 fl 0x12 MAC e4:f0:04:89:b6:46 nhg 536870913
ZEBRA: dpAdd local-nw-MAC e4:f0:04:89:b6:46 VID 0
ZEBRA:         Add/Update MAC e4:f0:04:89:b6:46 intf ae1(18) VID 0, could not find EVPN
```
Here, we can get `vid` from vxlan interface instead of from netlink message.

In summary, `zebra_vxlan_dp_network_mac_add()` will process the three messages
wrongly expecting only one messsage, so its logic is wrong. Just skip the two
unuseful messages with `vid`.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-08-03 02:47:16 -04:00
mobash-rasool
ad7857099a
Merge pull request #11723 from anlancs/fix/minor-10
ospf6d: combine two conditions for lsa prefix
2022-08-03 11:53:47 +05:30
anlan_cs
22ce5803e4 ospf6d: combine two conditions for lsa prefix
For both router and network LSAs, combine the two conditions and process lsa
prefix uniformly.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-08-02 21:09:33 -04:00
Donald Sharp
c61a427870
Merge pull request #11715 from Orange-OpenSource/link_state
lib: Correct valgrind errors
2022-08-02 20:20:06 -04:00
Pooja
6f086a7f35 bgpd: BUM flooding display change
Changed BUM flooding output in 'show bgp l2vpn evpn vni'
command from 'Head-end replication' to 'Enabled'

Signed-off-by: Pooja Doijode <pdoijode@nvidia.com>
2022-08-02 15:16:14 -07:00
Donald Sharp
529766f153 qpb: Tell coverity the actual size we are copying
`struct prefix` is a superset of `struct prefix_ipv4` and
`struct prefix_ipv6`.  Let's let coverity figure it out

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-02 15:34:43 -04:00
Russ White
8372176846
Merge pull request #11721 from donaldsharp/build_checks
build: unconditionally enable format checks
2022-08-02 14:35:31 -04:00
David Lamparter
8c6f41ff1d build: unconditionally enable format checks
The format message checks done by clippy/xrelfo were still guarded
behind `--enable-dev-build`.  They've been clean and reliable, so it's
time to enable them unconditionally.

Fixes: #11680
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-08-02 10:37:55 -04:00
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
lynnemorrison
a0ffb7ddf4 Doc: Update documentation for BFD Echo.
Add information about Round Trip Time added to IPV4 BFD Echo.

Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
2022-08-02 10:09:11 -04:00
lynnemorrison
618a06fe11 BFDD: Add RTT to BFD IPV4 Echo packet processing
Add a send time into the BFD Echo packet. When the BFD Echo
packet is received back store time it took in usec. When
user issues a show bfd peer(s) command calculate and display
minimum, average, and max time it took for the BFD Echo packet
to be looped back.

Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
2022-08-02 10:09:01 -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