Commit Graph

29651 Commits

Author SHA1 Message Date
Donatas Abraitis
250afa433c
Merge pull request #11814 from mobash-rasool/fixes2
pim6d: Add debug mroute6 commands
2022-08-16 16:39:18 +03:00
Mobashshera Rasool
d4dc5e3c70 doc: Adding doc for debug mroute commands
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-08-16 00:56:40 -07:00
Mobashshera Rasool
ca8cbecd5c pim6d: Add debug mroute6 and detail commands
Adding below debug CLIs:
debug mroute6
debug mroute6 detail

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-08-16 00:55:51 -07:00
Donatas Abraitis
606d49a4ca bgpd: Change warning message when BGP community-list is not found
Before:

```
donatas-laptop# show bgp ipv4 unicast community-list testas
% testas is not a valid community-list name
donatas-laptop# con
donatas-laptop(config)# bgp community-list standard testas permit internet
donatas-laptop(config)# do show bgp ipv4 unicast community-list testas
donatas-laptop(config)#
```

`is not a valid community-list name` is a misleading warning message.

Doing the same for filter-list, access-list, prefix-list, route-map.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-08-16 09:32:36 +03:00
Donatas Abraitis
e60af75350 doc: Drop deny rules from BGP community-list example
It's an invalid command, probably copy/paste error.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-08-16 09:10:30 +03:00
Russ White
261e70c66a
Merge pull request #11804 from donaldsharp/aug_coverity_update
Aug coverity update
2022-08-15 18:10:03 -04:00
Donald Sharp
e1a39919e1
Merge pull request #11771 from anlancs/fix/minor-zebra-mh-comment
zebra: correct one comment for evpn-mh
2022-08-15 17:43:15 -04:00
Mark Stapp
2000ac4075 tools: stop zebra daemon last
When stopping the FRR daemons, stop zebra last, after trying
to stop the other daemons.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2022-08-15 16:40:08 -04:00
Donald Sharp
7a8120da5a watchfrr: Check that the operational timeout specified is good.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-15 15:45:05 -04:00
Donald Sharp
7021983670 pbrd: VTY_GET_CONTEXT can fail
Although VTY_GET_CONTEXT can return a failed value, it will
never happen in pbrd because of how context work.  In
any event add some code to make coverity happy

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-15 15:45:05 -04:00
Donald Sharp
241b791e83 pathd: Ensure path is free'd after we no longer need it.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-15 15:45:05 -04:00
Donald Sharp
43a8e0ac88 lib: Ensure ls_msg2edge does not use memory after freeing
ls_msg2edge calls ls_edge_del_all which will free the
edge variable.  Ensure that FRR properly returns NULL.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-15 15:45:05 -04:00
Donald Sharp
bddd6bb95e pimd: vrf may be NULL from pim_cmd_lookup_vrf
The call into pim_cmd_lookup_vrf may be NULL
and dereferencing it before ensuring that the
vrf pointer is non-NULL is a good way to crash.

A crash can be initiated in pim:

eva# show ip msdp vrf NOEXIST mesh-group
vtysh: error reading from pimd: Permission denied (13)Warning: closing connection to pimd because of an I/O error!
eva# 2022/08/15 11:47:38 [PHJDC-499N2][EC 100663314] STARVATION: task vtysh_rl_read (560b77f76de6) ran for 16777ms (cpu time 0ms)

