Commit graph

28104 commits

Author SHA1 Message Date
Donald Sharp 9f002fa5dd bgpd: Fix import check removal
Fix: 06e4e90132

Modified BGP to pay more attention the prefix returned from
zebra to ensure that a LPM wasn't accidently causing BGP
import checks to think it had a match when it did not.
This unfortunately removed the check to handle the route
removal.

This sequence of config and events would leave BGP in a bad state:
ip route 100.100.100.0/24 Null0
router bgp 32932
  bgp network import-check
  address-family ipv4 uni
    network 100.100.100.0/24

Then if you removed the static route the import check would
still think the route existed:

donatas-pc(config)# ip route 100.100.100.0/24 Null0

donatas-pc(config)# do sh ip bgp import-check-table
Current BGP import check cache:
 100.100.100.0 valid [IGP metric 0], #paths 1
  blackhole
  Last update: Sat Apr 23 22:51:34 2022

donatas-pc(config)# do sh ip nht
100.100.100.0
 resolved via static
 is directly connected, Null0
 Client list: bgp(fd 17)

donatas-pc(config)# do sh ip bgp neighbors 192.168.10.123 advertised-routes | include 100.100.100.0
*> 100.100.100.0/24 0.0.0.0                  0         32768 i

donatas-pc(config)# no ip route 100.100.100.0/24 Null0

donatas-pc(config)# do sh ip nht
100.100.100.0
 resolved via kernel
 via 192.168.10.1, enp3s0
 Client list: bgp(fd 17)

donatas-pc(config)# do sh ip bgp import-check-table
Current BGP import check cache:
 100.100.100.0 valid [IGP metric 0], #paths 1
  blackhole
  Last update: Sat Apr 23 22:51:34 2022

donatas-pc(config)# do sh ip bgp neighbors 192.168.10.123 advertised-routes | include 100.100.100.0
*> 100.100.100.0/24 0.0.0.0                  0         32768 i
donatas-pc(config)#

Fix this by moving the code to handle the prefix check to the
evaluation function and mark the bnc as not matching and actually
evaluate the bnc.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-24 17:08:12 -04:00
Donald Sharp c27892b24d
Merge pull request #11064 from opensourcerouting/fix/allow_only_euid_0_running_frrinit
tools: Allow running frrinit.sh only for EUID=0
2022-04-21 19:49:47 -04:00
Donald Sharp 41e01f438c
Merge pull request #11066 from mobash-rasool/fixes
pimd: Set new to true in igmp_get_source_by_addr api
2022-04-21 19:47:36 -04:00
Mobashshera Rasool 14c7ac504f pimd: Set new to true in igmp_get_source_by_addr api
5421bf8 commit forgot to set the parameter "new" to true
when a new source is created, have fixed it.

igmp_get_source_by_addr api is currently setting the parameter
"new" to false always. This is not right. The caller apis are using
this field to decide and based on that take actions to create timers, etc.

Its need to be set to true when a new source is created.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-04-21 05:54:40 -07:00
Donald Sharp 60d296518b
Merge pull request #11063 from opensourcerouting/feature/usage_frrinit_more
tools: Improve usage example for frrinit.sh
2022-04-20 15:04:37 -04:00
Donald Sharp 1327a85cd7
Merge pull request #11061 from pguibert6WIND/debug_isis_bfd_too
isisd: enable BFD messaging debug when isis bfd is used
2022-04-20 15:04:16 -04:00
Donald Sharp d2c5bbe381
Merge pull request #11060 from pguibert6WIND/isis_dr_resign_debug
isisd: isis_dr_resign() trace braced with debug isis events
2022-04-20 15:03:12 -04:00
Jafar Al-Gharaibeh 181b6f4377
Merge pull request #7811 from kuldeepkash/multicast_pim_dr_nondr
tests: Add multicast_pim_dr_nondr_test suite
2022-04-20 12:52:46 -05:00
Donatas Abraitis 4cf1a0c86e
Merge pull request #9757 from donaldsharp/zebra_trace
Zebra trace
2022-04-20 19:05:17 +03:00
Donatas Abraitis 0f65c5602c tools: Allow running frrinit.sh only for EUID=0
watchfrr and staticd do not require <1024 ports to be running, thus they can
start, but others fail.

