Commit Graph

29152 Commits

Author SHA1 Message Date
Donatas Abraitis
5f771a2a70
Merge pull request #11043 from mobash-rasool/spell-fix
pimd, pim6d: Spelling fixes
2022-04-19 12:50:12 +03:00
anlan_cs
4e5bda347c zebra: cleanup duplicated "extern"s for evpn-mh
There are some duplicated `extern`s in this header
file, just remove them.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-04-19 05:20:10 -04:00
Mobashshera Rasool
3d4c335568 pim6d: Correct the spelling of Rendezvous
Rendevous --> Rendezvous
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-04-18 23:17:43 -07:00
Mobashshera Rasool
a6324d6a30 pimd: Correct the spelling of Rendezvous
Rendevous --> Rendezvous
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-04-18 23:17:43 -07:00
Jafar Al-Gharaibeh
33dfcd7397
Merge pull request #10993 from donaldsharp/more_watchfrr_info
watchfrr: Add some more information to `show watchfrr`
2022-04-18 22:43:35 -05:00
Jafar Al-Gharaibeh
4079cda2e6
Merge pull request #11032 from anlancs/fix/bgpd-evpn-mh-null-debug
bgpd: fix NULL deference in evpn-mh's log
2022-04-18 22:42:03 -05:00
Igor Ryzhov
5b53523466
Merge pull request #11029 from rampxxxx/isis_mtu 2022-04-19 02:17:25 +03:00
Donald Sharp
7f2e9cce7f bgpd: Allow type 5 routes to be handled better when link is flapping
In some stress testing, we are seeing type-5 evpn routes being
left in a rejected state in zebra.

Sequence of events as I am seeing it:

a) Interface comes up that type5 routes nexthop depends on
b) zebra processes creates the connected and lets bgp know via nht
c) bgp installs the route to zebra
d) zebra processes and sends install to kernel
e) before route is installed, the interface the nexthop points at flaps
f) the route install is rejected, notify zebra
g) the interface comes up
h) zebra gets the notification about the route install rejection
i) zebra processes the down/up and turns it into a single up event
j) BGP never reinstalls the type 5 route

This up event does not translate into a nexthop tracking event
when the events happen quickly enough and/or zebra is extremelyh
busy and bgp would never see that the nexthops changed even very quickly.

This is the same thing that was going on with
https://github.com/FRRouting/frr/pull/7724
in PBR.

To fix this let's notice the interface up/down events for v4
in bgp now as well.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-18 14:15:23 -04:00
lynnemorrison
c7b253d0bb isisd: Fix crash in ISIS when mtu mismatch occurs
When lsp-mtu is configured larger than interface mtu and the interface
is brought up, the ISIS code would crash. When other vendors have this
misconfiguration they just continue ISIS running and allow the LSP
packets to be created but not sent. When the misconfiguration is corrected
the LSP packets start being sent. This change creates that same behavior
in FRR.

The startup issue I am hitting is when the isis lsp-mtu is larger that the interfaces mtu.
We run into this case when we are in the process of changing the mtu on a tunnel.
I issue a shutdown/no shutdown on the interface, because the tunnel MTU is smaller
than the lsp-mtu, it is considered an error and calls circuit_if_del. This deletes
part of the circuit information, which includes the circuit->ip_addr list. Later on we get
an address update from zebra and try to add the interface address to this list and crash.

2022/04/07 20:19:52.032 ISIS: [GTRPJ-X68CG] CSM_EVENT for tun_gw2: IF_UP_FROM_Z
calls isis_circuit_if_add
this initialize the circuit->ip_addrs
isis_circuit_up
has the mtu check circuit->area->lsp_mtu > isis_circuit_pdu_size(circuit) and fails
returns ISIS_ERROR
on failure call isis_circuit_if_del
this deletes the circiut->ip_addrs list <----

