Commit Graph

22862 Commits

Author SHA1 Message Date
Mark Stapp
86723fe89b zebra: nht resolve-via-default doesn't need force
We don't need to use the 'force' flag when processing the
resolve-via-default clis for ip and ipv6: we can just do normal
nht processing.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-12-17 11:22:09 -05:00
Mobashshera Rasool
9046b17006 pimd: when node changes from non-DR to DR S,G entry not created
1. When a node changes from non-DR to DR in the given topology,
the node was receiving both PIM Join as well as IGMP join.
Since it was already receiving PIM Join previously, ifchannel was
already present. Hence when it becomes DR, the IGMP source flag is not
set due to issue in the code. Hence it never creates S,G entry thinking
that it is not DR.

2. When pim join expires, the pim flag is not reset when ifchannel is not
deleted.

Issue: #7752

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2020-12-17 13:14:29 +00:00
Donatas Abraitis
cb75bb3173 bgpd: Strip neighbors's description to 20 chars in show bgp summary
Also make sure we do not show descriptions with whitespace characters, just
take the first splitted by whitespace.

```
root@exit1-debian-9:~/frr# vtysh -c 'show run' | grep description
 neighbor 192.168.0.2 description 12346789012345678901234567890
root@exit1-debian-9:~/frr# vtysh -c 'show ip bgp summary' | grep 192.168.0.2
192.168.0.2     4      65030         0         0        0    0    0    never Idle (Admin)        0 1234678901234567890
```