We should allow only users with EUID=0 (sudo or root) running frrinit.sh.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-20 18:39:15 +03:00
Donatas Abraitis 1a8dd6f99b tools: Improve usage example for frrinit.sh
```
root@spine1-debian-11:~/frr# /usr/lib/frr/frrinit.sh
Usage:
    /usr/lib/frr/frrinit.sh <start|stop|restart|force-reload|reload|status> [namespace]
    /usr/lib/frr/frrinit.sh stop namespace1
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-20 18:08:51 +03:00
Philippe Guibert c7fd8c62d9 isisd: enable BFD messaging debug when isis bfd is used
In addition to turning on isis bfd debugging traces, the internal
bfd messaging debug is also enabled. Reversely, when isis bfd traces
are off, the internal messaging debug traces are off too.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-04-20 16:45:17 +02:00
Philippe Guibert e6605a89f1 isisd: isis_dr_resign() trace braced with debug isis events
debug isis events will also be used to not display isis_dr_resign()
event trace.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-04-20 16:37:20 +02:00
Donald Sharp 0bba3bd873 zebra: Name variable better in zebra_trace.h
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-20 09:49:36 -04:00
Donald Sharp 1239b60c06 zebra: Add tracepoint for netlink_rule_change
Add a tracepoint for the netlink_rule_change function.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-20 09:43:47 -04:00
Donald Sharp 3cee213500 zebra: Add tracepoint for netlink_route_change_read_unicast
Add a tracepoint to zebra for the netlink_route_change_read_unicast
functionality.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-20 09:43:47 -04:00
Donald Sharp 14ed061501 zebra: Add netlink_interface_addr tracepoint
Add a tracepoint for netlink_interface_addr.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-20 09:43:47 -04:00
Donald Sharp 1d80c20919 zebra: Add netlink_nexthop_change tracepoint
Add a tracepoint for the netlink_nexthop_change function.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-20 09:43:47 -04:00
Donald Sharp 097ef2afd1 zebra: Add netlink_request_intf_addr tracepoint
Add a tracepoint for the netlink_request_intf_addr function.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-20 09:43:47 -04:00
Donald Sharp d42e61420a zebra: Add initial zebra tracepoint support
Add initial zebra tracepoint support infrastructure
as well as add a frr_zebra:netlink_interface
callback.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-20 09:39:47 -04:00
Donatas Abraitis 65b9c34d4b
Merge pull request #11055 from donaldsharp/plist_crash
lib: Prevent crash after shutdown request
2022-04-20 15:15:08 +03:00
Donald Sharp dc7be57dfc
Merge pull request #10853 from plsaranya/pim_assert_fixes
pimd: assert fixes
2022-04-20 07:57:40 -04:00
Donald Sharp a71e190d44
Merge pull request #10961 from opensourcerouting/build-ms-ext
build: enable `-fms-extensions`
2022-04-20 07:51:45 -04:00
Donald Sharp 83bbdb5e14
Merge pull request #11052 from opensourcerouting/fix/log_dir_permissions
packaging: A couple of fixes for /var/log/frr
2022-04-20 07:45:08 -04:00
Donald Sharp 831a15d3e3
Merge pull request #11023 from AbhishekNR/igmp_flag
pimd: Changing PIM_OIF_FLAG_PROTO_IGMP to PIM_OIF_FLAG_PROTO_GM
2022-04-20 07:43:09 -04:00
Donatas Abraitis 3d3c38b1d4
Merge pull request #11051 from donaldsharp/speell_more
Speell more
2022-04-20 11:04:14 +03:00
mobash-rasool 1815b8f335
Merge pull request #11045 from anlancs/fix/bgpd-cleanup-8-remove
zebra: cleanup duplicated "extern"s for evpn-mh
2022-04-20 13:28:17 +05:30
Donald Sharp 8be297c8b8
Merge pull request #11046 from opensourcerouting/fix/issue_template
github: Use checkboxes for issue templates
2022-04-19 20:01:54 -04:00
Donald Sharp 4069e53960
Merge pull request #11048 from opensourcerouting/fix/fsync_before_fclose
vtysh: Call fflush+fsync before calling fclose() when saving the config
2022-04-19 18:37:18 -04:00
Donald Sharp 945f6ce22c
Merge pull request #11004 from volodymyrhuti/master
zebra: set ZEBRA_IFC_DOWN on connected routes for inactive interfaces
2022-04-19 18:36:52 -04:00
Volodymyr Huti 7fb9825cf7 zebra: set ZEBRA_IFC_DOWN on connected routes for inactive interfaces
If you are in a situation where you have multiple addresses on an
interface, zebra creates one connected route for them.
The issue is that the rib entry is not created if addresses were
added before the interface was running.

We add the address to a running interface in a typical flow.
Therefore, we handle the route & rib creation within a single ADD event.
In the opposite case, we create the route entries without activating them.
These are considered to be active since ZEBRA_IFC_DOWN is not set.
On the following interface UP, we ignore the same ADDR_ADD as it overlaps
with the existing prefixes -> rib is never created.

The minimal reproducible setup:
-----------------------------------------
ip link add name dummy0 type dummy
ip addr flush dev dummy0
ip link set dummy0 down
ip addr add 192.168.1.7/24 dev dummy0
ip addr add 192.168.1.8/24 dev dummy0
ip link set dummy0 up
vtysh -c 'show ip route' | grep dummy0

Signed-off-by: Volodymyr Huti <v.huti@vyos.io>
2022-04-19 22:53:57 +03:00
Donald Sharp 27a1680926
Merge pull request #11050 from opensourcerouting/fix/pathd_missing
packaging: Add pathd to logrotate
2022-04-19 14:57:46 -04:00
Donald Sharp 95ffdb6475
Merge pull request #11049 from opensourcerouting/fix/usage_for_frrinit.sh
tools: Print usage for frrinit.sh when running without arguments
2022-04-19 14:57:03 -04:00
Donald Sharp 10258b031a lib: Prevent crash after shutdown request
Recent commit e92508a741 changed
the prefix_master->str to a RB tree.  This introduced a condition
whnere on shutdown the prefix list was removed from the master list
and then operated on by passing around a name.  Which was then used
to lookup the prefix list again when we operated on the code.
This change to a RB Tree first deleted the item from the RB tree
first thus introducing this crash

Crash:
(gdb) bt
    index=0x556c07d59650, pentry=0x556c07d29380) at lib/routemap.c:2397
    arg=0x7ffdbf84bc60) at lib/hash.c:267
    event=RMAP_EVENT_PLIST_DELETED) at lib/routemap.c:2489

Grab the first item on the list, clean it and then remove it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19 14:55:55 -04:00
Donatas Abraitis 03ea2db724 packaging: Add pathd to logrotate
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-19 19:13:19 +03:00
mobash-rasool 16b5065b47
Merge pull request #10908 from donaldsharp/proto_only_error
zebra: When `zebra nexthop proto only` limit errors
2022-04-19 21:27:29 +05:30
Russ White a037a34436
Merge pull request #10977 from bobuhiro11/alloc_sid_based_on_prefix
bgpd: take SRv6 locator's prefix length into account when generating SIDs
2022-04-19 11:17:57 -04:00
Russ White 7e785dae95
Merge pull request #10983 from pguibert6WIND/show_isis_nbr_bfd
isisd: add bfd information on isis neighbor show command
2022-04-19 11:17:31 -04:00
Russ White 2e4b21fc58
Merge pull request #11030 from ranjanyash54/minls
ospf6d: Check for MinLSInterval timer when adding to LSUpdate list
2022-04-19 11:13:05 -04:00
Donatas Abraitis db8d184392
Merge pull request #11040 from donaldsharp/bgp_type5_route_handling
bgpd: Allow type 5 routes to be handled better when link is flapping
2022-04-19 17:35:22 +03:00
Donatas Abraitis b5b09eee6d packaging: Use 0640 (frr:frr) as permissions when running under logrotate
When we do "log file /var/log/frr/something", permissions are set to
0640 (frr:frr), but when the logrotate kicks in, we have 0640 (frr:frrvty).

I believe, we should have a consistent permissions.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-19 16:54:11 +03:00
Donatas Abraitis 9bf7cb0b74 packaging: Set default permissions for /var/log/frr to 0755
At the moment we set /var/log/frr permissions to 0750 (frr:frr), but the log
file is 0640 (root:adm) (unless logrotated) and that doesn't allow adm group
to even open the directory.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-19 16:54:10 +03:00
Donald Sharp 4667220e3a *: Fix spelling of accidently
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19 08:31:30 -04:00
Donald Sharp f526739897 *: Fix spelling of accomodate
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19 08:29:58 -04:00
Donald Sharp ed18e04d91 doc: Fix spelling of choosen
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19 08:28:47 -04:00
Donald Sharp 4563e2047a tests: Fix spelling of conjuction
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19 08:28:09 -04:00
Donald Sharp 2b669d3a21 *: Fix spelling of overriden
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19 08:27:02 -04:00
Donald Sharp 53c7a86eec *: Fix spelling of Verfiy
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19 08:26:00 -04:00
Donald Sharp 2ef62909a9 *: Fix spelling of atleast
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19 08:25:03 -04:00
Donald Sharp 3f1f5852b1 tests: Fix spelling of Initilized
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-19 08:22:47 -04:00