2022/04/07 20:19:52.032 ZEBRA: [NXYHN-ZKW2V] zebra_if_addr_update_ctx: INTF_ADDR_ADD: ifindex 3, addr 192.168.0.1/24
message to isisd to add address
isis_zebra_if_address_add
isis_circuit_add_addr
circuit->ip_addr we try to add the ip address to the list, but it was deleted above and isisd crashes

Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
2022-04-18 11:15:15 -04:00
Russ White
1258cfcd8c
Merge pull request #11001 from donaldsharp/system_route_recursion
zebra: Allow system routes to recurse through themselves
2022-04-18 09:47:47 -04:00
Donald Sharp
1cadfaf213 zebra: When zebra nexthop proto only limit errors
Operators are seeing:

Mar 28 07:19:37 kingpin zebra[418]: [TZANK-DEMSE] netlink_nexthop_msg_encode: nhg_id 68 (zebra): proto-based nexthops only, ignoring
Mar 28 07:19:37 kingpin zebra[418]: [TZANK-DEMSE] netlink_nexthop_msg_encode: nhg_id 68 (zebra): proto-based nexthops only, ignoring
Mar 28 07:19:37 kingpin zebra[418]: [YXPF5-B2CE0] netlink_route_multipath_msg_encode: RTM_DELROUTE 2804:4d48:4000::/42 vrf 0(254)
Mar 28 07:19:37 kingpin zebra[418]: [YXPF5-B2CE0] netlink_route_multipath_msg_encode: RTM_NEWROUTE 2804:4d48:4000::/42 vrf 0(254)
Mar 28 07:19:37 kingpin zebra[418]: [TVM3E-A8ZAG] _netlink_route_build_singlepath: (single-path): 2804:4d48:4000::/42 nexthop via fe80::b6fb:e4ff:fe26:c5d5  if 2 vrf default(0)
Mar 28 07:19:37 kingpin zebra[418]: [HYEHE-CQZ9G] nl_batch_send: netlink-dp (NS 0), batch size=140, msg cnt=2
Mar 28 07:19:37 kingpin zebra[418]: [P2XBZ-RAFQ5][EC 4043309074] Failed to install Nexthop ID (68) into the kernel

When `zebra nexthop proto only` is turned on.

Effectively zebra intentionally does not do the nexthop group installation
and the dplane notification in zebra_nhg.c just assumes it was a failure
and prints an error message.  Since this act was intentional, let's
just notice that it was intentional and not report the message
as a failure.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-18 09:41:38 -04:00
Donald Sharp
603fef0e23 watchfrr: Add some more information to show watchfrr
To allow people to know the state of watchfrr from vtysh,
let's add a bit more data to the output.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-18 09:32:29 -04:00
Yash Ranjan
ec58bf6f24 ospf6d: Check for MinLSInterval timer when adding to LSUpdate list
A router has some static routes and redistributes turned on.
"clear ipv6 ospf process" command is applied. Then static routes
are deleted. In 1 in 5 runs, AS-External LSAs are not getting removed
from the neighbors even though it gets removed from its own LSDB.

Because of the clear process command, MAX_AGE LSAs are advertised and
fresh LSAs are installed in the LSDB. When the MAX_LSAs are advertised
back to the same router as part of the flooding process, it gets added
to the LSUpdate list even though it comes inside the MinLSArrival time.
When the static routes get deleted, it removed the LSA from the
LSRetrans list but not from LSUpdate list. The LSAs present in the
LSUpdate list gets advertised when sending LS Updates.

When an old copy of an LSA is more recent than the new LSA, check if it
has come inside the MinLSArrival time before adding to the LSUpdate
list.

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
2022-04-17 21:55:22 -07:00
Russ White
eb3bd82451
Merge pull request #11028 from ton31337/fix/pass_non_transitive_communities_via_rsclient
bgpd: Pass non-transitive ext-communities between Route Server and RS clients
2022-04-15 16:04:04 -04:00
anlan_cs
46281b21af bgpd: fix NULL deference in evpn-mh's log
Fix NULL deference issue in log. And change one word - "vtep",
it should be with lowercase letters like other places.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-04-14 11:10:32 -04:00
Nobuhiro MIKI
9fa4ae2943 bgpd: take SRv6 locator's prefix length into account when generating SIDs
Until now, it has been hard-coded that the position at which the label
is inserted is from the 64th bits. Therefore, when the Locator prefix
was not /64, incorrect SIDs were generated. Also, SIDs are generated
in duplicate on Lines 604 & 613 in bgpd/bgp_mplsvpn.c.