```
root@exit1-debian-9:~/frr# vtysh -c 'show run' | grep description
 neighbor 192.168.0.2 description one two
root@exit1-debian-9:~/frr# vtysh -c 'show ip bgp summary' | grep 192.168.0.2
192.168.0.2     4      65030         0         0        0    0    0    never Idle (Admin)        0 one
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-12-17 10:06:35 +02:00
Ameya Dharkar
3b0a590bf3 zebra: L3VNI to L2VNI conversion is not handled
After removal of L3VNI config, the VNI should become an L2VNI if a VxLAN
interface is present for the VNI. This case is not handled in the code.

Changes:
1. After unconfiguring L3VNI, create an L2VNI if VxLAN interface is present
for the VNI.
2. Trigger an update to BGP.
3. Read MAC and ARP entries from kernel.

This PR fixes the issue only for route type-2, 3 and 5. This PR does not address
states regarding route type-1, 4 and multicast group for VxLAN interface.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
2020-12-16 18:06:37 -08:00
Reuben Dowle
ee72f0a0eb nhrpd: Cleanup resources when interface is deleted
Currently when an interface is deleted from configuration, associated
resources are not freed. This causes memory leaks and crashes.

To reproduce this issue:
* Connect to a DMVPN hub
* Outside of frr, delete the underlying GRE interface
* Use 'no interface xxx' to delete the interface containing nhrp configurations

Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
2020-12-17 10:17:13 +13:00
Gaurav Goyal
6c9ca58766 nhrpd: Only create one child sa
In some circumstances, especicially when GRE tunnel interface does not exist,
repeated child sa requests are sent. Prevent this by only sending another
request if the child sa does not exist

Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
2020-12-17 10:17:13 +13:00
Gaurav Goyal
659fde26e0 nhrpd: Use MTU received in registration in nhs cache
Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
2020-12-17 10:17:13 +13:00
Gaurav Goyal
ac95bcefe4 nhrpd: Create route to private spoke-spoke network correctly
Currently when the first traffic to a private network causes a shortcut, an
on-link route to the private network is created on the gre interface, along
with the cache entry.

When connecting to a second IP in the same network, the kernel tries to resolve
the public IP for this private network via query to NHRP. nhrpd sees no entry
in the cache, so the packet is dropped.

The fix to this solution can be instead of creating an on-link route, create an
off-link route to private network, with the next-hop being the remote tunnel's
gre IP address.

Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
2020-12-17 10:17:13 +13:00
Gaurav Goyal
ddd8d8c845 nhrpd: Clear shortcut routes properly for all protocols
Currently when nhrp shortcuts are purged they will not be recreated. This
patch fixes that by ensuring the shortcut routes get purged correctly.

This situation can be reproduced by first allowing a shortcut to be created
then clearing the shortcut:
clear ip nhrp cache
clear ip nhrp shortcuts

Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
2020-12-17 10:17:07 +13:00
Timo Teräs
46d380217d nhrpd: add reference to net.ipv4.ip_forward_use_pmtu=1 thread
Add a mailing list reference regard net.ipv4.ip_forward_use_pmtu=1.

Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
2020-12-17 10:04:13 +13:00
Timo Teräs
6cfd90f353 nhrpd: change ipsec SA count to 32-bit
Under certain misconfigurations, the SA count can be unusually high
and wrap 8-bit counter. That leads to premature free, and crash.
Make the count 32-bit to avoid crash in these rare conditions.

Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
2020-12-17 10:04:12 +13:00
Amol Lad
f7f9a3770e nhrpd: Set correct prefix length in nhrp registration
RFC2332 section 5.2.1 states (regarding the uniqueness bit) that:

       Note that when this bit is set in an NHRP Registration Request, only a
       single CIE may be specified in the NHRP Registration Request and that
       CIE must have the Prefix Length field set to 0xFF. the prefix length is
       the widest acceptable destination protocol address prefix. However, if
       "Uniqueness" bit is set  then it must be 255

This patch implements this requirement, which fixes interoperability with Cisco
NHRP hub routers.

Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
2020-12-17 10:03:14 +13:00
Mark Stapp
91653aefd4
Merge pull request #7744 from donaldsharp/end_configuration
End configuration changes
2020-12-16 13:47:24 -05:00
Mark Stapp
764785a2b1
Merge pull request #7719 from mkoskar/patch-1
doc: Remove duplicate word
2020-12-16 08:46:24 -05:00
Miroslav Koškár
c13479d02b
doc: Remove duplicate word
"FRR is currently currently implementing ..."

Signed-off-by: Miroslav Koškár <mk@mkoskar.com>
2020-12-16 07:29:21 +01:00
Jafar Al-Gharaibeh
d1e82cfd18
Merge pull request #7739 from mobash-rasool/pim-fixes
pimd: correcting the  definition for  Mroute flag "R"
2020-12-15 16:14:32 -06:00
Donald Sharp
77f7b4b018 vtysh: When dry-running no need to start/end configuration
When doing a dry run don't send start/end configuration
commands.

Ticket: CM-32665
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-12-15 15:33:17 -05:00
Donald Sharp
8de2b3d990 lib, vtysh: Modify start/end configuration commands to be more hidden
There exists a world where some people have put `end` in their
configuration.  Then vtysh will command search for it and find
it and then bad things happen.

Ticket: CM-32665
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-12-15 15:33:17 -05:00
Patrick Ruddy
b93a15d912
Merge pull request #7634 from AnuradhaKaruppiah/df-fixes
evpn-mh: DF fixes
2020-12-15 18:17:51 +00:00
Anuradha Karuppiah
35f5c31b0e zebra: add support for DF delay timer
When a new ES is created it is held in a non-DF state for 3 seconds
as specified by RFC7432. This allows the switch time to import
the Type-4 routes from the peers. And the peers time to rx the new
Type-4 route.

root@torm-11:mgmt:~# vtysh -c "show evpn es 03:44:38:39:ff:ff:01:00:00:01"|grep DF
 DF status: non-df
 DF delay: 00:00:01
 DF preference: 50000
root@torm-11:mgmt:~# vtysh -c "show evpn es 03:44:38:39:ff:ff:01:00:00:01"|grep DF
 DF status: df
 DF preference: 50000
root@torm-11:mgmt:~#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-12-15 10:03:50 -08:00
Anuradha Karuppiah
0109f42f86 zebra: display DF status only for local ESs
For remote ESs it is not relevant and confuses the admin.

Local ES sample -
===============
root@torm-11:mgmt:~# vtysh -c "show evpn es 03:44:38:39:ff:ff:01:00:00:01"
ESI: 03:44:38:39:ff:ff:01:00:00:01
 Type: Local,Remote
 Interface: hostbond1
 State: up
 Bridge port: yes
 Ready for BGP: yes
 VNI Count: 10
 MAC Count: 3
 DF: status: df preference: 50000 >>>>>>>>>>>>>>>
 Nexthop group: 536870913
 VTEPs:
     27.0.0.16 df_alg: preference df_pref: 32767 nh: 268435465
     27.0.0.17 df_alg: preference df_pref: 32767 nh: 268435466

root@torm-11:mgmt:~#

Remote ES sample -
===============
root@torm-11:mgmt:~# vtysh -c "show evpn es 03:44:38:39:ff:ff:02:00:00:01"
ESI: 03:44:38:39:ff:ff:02:00:00:01
 Type: Remote
 Interface: -
 Ready for BGP: no
 VNI Count: 0
 MAC Count: 6
 DF: status: - preference: 0 >>>>>>>>>>>>>>>
 Nexthop group: 536870919
 VTEPs:
     27.0.0.18 nh: 268435464
     27.0.0.19 nh: 268435467
     27.0.0.20 nh: 268435461

root@torm-11:mgmt:~#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-12-15 10:02:03 -08:00
Patrick Ruddy
a119a429e4
Merge pull request #7637 from AnuradhaKaruppiah/evpn-pim-fixes
evpn-pim: cleanup and display fixes
2020-12-15 17:36:24 +00:00
Patrick Ruddy
bedf36e327
Merge pull request #7636 from AnuradhaKaruppiah/type-0-esi
zebra: support for type-0 ESI
2020-12-15 17:33:46 +00:00
Patrick Ruddy
01c65ba77e
Merge pull request #7633 from AnuradhaKaruppiah/protodown-fixes
evpn-mh: protodown handling fixes
2020-12-15 17:23:32 +00:00
Mobashshera Rasool
e9376c880a pimd: correcting the definition for Mroute flag "R"
The flag "R" in below display description denotes the
SGRpt Pruned but the description shows something else
hence correcting the definition.

R2(config)# do show ip mroute
IP Multicast Routing Table
Flags: S- Sparse, C - Connected, P - Pruned
R - RP-bit set, F - Register flag

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2020-12-15 12:36:34 +00:00
Russ White
30ff2a502e
Merge pull request #7717 from ranjanyash54/2368
ospf6d: ospfv3 disable on the interface, but interface prefix still s…
2020-12-15 07:29:10 -05:00
Russ White
5eabac6542
Merge pull request #7728 from mobash-rasool/pim-fixes
ospf6d: Link LSA is not updated when router priority is modified
2020-12-15 07:22:06 -05:00
Russ White
a1333d8e47
Merge pull request #7735 from ton31337/fix/move_to_options_bgp_master_extra_zebra_data
bgpd: Use bgp master flags for send extra data to zebra
2020-12-15 07:14:17 -05:00
Russ White
930c9b7be8
Merge pull request #7736 from ton31337/fix/s_addr_INADDR_ANY
*: Replace s_addr check agains 0 with INADDR_ANY
2020-12-15 07:12:49 -05:00
Russ White
c3ec6a822b
Merge pull request #7737 from mjstapp/fix_ospf_vty_ntoa
ospfd: avoid inet_ntoa
2020-12-15 07:11:00 -05:00
Mark Stapp
ce513ac615 ospfd: avoid inet_ntoa
some recent commits re-introduced use of inet_ntoa() - fix
them.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-12-14 17:01:18 -05:00
Donatas Abraitis
3a6290bdd1 *: Replace s_addr check agains 0 with INADDR_ANY
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-12-14 21:03:38 +02:00
Stephen Worley
3bece1e0e3
Merge pull request #7162 from opensourcerouting/zebra-human-netlink
zebra: human readable netlink dumps
2020-12-14 14:03:35 -05:00
Donatas Abraitis
ec0acb8052 bgpd: Use bgp master flags for send extra data to zebra
root@exit1-debian-9:~/frr# vtysh -c 'conf' -c 'bgp send-extra-data zebra'
root@exit1-debian-9:~/frr# vtysh -c 'show run' | grep send-extra
root@exit1-debian-9:~/frr# vtysh -c 'conf' -c 'no bgp send-extra-data zebra'
root@exit1-debian-9:~/frr# vtysh -c 'show run' | grep send-extra
no bgp send-extra-data zebra

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-12-14 20:33:41 +02:00
Anuradha Karuppiah
dc261b8de4 zebra: restart start-up delay timer when the first uplink comes up
When all the uplinks go down the VTEP is disconnected from the
VxLAN overlay and this was handled by proto-downing the ES bonds. When
the uplinks come up again we need to re-enable the ES bonds but that
needs to be done after a delay to allow the EVPN network to converge.

And that is done by firing off the startup-delay timer on first
uplink-up.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-12-14 10:32:41 -08:00
Anuradha Karuppiah
2bcf92e18b zebra: re-sync protodown state with the dplane on new ES add
1. When a bond is associated with an ES we may need to re-sync
the dplane protodown state (which maybe stale/set by some other
app).
2. Also change the uplink state display to avoid confusion with
protodown reason code (both used to show uplink-up).

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-12-14 10:32:40 -08:00
Anuradha Karuppiah
26ba45e33d zebra: update protodown display
protodown state is a combination of the dplane and zebra states.
protodown reason is maintained exclusively by zebra. Display this
information on two separate lines to make that ownership clearer.

Also display n/a for bonds as the dplane doesn't support protodowning
the bond device.

Sample output -
==============
root@torm-11:mgmt:~# vtysh -c "show interface hostbond1"|grep -i protodown
  protodown: off (n/a)
  protodown reasons: (uplinks-down)
root@torm-11:mgmt:~# vtysh -c "show interface swp5"|grep -i protodown
  protodown: on
  protodown reasons: (uplinks-down)
root@torm-11:mgmt:~#

PS: Cosmetic changes only, no functional change.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-12-14 10:32:40 -08:00
Anuradha Karuppiah
5c84327054 zebra: re-sync protodown state when a port/mbr is linked to an ES-bond
The code for this was already there but was not kicking in because of a
zebra local reason-code dup check. Even if the reason-code is the same,
if the dplane and zebra disagree about the protodown state zebra will
need to re-program the dplane.

Fixed a couple of spelling errors in the protodown logs to make greps
easy.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-12-14 10:32:40 -08:00
Patrick Ruddy
c2dba6e5b8
Merge pull request #7726 from chiragshah6/mdev
bgpd: fix evpn route-map vni filter at origin
2020-12-14 16:28:09 +00:00
Donatas Abraitis
219218d964
Merge pull request #7664 from donaldsharp/global_bgp_wait
Global bgp wait
2020-12-14 10:28:02 +02:00
Mobashshera Rasool
bb4c56616f ospf6d: Link LSA is not updated when router priority is modified
Issue: #7727

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2020-12-14 07:57:13 +00:00
Yash Ranjan
4a30f0568f ospf6d: ospfv3 disable on the interface, but interface prefix still shown in the output
When the ospfv3 interface is disabled by the command "no interface <eth> area <area-id>
the linked interface prefixes does not get flushed

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2020-12-13 05:50:57 -08:00
Chirag Shah
5bbd2cc1e6 bgpd: fix evpn route-map vni filter at origin
evpn route-map match (filter) on vni is not working
at the origin of the routes.

evpn match vni route checks for encap type as vxlan.
the source route attribute is not set with vxlan encap
thus the match filter wouldn't work.

Ticket:CM-32554
Reviewed By:CCR-11056
Testing Done:

At source have match vni plus set statement in route-map.
Validate the origin of the route's outbound correctly sets
the 'set' statment based on match vni filter.

At origin:
route-map RM-EVPN-TE-Matches permit 10
 match evpn vni 4001
  set large-community 10:10:119

Receiving end:

Route [5]:[0]:[24]:[78.41.1.0] VNI 4001
5550
  27.0.0.15 from TORS1(downlink-5) (27.0.0.15)
    Origin incomplete, metric 0, valid, external, bestpath-from-AS 5550, best (First path received)
    Extended Community: RT:5550:4001 ET:8 Rmac:00:02:00:00:00:4d
    Large Community: 10:10:119    <--- Large community stamped
    Last update: Thu Dec 10 22:19:26 2020

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-12-12 14:08:16 -08:00
Donald Sharp
06ee6e6dee
Merge pull request #7713 from ranjanyash54/2371
ospf6d: Fix the prefix walking for show database command for intra-prefix and link
2020-12-11 20:58:52 -05:00
Donald Sharp
3ceae22b7f Revert "zebra: When shutting down an interface immediately notify about rnh"
This reverts commit 0aaa722883.
2020-12-11 20:45:43 -05:00
Donald Sharp
89527adde7 pbrd: Pay attention to interface up/down events with nht
When an interface goes up/down we need to pay attention to this
in PBR.  In the past we were relying *only* on the nht events
but this is not sufficient for cases where an interface is flapping
up and down.  If this is happening it could be happening fast enough
that zebra is not sending nht events because they are consolidated
into a single event from it's perspective and that is the right thing
to do.  This commit will allow us to back out commit:

0aaa722883

As that commit introduced extra processing in zebra that is actually
causing issues in other places.  The problem that commit was trying
to solve should have always been handled in pbrd instead of making
zebra do work that is unnatural to it's actual flow.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2020-12-11 20:45:39 -05:00
Donald Sharp
f23e82838b
Merge pull request #7716 from ton31337/fix/print_string_for_afi_safi_mp_bgp
bgpd: Print afi/safi as strings for some zlog_debug outputs
2020-12-11 20:40:25 -05:00
Mark Stapp
7212e176ba
Merge pull request #7721 from deastoe/dplane-fpm-routes-stuck-in-queued
Routes stuck with 'q' flag when dplane_fpm_nl is in use
2020-12-11 15:19:23 -05:00
Nikolay Aleksandrov
4bcdb6086c zebra: move from NDA_NOTIFY to NDA_FDB_EXT_ATTRS
Use the new nested NDA_FDB_EXT_ATTRS attribute to control per-fdb
notifications.

PS: The attributes where updated as a part of the kernel upstreaming
hence the change.

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-12-11 12:13:36 -08:00
Anuradha Karuppiah
e2b89b611a doc: clean up evpn-mh commands
Drop unnecessary variable names in the commands.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2020-12-11 09:48:22 -08:00