eva#

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-15 15:45:05 -04:00
Donald Sharp
e89de02895 pimd: pim_upstream_add up must exist
When calling pim_upstream_add, the lookup for upstream
or the creation of the upstream cannot fail.  As such
up is never NULL.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-15 15:45:05 -04:00
Donald Sharp
29b458ef1f pimd: ch->upstream cannot be NULL
in pim_ifchannel.c there exists several spots where
the ch->upstream is assumed to be NULL.  This is not
possible.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-15 15:45:05 -04:00
Donald Sharp
7fc3f834e9 nhrpd: Use frr_weak_random()
Convert usage of rand() to frr_weak_random()

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-15 15:45:05 -04:00
Donatas Abraitis
1bd367634e bgpd: Treat as withdraw if we receive as path with AS_SET / AS_CONFED_SET
For now, only if the knob is enabled. Later this gonna be (most likely) removed
and routes with AS_SET / AS_CONFED_SET will be denied by default.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-08-15 21:41:15 +03:00
Donatas Abraitis
17667be0a3
Merge pull request #11781 from donaldsharp/ospf_packet_helper
Ospf packet helper
2022-08-15 20:43:49 +03:00
Donatas Abraitis
969bedd5eb
Merge pull request #11803 from anlancs/fix/bgp-doc-failover
doc: correct description for "fast-external-failover"
2022-08-15 20:40:40 +03:00
Donald Sharp
3e140309a3 bgpd: Ensure bgp_vrf is non-null
When calling VTY_GET_CONTEXT to get the bgp pointer,
FRR needs to ensure that the pointer is valid.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-15 11:24:42 -04:00
Donald Sharp
50a38e23fd zebra: Remove unused assignment in zebra_dplane.c
Coverity spotted 3 places where `int ret = XXX` was
being used and FRR was immediately assigning a different
value.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-15 11:20:59 -04:00
anlan_cs
52fb7e966e doc: correct description for "fast-external-failover"
The description for `bgp fast-external-failover` is wrongly opposite.
Just remove the word - `not`.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-08-15 02:26:23 -04:00
Abhishek N R
a8f7d5de6b pimd, pim6d: Using ttable for displaying "show ip/ipv6 pim upstream" command output.
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-08-14 08:29:11 -07:00
Abhishek N R
0148e53f3b pimd, pim6d: Using ttable for displaying "show ip/ipv6 pim secondary" command output
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-08-14 08:29:11 -07:00
Abhishek N R
1b6dbdcd1e pimd, pim6d: Using ttable for displaying "show ip/ipv6 pim rpf" command output.
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-08-14 08:29:11 -07:00
Donald Sharp
0b368b50dd
Merge pull request #11785 from opensourcerouting/fix/remove_ospf6Enabled_from_JSON
ospf6d: Remove ospf6Enabled from JSON output
2022-08-12 20:29:47 -04:00
Donald Sharp
b481e15d7e
Merge pull request #11784 from anlancs/fix/ospfd-cost-zebra-speed
ospf6d: fix missing cost change
2022-08-12 20:29:16 -04:00
Donald Sharp
41bd80e5b9
Merge pull request #11795 from opensourcerouting/fix/drop_enable_systemd
redhat: Drop --enable-systemd from build specification
2022-08-12 20:28:27 -04:00
Donald Sharp
b2e2506c70
Merge pull request #11799 from sri-mohan1/sri-ospf-1
ospfd: debug string corrected
2022-08-12 20:27:55 -04:00
Donald Sharp
4058683909
Merge pull request #11798 from opensourcerouting/fix/convert_to_void
bgpd: Convert some int functions to void
2022-08-12 14:34:43 -04:00
sri-mohan1
88282a260c ospfd: debug string corrected
Debug string for ospf is corrected

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2022-08-12 18:37:42 +05:30
Donatas Abraitis
0b1fb52c2a bgpd: Convert some int functions to void
The output is not checked, we can have void instead.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-08-12 13:26:38 +03:00
Donatas Abraitis
192ab8212d redhat: Drop --enable-systemd from build specification
This option no longer exists.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-08-12 11:49:33 +03:00
Donatas Abraitis
1bf9112c24
Merge pull request #11789 from donaldsharp/pw_shutdown
zebra: Fix crash in shutdown w/ pw thread still running
2022-08-12 10:40:33 +03:00
Donald Sharp
86c4fdfac8 zebra: Fix crash in shutdown w/ pw thread still running
I am seeing the zebra_pw_install_retry timer thread crashing
on shutdown

The shutdown of the timer is only in an
if () {
   ...
} else if