In this patch, the position where the label is inserted is calculated
based on the sum of block_bits_length and node_bits_length (i.e., the
user-specified Locator prefix length). In addition, SID generation is
performed at one location in alloc_new_sid.

Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp>
2022-04-14 14:37:55 +09:00
Donatas Abraitis
b17d5444f4 bgpd: Pass non-transitive ext-communities between Route Server and RS clients
https://datatracker.ietf.org/doc/html/rfc7947#section-2.2

Optional recognized and unrecognized BGP attributes,
   whether transitive or non-transitive, SHOULD NOT be updated by the
   route server (unless enforced by local IXP operator configuration)
   and SHOULD be passed on to other route server clients.

By default LB ext-community works with iBGP peers. When we receive a route
from eBGP peer, we can send LB ext-community to iBGP peers.

With this patch, allow sending LB ext-community to iBGP/eBGP peers if they
are set as RS clients.

FRR does not send non-transitive ext-communities to eBGP peers, but for
example GoBGP sends and if it's set as RS client, we should pass those attributes
towards another RS client.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-14 08:36:20 +03:00
Nobuhiro MIKI
808ad1b617 bgpd: fix memory leak
Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp>
2022-04-14 10:07:22 +09:00
Sri Mohana Singamsetty
926e00236e
Merge pull request #10910 from donaldsharp/doc_nht
doc: Add `show ip nht..` documentation
2022-04-13 12:28:43 -07:00
Russ White
0d523362d6
Merge pull request #10978 from anlancs/bgpd-cleanup-6
bgpd: cosmetic change for evpn-mh
2022-04-13 15:27:39 -04:00
Sri Mohana Singamsetty
af280434ed
Merge pull request #10996 from donaldsharp/watchfrr_systemd_interactions
watchfrr: Send operational state to systemd
2022-04-13 12:26:15 -07:00
Russ White
bd751c0700
Merge pull request #10987 from opensourcerouting/fix/bgp_conditional_advertisements_rmap_change_peer_groups
bgpd: Do not forget to update conditional advertisements rmaps for peer-groups
2022-04-13 15:00:14 -04:00
Russ White
8a86917097
Merge pull request #11024 from anlancs/bgpd-fix-missing-newline
bgpd: fix wrong check for default VRF
2022-04-13 14:56:00 -04:00
Russ White
5dd323579a
Merge pull request #11025 from anlancs/bgpd-remove-l3nhg-control
bgpd: remove unnecessary l3nhg knob for evpn-mh
2022-04-13 14:55:29 -04:00
Russ White
6a1dbeba2f
Merge pull request #11010 from opensourcerouting/feature/reuse_bgp_attr_set_community_for_flags
bgpd: Reuse bgp_attr_set_[el]community() for setting attribute flags
2022-04-13 14:54:30 -04:00
Russ White
a39df8492d
Merge pull request #11009 from opensourcerouting/fix/med_for_aggregate-address
bgpd: aggregate-address fixes
2022-04-13 14:53:14 -04:00
Russ White
7c6316c521
Merge pull request #11013 from opensourcerouting/fix/convert_bgp_peer_sort_t_to_enum
bgpd: typedef enum to enum
2022-04-13 14:52:58 -04:00
Donatas Abraitis
cd876f8a78
Merge pull request #10935 from anlancs/zebra-mh-esi-warning
zebra: adjust the warnings for ESI of evpn-mh
2022-04-13 15:45:07 +03:00
mobash-rasool
4e3ccd396c
Merge pull request #10931 from g-balaji1/pimv6-ssm-cmds
pim6d: Addition of ipv6 ssmpingd config commands
2022-04-13 15:50:31 +05:30
Donatas Abraitis
a1d5f4ceab
Merge pull request #10972 from iqras23/default_originate
bgpd: Metric not set with default route
2022-04-13 13:13:00 +03:00
anlan_cs
c2b7d418f7 bgpd: remove unnecessary l3nhg knob for evpn-mh
Remove unnecessary `install_l3nhg` knob because it has already
been controlled by the command: "[no$no] use-es-l3nhg".

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-04-13 05:17:08 -04:00
anlan_cs
4a5271a56b bgpd: fix wrong check for default VRF
Currently the warning is wrong:
```
root#show bgp vrf default vni
BGP instance for VRF default not foundACC1(config)#
```