Let's just always shut it down.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-11 16:31:28 -04:00
Donatas Abraitis
9951799fd3
Merge pull request #11757 from mjstapp/fix_bgp_cond_adv_dev
bgpd: conditional adv fixes
2022-08-11 21:57:21 +03:00
Donald Sharp
4e5c95be91 ospf6d: Remove unused variable
last_serviced_oi is always NULL.  Remove

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-11 13:40:50 -04:00
Donald Sharp
f54b256b93 ospfd: Add how many packets the interface has queued to send
In `show ip ospf interface traffic` how many packets this
interface has queued to send.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-11 13:30:32 -04:00
Donald Sharp
fb617d1874 ospfd: Refactor fifo_flush for the interface
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-11 13:30:32 -04:00
Donald Sharp
14fad76ce2 ospfd: When a neighbor goes down clear the oi->obuf if we can
When a neighbor goes down on an interface and that interface
has no more neighbors in a viable state where packets should
be being sent, then let's clear up the oi->obuf associated
with the interface the neighbor is on.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-11 13:30:32 -04:00
Donald Sharp
fe61ceaee7 ospfd: Cleanup indentation surrounding oi->nbr
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-11 13:30:32 -04:00
Donald Sharp
812e6c78c1 ospfd: Increase packets sent at one time in ospf_write
ospf_write pulls an interface off the ospf->oi_write_q
then writes one packet and places it back on the queue,
keeping track of the first one sent.  Then it will
stop sending packets even if we get back to the first
interface written too but before we have sent the full
pkt_count.  I do not believe this makes a whole bunch
of sense and is very restrictive of how much data can
be sent especially if you have a limited number of peers
but large amounts of data.  Why be so restrictive?

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-08-11 13:30:32 -04:00
Quentin Young
0655090c6e bgpd: don't adv conditionally withdrawn routes
If we have conditional advertisement enabled, and conditionally withdrew
some prefixes, and then we do a 'clear bgp', those routes were getting
advertised again, and then withdrawn the next time the conditional
advertisement scanner executed.

When we go to advertise check the prefix against the conditional
advertisement status so we don't do that.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2022-08-11 10:58:17 -04:00
Quentin Young
f373ce6cfc bgpd: apply cond-adv policy to update group
The new outbound filter to apply conditional advertisement policy was
not working properly due to complications with update groups. The two
routemaps were properly copied into the update group peer filter but not
the conditional advertisement state.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2022-08-11 10:58:17 -04:00
Donatas Abraitis
97b4474de1 ospf6d: Remove ospf6Enabled from JSON output
Time to deprecate it.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-08-11 17:32:24 +03:00
Donald Sharp
23f85c8dad
Merge pull request #11778 from AbhishekNR/ttable_mroute
pimd, pim6d:  Using ttable for displaying output of show mroute commands
2022-08-11 08:32:32 -04:00
Donald Sharp
2cf0c7fea0
Merge pull request #11782 from AbhishekNR/ttable_mroute_count
pimd, pim6d: Using ttable for displaying output of show mroute count command
2022-08-11 08:32:01 -04:00
anlan_cs
4f0d3f3e8a ospf6d: fix missing cost change
After all needed interfaces ( for example: interface "a1", vrf "vrf1", and
"a1" is binded to "vrf1" ) are ready/created, then restart/start frr. zebra
at startup will call `netlink_interface()` to process all interfaces and notify
all clients, but its calling `get_iflink_speed()` maybe fails for unexpected
order of the coming interfaces: when processing "a1", "vrf1" maybe is unknown
at that time. `if_zebra_speed_update()` timer is introduced to deal with this
order problem.

Currently only ospfd and ospf6d deal with this speed change to recalculated
route cost. ospfd can deal with this change, but ospf6d will wrongly missed it.

Since both `ipv6 ospf6 cost COST` and `auto-cost reference-bandwidth COST` are
not set, cost of this ospf6 interface should be calculated with interface
speed, but it is wrongly kept to `10`, which is based on interface speed being
`0` for it missed speed change. Further, ECMP function becomes invalid after
restart frr, beacuse some ospf6 interfaces of one ECMP are wrongly with cost
`10`.

To avoid missing, recalculate cost for ospf6 interfaces based on potentially
changed speed.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-08-11 08:12:30 -04:00
Abhishek N R
88e9f3a009 pimd, pim6d: Using ttable for displaying "show ip/ipv6 mroute count" command output.
Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-08-11 04:03:11 -07:00
Siger Yang
c8e718ce1f
zebra: add empty placeholders for tc via BSD socket
This commit adds unimplemented updating functions for traffic control via
BSD socket.

Signed-off-by: Siger Yang <siger.yang@outlook.com>
2022-08-11 02:32:50 +08:00