Two changes for "show bgp vrf VRFNAME vni [json]":
- Correct the default VRF check
- Add newline for warning

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-04-13 05:00:33 -04:00
Abhishek N R
80a82b567f pimd: Changing PIM_OIF_FLAG_PROTO_IGMP to PIM_OIF_FLAG_PROTO_GM
Modified marco name so that it can be reused in mld.

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-04-13 01:19:03 -07:00
mobash-rasool
5cc9af2a6d
Merge pull request #10969 from donaldsharp/test_multicast_remove_support_bundle_collection
tests: Fix test_multicast_pim_sm_topo3.py from generating a support b…
2022-04-13 12:12:41 +05:30
Abhinay Ramesh
f78cfba9c9 bgpd: Metric not set with default route.
Description:
- When default route is originated using the
  neighbor default-originate command, MED is
  not set as part of the update message
  attribute.

- Changes are done to set the MED value and MED
  flag for default route.

Co-authored-by: Abhinay Ramesh <rabhinay@vmware.com>
Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
2022-04-12 19:55:54 -07:00
Donatas Abraitis
682abee174 bgpd: Apply frrbot styling
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-12 22:15:17 +03:00
Donatas Abraitis
e8e36ff315 bgpd: Convert bpacket_attr_vec_type to enum
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-12 22:13:55 +03:00
Donatas Abraitis
79288e4c12 bgpd: Convert bgp_attr_parse_ret_t to enum
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-12 22:13:55 +03:00
Donatas Abraitis
9c2fd3fe44 bgpd: Convert vpn_policy_direction_t to enum
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-12 22:13:55 +03:00
Donatas Abraitis
d54f55f22d bgpd: Convert bgp_policy_type_e to enum
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-12 22:13:55 +03:00
Donatas Abraitis
3061acc235 bgpd: Convert bgp_peer_sort_t to enum
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-12 22:13:55 +03:00
Donatas Abraitis
26870e2dcc bgpd: Fix styling, drop braces for single statement block
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-12 22:12:16 +03:00
Donatas Abraitis
58cf5c088a bgpd: Reuse bgp_attr_set_ecommunity() for setting attribute flags
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-12 22:09:28 +03:00
Donatas Abraitis
9d34440bf8 bgpd: Reuse bgp_attr_set_[l]community() for setting attribute flags
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-12 22:09:28 +03:00
Russ White
695c24c3b0
Merge pull request #10994 from opensourcerouting/fix/autocomplete_for_advertise_map
bgpd: Use autocomplete for route-map under conditional advertisements CLI
2022-04-12 14:40:33 -04:00
Russ White
94ee557658
Merge pull request #10999 from opensourcerouting/fix/bgp_aliases_with_community
bgpd: Allow setting BGP [large]community in route-maps
2022-04-12 14:37:58 -04:00
Mark Stapp
946fb036a3
Merge pull request #11000 from opensourcerouting/feature/show_conditional_adv_timer_in_neighbor_cli
bgpd: Show conditional advertisement timers in neighbor CLI output
2022-04-12 11:54:16 -04:00
mobash-rasool
8e53f35b5f
Merge pull request #10989 from opensourcerouting/pim-options-remove
pimd: remove pim_interface->options
2022-04-12 21:10:44 +05:30
anlan_cs
fff7545a03 bgpd: correct a few comments for evpn-mh
Correct a few evpn-mh omissions mainly on type-1 and type-4.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-04-12 09:33:06 -04:00
Balaji Gurudoss
a8caf78d61 pim6d: Addition of ipv6 ssmpingd config commands
Signed-off-by: Balaji Gurudoss <G_Balaji1@dell.com>
2022-04-12 18:07:24 +05:30