]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
2 years agoMerge pull request #12303 from donaldsharp/relax_if_type_check
Jafar Al-Gharaibeh [Fri, 11 Nov 2022 06:14:41 +0000 (00:14 -0600)]
Merge pull request #12303 from donaldsharp/relax_if_type_check

zebra: relax if_type check to allow early ES config creation

2 years agoMerge pull request #12269 from pguibert6WIND/ospf_external_lsa_crash
Jafar Al-Gharaibeh [Thu, 10 Nov 2022 19:20:50 +0000 (13:20 -0600)]
Merge pull request #12269 from pguibert6WIND/ospf_external_lsa_crash

ospfd: prevent from crashing when processing external lsa

2 years agozebra: relax if_type check to allow early ES config creation 12303/head
Anuradha Karuppiah [Fri, 29 May 2020 16:53:31 +0000 (09:53 -0700)]
zebra: relax if_type check to allow early ES config creation

The API for configuring ES in zebra had a strict check for if_type
"isBond" that prevented the ES config from being created before the
interface.

Ticket: CM-29454

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
2 years agoospfd: prevent from crashing when processing external lsa 12269/head
Philippe Guibert [Mon, 7 Nov 2022 10:03:41 +0000 (11:03 +0100)]
ospfd: prevent from crashing when processing external lsa

When using debug mode, the ei parameter may be NULL. In that
case, do not display the log trace, otherwise a crash will
happen.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2 years agoMerge pull request #12297 from donaldsharp/pim_warn_to_debug
Jafar Al-Gharaibeh [Wed, 9 Nov 2022 22:17:14 +0000 (16:17 -0600)]
Merge pull request #12297 from donaldsharp/pim_warn_to_debug

pimd: Convert zlog_warn to debug

2 years agoMerge pull request #12287 from donaldsharp/bgp_rpki_takes_too_long
Donatas Abraitis [Wed, 9 Nov 2022 19:25:44 +0000 (21:25 +0200)]
Merge pull request #12287 from donaldsharp/bgp_rpki_takes_too_long

Bgp rpki takes too long

2 years agopimd: Convert zlog_warn to debug 12297/head
Donald Sharp [Fri, 22 Nov 2019 20:12:05 +0000 (15:12 -0500)]
pimd: Convert zlog_warn to debug

The unable to find a nexthop should not be a warning it should
be a debug.  Switching over.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2 years agoMerge pull request #11736 from kuldeepkash/pim_v6
Donatas Abraitis [Wed, 9 Nov 2022 15:56:32 +0000 (17:56 +0200)]
Merge pull request #11736 from kuldeepkash/pim_v6

[PIMv6] Add new scenarios to multicast static_rp suite

2 years agoMerge pull request #12281 from SaiGomathiN/11279
Donatas Abraitis [Wed, 9 Nov 2022 13:14:46 +0000 (15:14 +0200)]
Merge pull request #12281 from SaiGomathiN/11279

tools: Add pim6d support bundle commands

2 years agoMerge pull request #12280 from opensourcerouting/fix/ospv6_show_passive_interface
Jafar Al-Gharaibeh [Wed, 9 Nov 2022 05:25:39 +0000 (23:25 -0600)]
Merge pull request #12280 from opensourcerouting/fix/ospv6_show_passive_interface

ospf6d: Show if the interface is passive for `show ipv6 ospf6 interface`

2 years agoMerge pull request #12286 from ffontaine/master
Jafar Al-Gharaibeh [Wed, 9 Nov 2022 05:24:34 +0000 (23:24 -0600)]
Merge pull request #12286 from ffontaine/master

zebra/netconf_netlink.c: fix build without AF_MPLS

2 years agobgpd: rpki was decrementing the node lock one time too many 12287/head
Donald Sharp [Tue, 8 Nov 2022 19:38:02 +0000 (14:38 -0500)]
bgpd: rpki was decrementing the node lock one time too many

The code was this:

1)        match = bgp_table_subtree_lookup(rrp->bgp->rib[rrp->afi][rrp->safi],
                                         &rrp->prefix);

2)        node = match;

        while (node) {
                if (bgp_dest_has_bgp_path_info_data(node)) {
                        revalidate_bgp_node(node, rrp->afi, rrp->safi);
                }

3)               node = bgp_route_next_until(node, match);
        }

if (match)
4)              bgp_dest_unlock_node(match);

At 1) match was locked and became +1
At 2) match and node are now equal
At 3) On first iteration, match is decremented( as that node points
at it ) and the next item is locked, if it is found, and returned which becomes node

If 3 is run again because node is non-null then, current node is decremented
and the next node found is incremented and returned which becomes node again.

So if we get to 4) match is unlocked again which is now a double unlock
which, frankly, is not good.  In all code paths that I can see the
test for `if (match) ...` is not needed so let's just remove it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11302 from punith-shivakumar/master
Donatas Abraitis [Tue, 8 Nov 2022 19:28:30 +0000 (21:28 +0200)]
Merge pull request #11302 from punith-shivakumar/master

ospf6d: add missing ABR task on interface start and change default task delay to 5

2 years agoMerge pull request #11594 from louis-6wind/lfa-netlink
Pushpasis Sarkar [Tue, 8 Nov 2022 17:49:39 +0000 (23:19 +0530)]
Merge pull request #11594 from louis-6wind/lfa-netlink

isisd: apply fast-reroute as soon an interface or an adjacency falls down

2 years agozebra/netconf_netlink.c: fix build without AF_MPLS 12286/head
Fabrice Fontaine [Tue, 8 Nov 2022 17:48:41 +0000 (18:48 +0100)]
zebra/netconf_netlink.c: fix build without AF_MPLS

Fix the following build failure raised since version 8.4 and
https://github.com/FRRouting/frr/commit/d53dc9bd8164ba40242e2013d382fb01eb0b96ed:

zebra/netconf_netlink.c: In function 'netlink_netconf_change':
zebra/netconf_netlink.c:109:32: error: 'AF_MPLS' undeclared (first use in this function)
  109 |         if (ncm->ncm_family == AF_MPLS)
      |                                ^~~~~~~

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2 years agoMerge pull request #12258 from opensourcerouting/bgp-local-var-gcc-12
Jafar Al-Gharaibeh [Tue, 8 Nov 2022 16:36:36 +0000 (10:36 -0600)]
Merge pull request #12258 from opensourcerouting/bgp-local-var-gcc-12

bgpd: fix "storing the address of local variable"

2 years agobgpd: Break up rpki prefix revalidation by bgp structure
Donald Sharp [Tue, 8 Nov 2022 13:10:49 +0000 (08:10 -0500)]
bgpd: Break up rpki prefix revalidation by bgp structure

RPKI revalidation is an possibly expensive operation.  Break up
revalidation on a prefix basis by the `struct bgp` pointer.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: rpki should use a stack pointer instead of a pointer
Donald Sharp [Tue, 8 Nov 2022 12:50:40 +0000 (07:50 -0500)]
bgpd: rpki should use a stack pointer instead of a pointer

The prefix was being allocated and freed.  No point in this
let's just use a stack pointer.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Make rpki soft_reconfig calling events
Donald Sharp [Tue, 8 Nov 2022 12:36:56 +0000 (07:36 -0500)]
bgpd: Make rpki soft_reconfig calling events

An end operator is showing cases with multiple bgp feeds
and a rpki table that calling the revalidation functions
is extremely expensive and they are seeing lots of thread
WARNS about timers being late and eventually the whole
thing gets unresponsive.  Let's break up soft reconfiguration
in to a series of events per peer so that all the work
for this is not done at the same exact time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Use bgp pointer instead of peer pointer
Donald Sharp [Tue, 8 Nov 2022 12:16:53 +0000 (07:16 -0500)]
bgpd: Use bgp pointer instead of peer pointer

When looking up a table, use the bgp pointer that we
have.  Code cleanliness and all that.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Make calling bgp_soft_reconfig_in consistent
Donald Sharp [Tue, 8 Nov 2022 12:11:18 +0000 (07:11 -0500)]
bgpd: Make calling bgp_soft_reconfig_in consistent

Not all places were checking to see if soft reconfiguration
was turned on before calling into it to do all that work.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: In rpki use FOREACH_AFI_SAFI to loop over afi/safi
Donald Sharp [Sun, 6 Nov 2022 12:52:40 +0000 (07:52 -0500)]
bgpd: In rpki use FOREACH_AFI_SAFI to loop over afi/safi

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotools: Add pim6d support bundle commands 12281/head
Sai Gomathi N [Tue, 8 Nov 2022 08:09:57 +0000 (00:09 -0800)]
tools: Add pim6d support bundle commands

PIMv6 Support Bundle commands are added in support_bundle_commands.conf file.
This will help in debugging PIMv6 test Failures.

Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2 years agoospf6d: Show if the interface is passive for `show ipv6 ospf6 interface` 12280/head
Donatas Abraitis [Tue, 8 Nov 2022 07:37:19 +0000 (09:37 +0200)]
ospf6d: Show if the interface is passive for `show ipv6 ospf6 interface`

donatas-pc# sh ipv6 ospf6 interface enp3s0
enp3s0 is up, type BROADCAST
  Interface ID: 2
  Internet Address:
    inet : 192.168.10.17/24
    inet6: fe80::ca5d:fd0d:cd8:1bb7/64
  Instance ID 0, Interface MTU 1500 (autodetect: 1500)
  MTU mismatch detection: enabled
  Area ID 0.0.0.0, Cost 1000
  State Waiting, Transmit Delay 1 sec, Priority 1
  Timer intervals configured:
   Hello 10(8.149), Dead 40, Retransmit 5
  DR: 0.0.0.0 BDR: 0.0.0.0
  Number of I/F scoped LSAs is 1
    0 Pending LSAs for LSUpdate in Time 00:00:00 [thread off]
    0 Pending LSAs for LSAck in Time 00:00:00 [thread off]
  Authentication Trailer is disabled
donatas-pc# con
donatas-pc(config)# int enp3s0
donatas-pc(config-if)# ipv6 ospf6 passive
donatas-pc(config-if)# do sh ipv6 ospf6 interface enp3s0
enp3s0 is up, type BROADCAST
  Interface ID: 2
  Internet Address:
    inet : 192.168.10.17/24
    inet6: fe80::ca5d:fd0d:cd8:1bb7/64
  Instance ID 0, Interface MTU 1500 (autodetect: 1500)
  MTU mismatch detection: enabled
  Area ID 0.0.0.0, Cost 1000
  State Waiting, Transmit Delay 1 sec, Priority 1
  Timer intervals configured:
   No Hellos (Passive interface)
  DR: 0.0.0.0 BDR: 0.0.0.0
  Number of I/F scoped LSAs is 1
    0 Pending LSAs for LSUpdate in Time 00:00:00 [thread off]
    0 Pending LSAs for LSAck in Time 00:00:00 [thread off]
  Authentication Trailer is disabled
donatas-pc(config-if)#

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #12276 from opensourcerouting/fix/ospf_wrong_arg
Jafar Al-Gharaibeh [Tue, 8 Nov 2022 04:08:18 +0000 (22:08 -0600)]
Merge pull request #12276 from opensourcerouting/fix/ospf_wrong_arg

ospfd: Get route-map name for default-information originate

2 years agoospfd: Get route-map name for default-information originate 12276/head
Donatas Abraitis [Mon, 7 Nov 2022 20:23:07 +0000 (22:23 +0200)]
ospfd: Get route-map name for default-information originate

LR1.wue3(config)# route-map foo-bar-baz10 permit 10
LR1.wue3(config-route-map)# exit
LR1.wue3(config)# router ospf
LR1.wue3(config-router)#  ospf router-id 172.18.254.201
LR1.wue3(config-router)#  log-adjacency-changes
LR1.wue3(config-router)# default-information originate metric 50 metric-type 1 route-map foo-bar-baz10
LR1.wue3(config-router)# end

Results in:

LR1.wue3# show run
...
!
router ospf
 ospf router-id 172.18.254.201
 log-adjacency-changes
 default-information originate metric 50 metric-type 1 route-map oute-map
exit
!
route-map foo-bar-baz10 permit 10
exit
!
end

Let's fix this.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #12268 from opensourcerouting/fix/zebra_tc_include_netinet_for_ethhdr
Donald Sharp [Mon, 7 Nov 2022 18:33:37 +0000 (13:33 -0500)]
Merge pull request #12268 from opensourcerouting/fix/zebra_tc_include_netinet_for_ethhdr

zebra: Reuse netinet/if_ether.h to avoid redefinition of struct ethhdr

2 years agotests: Add pim6d marker to pytest.ini 11736/head
Kuldeep Kashyap [Mon, 8 Aug 2022 00:02:02 +0000 (17:02 -0700)]
tests: Add pim6d marker to pytest.ini

Added pim6d marker to pytest.ini file,
to run tests pim6d marker based, if added
to scripts.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2 years agotests: [PIMv6] Add new scenarios to static_rp suite
Kuldeep Kashyap [Wed, 3 Aug 2022 08:34:33 +0000 (01:34 -0700)]
tests: [PIMv6] Add new scenarios to static_rp suite

Automated new scenarios to multicast pimv6
static rp test suite. Added new folder
multicast_pim6_static_rp_topo1 for pimv6
static_rp automation.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2 years agotests: [PIMv6] F/W support for multicast pimv6 automation
Kuldeep Kashyap [Wed, 3 Aug 2022 08:32:54 +0000 (01:32 -0700)]
tests: [PIMv6] F/W support for multicast pimv6 automation

Enhanced or added new libraries to support
multicast pimv6 automation

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2 years agoMerge pull request #12238 from donaldsharp/append
Donatas Abraitis [Mon, 7 Nov 2022 08:37:05 +0000 (10:37 +0200)]
Merge pull request #12238 from donaldsharp/append

lib, zebra: Allow for zebra to recognize that a route has gotten desy…

2 years agoMerge pull request #12263 from anlancs/fix/pimd-log-bug
mobash-rasool [Mon, 7 Nov 2022 07:10:19 +0000 (12:40 +0530)]
Merge pull request #12263 from anlancs/fix/pimd-log-bug

pimd: avoid one EC log

2 years agoMerge pull request #12188 from donaldsharp/resilience
Donatas Abraitis [Sun, 6 Nov 2022 20:57:04 +0000 (22:57 +0200)]
Merge pull request #12188 from donaldsharp/resilience

Resilience

2 years agozebra: Reuse netinet/if_ether.h to avoid redefinition of struct ethhdr 12268/head
Donatas Abraitis [Wed, 2 Nov 2022 21:01:18 +0000 (23:01 +0200)]
zebra: Reuse netinet/if_ether.h to avoid redefinition of struct ethhdr

In file included from /usr/include/net/ethernet.h:10,
                 from ./lib/prefix.h:26,
                 from zebra/tc_netlink.c:32:
/usr/include/netinet/if_ether.h:115:8: error: redefinition of 'struct ethhdr'
  115 | struct ethhdr {
      |        ^~~~~~
In file included from zebra/tc_netlink.c:28:
/usr/include/linux/if_ether.h:169:8: note: originally defined here
  169 | struct ethhdr {
      |        ^~~~~~

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agopimd: avoid one EC log 12263/head
anlan_cs [Sat, 5 Nov 2022 13:33:01 +0000 (21:33 +0800)]
pimd: avoid one EC log

Saw this EC log:

```
PIM: [WX4HZ-FA72S][EC 100663307] pim_rp_find_match_group: BUG We should have found default group information
```

The root cause is group address of "0.0.0.0" is wrongly introduced into
`pim_rp_find_match_group()`. So add a check to avoid it.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agotests: Test Resilient NHG's are properly created in zebra 12188/head
Donald Sharp [Wed, 26 Oct 2022 19:47:08 +0000 (15:47 -0400)]
tests: Test Resilient NHG's are properly created in zebra

When a Resilient NHG is created, ensure that Zebra notes
that it is created and has it as well.

Signed-off-by: Donald Sharp <sharp@nvidia.com>
2 years agotests: Speedup test_all_protocol_startup.py by 55 seconds
Donald Sharp [Wed, 26 Oct 2022 15:53:20 +0000 (11:53 -0400)]
tests: Speedup test_all_protocol_startup.py by 55 seconds

Just make ospf and ospfv3 converge faster with faster
hello timers.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agodoc: Add nexthop_groups documentation
Donald Sharp [Mon, 24 Oct 2022 18:26:11 +0000 (14:26 -0400)]
doc: Add nexthop_groups documentation

Remove the nexthop groups documentation from pbr.rst and
make it `generic`.  Add the resilient buckets nexthop
group type.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years ago*: Add ability to encode / decode resilence down zapi
Donald Sharp [Mon, 24 Oct 2022 13:49:40 +0000 (09:49 -0400)]
*: Add ability to encode / decode resilence down zapi

At this point add abilty for the encode/decode of the
resilience down ZAPI to zebra.  Just hookup sharpd
at this point in time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years ago*: Add ability for daemons to notice resilience changes
Donald Sharp [Mon, 24 Oct 2022 13:25:54 +0000 (09:25 -0400)]
*: Add ability for daemons to notice resilience changes

This patch just introduces the callback mechanism for the
resilient nexthop changes so that upper level daemons
can take advantage of the change.  This does nothing
at this point but just call some code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agolib, vtysh: Add ability to specify resilient nhgs
Donald Sharp [Mon, 24 Oct 2022 13:09:23 +0000 (09:09 -0400)]
lib, vtysh: Add ability to specify resilient nhgs

Add the ability to specify a resilient nexthop group

nexthop-group A
 resilient buckets 32 idle_timer 100 unbalanced_timer 500
 nexthop 192.168.100.1 enp7s0
 nexthop 192.168.100.33 enp7s0
 nexthop 192.168.122.1 enp1s0

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agolib, zebra: Add ability to encode/decode resilient nhg's
Donald Sharp [Sat, 22 Oct 2022 19:37:27 +0000 (15:37 -0400)]
lib, zebra: Add ability to encode/decode resilient nhg's

Add ability to read the nexthop group resilient linux
kernel data as well as write it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agolib: When adding to front of list ensure we handle tail to
Donald Sharp [Mon, 24 Oct 2022 18:08:35 +0000 (14:08 -0400)]
lib: When adding to front of list ensure we handle tail to

When inserting to the front of a list with listnode_add_head
if the list is empty, the tail will not be properly set and
subsuquent calls to insert/remove will cause the function
to crash.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agolib, zebra: Allow for zebra to recognize that a route has gotten desynced 12238/head
Donald Sharp [Tue, 1 Nov 2022 12:00:14 +0000 (08:00 -0400)]
lib, zebra: Allow for zebra to recognize that a route has gotten desynced

FRR does not use the NLM_F_APPEND semantics ( in fact I would argue that
the NLM_F_APPEND semantics just introduce pain for all parties involved )
I would also argue that most people who use the kernel netlink api
have recognized that NLM_F_APPEND for a route is a recipe for disaster
that is well documented and as such it is not used as anything other
than a curiousity by operators.

See:
https://bugzilla.redhat.com/show_bug.cgi?id=1337855
https://github.com/thom311/libnl/issues/226

Are 2 great examples of how confusing it is for anyone in user
space to know what the correct thing to do is.  Given that
new fields can be added with no semantics to allow us to know
what has resulted in a change or not.

In an attempt to recognize this, let's note that FRR
believes it has gotten out of sync with the kernel.
Future commits will react to the desynchronized route
and request from the kernel a reload of that specific
route if possible.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #12244 from anlancs/fix/bgpd-evpn-leak-l3rt
Donald Sharp [Fri, 4 Nov 2022 15:59:32 +0000 (11:59 -0400)]
Merge pull request #12244 from anlancs/fix/bgpd-evpn-leak-l3rt

bgpd: avoid possible memleak

2 years agoMerge pull request #12252 from opensourcerouting/fix/frr-reload.py_reuse_non_default_dirs
Donald Sharp [Fri, 4 Nov 2022 15:58:37 +0000 (11:58 -0400)]
Merge pull request #12252 from opensourcerouting/fix/frr-reload.py_reuse_non_default_dirs

tools: Honor sysdir, confdir, bindir for frr-reload.py from "frr" wrapper

2 years agoMerge pull request #12251 from donaldsharp/various_and_sundry
Donatas Abraitis [Fri, 4 Nov 2022 12:03:50 +0000 (14:03 +0200)]
Merge pull request #12251 from donaldsharp/various_and_sundry

Various and sundry

2 years agoMerge pull request #12256 from opensourcerouting/fix/llgr_max_values
Donald Sharp [Fri, 4 Nov 2022 12:00:06 +0000 (08:00 -0400)]
Merge pull request #12256 from opensourcerouting/fix/llgr_max_values

bgpd: Cap LLGR stale-time to 16777215

2 years agoMerge pull request #12257 from opensourcerouting/fix/bgp_orf_reserved
Donald Sharp [Fri, 4 Nov 2022 11:59:14 +0000 (07:59 -0400)]
Merge pull request #12257 from opensourcerouting/fix/bgp_orf_reserved

bgpd: Check and print if we receive ORF reserved type

2 years agobgpd: fix "storing the address of local variable" 12258/head
David Lamparter [Fri, 4 Nov 2022 11:33:28 +0000 (12:33 +0100)]
bgpd: fix "storing the address of local variable"

New GCC 12 warning.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agoMerge pull request #12255 from donaldsharp/established_lost
Donatas Abraitis [Fri, 4 Nov 2022 11:27:47 +0000 (13:27 +0200)]
Merge pull request #12255 from donaldsharp/established_lost

bgpd: Limit snmp trap for backwards state movement from established

2 years agobgpd: Cap LLGR stale-time to 16777215 12256/head
Donatas Abraitis [Fri, 4 Nov 2022 06:21:18 +0000 (08:21 +0200)]
bgpd: Cap LLGR stale-time to 16777215

This value is 3 bytes (24-bits), let's do not overuse this.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Limit snmp trap for backwards state movement from established 12255/head
Donald Sharp [Fri, 4 Nov 2022 00:39:39 +0000 (20:39 -0400)]
bgpd: Limit snmp trap for backwards state movement from established

Currently the bgp mib specifies two traps:

a) Into established state
b) transition backwards from a state

b) really is an interesting case.  It means transitioning
from say established to starting over.  It can also
mean when bgp is trying to connect and that fails and
the state transitions backwards.

Now let's imagine 500 peers with tight timers (say a data center)
and there is network trauma you have just created an inordinately
large number of traps for each peer.

Let's limit FRR to changing from the old status as Established
to something else.  This will greatly limit the trap but it
will also be something end operators are actually interested in.

I actually had several operators say they had to write special code
to ignore all the backward state transitions that they didn't care
about.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotools: Honor sysdir, confdir, bindir for frr-reload.py from "frr" wrapper 12252/head
Donatas Abraitis [Thu, 3 Nov 2022 18:13:24 +0000 (20:13 +0200)]
tools: Honor sysdir, confdir, bindir for frr-reload.py from "frr" wrapper

Without this, those variables are not passed to frr-reload.py and uses
default values.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agovtysh: Allow `service ...` lines to not repeat 12251/head
Donald Sharp [Thu, 3 Nov 2022 16:59:01 +0000 (12:59 -0400)]
vtysh: Allow `service ...` lines to not repeat

When any `service ...` line is entered and there are multiple
daemons running prevent this from being displayed multiple times.

Fixes: #5475
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: rfapi doc strings are messed up for one command
Donald Sharp [Thu, 3 Nov 2022 16:54:55 +0000 (12:54 -0400)]
bgpd: rfapi doc strings are messed up for one command

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agolib: Fix double set of event pointer to NULL
Donald Sharp [Thu, 3 Nov 2022 16:50:24 +0000 (12:50 -0400)]
lib: Fix double set of event pointer to NULL

The event system when executing a thread already
sets the pointer of it to NULL.  No need to
do it again.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Check and print if we receive ORF reserved type 12257/head
Donatas Abraitis [Thu, 3 Nov 2022 14:19:21 +0000 (16:19 +0200)]
bgpd: Check and print if we receive ORF reserved type

Just for debugging purposes and a better visibility.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: avoid possible memleak 12244/head
anlan_cs [Tue, 1 Nov 2022 02:09:15 +0000 (22:09 -0400)]
bgpd: avoid possible memleak

In the case of without ':' in `ecom_str`, memleak on this `ecom_str` will
occur. Just free `ecom_str` for this case.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agoMerge pull request #12196 from opensourcerouting/xref-vtysh
Donald Sharp [Thu, 3 Nov 2022 12:54:09 +0000 (08:54 -0400)]
Merge pull request #12196 from opensourcerouting/xref-vtysh

*: rewrite `extract.pl` using `xref` infra

2 years agoMerge pull request #12245 from mobash-rasool/fixes3
Jafar Al-Gharaibeh [Thu, 3 Nov 2022 03:37:23 +0000 (22:37 -0500)]
Merge pull request #12245 from mobash-rasool/fixes3

pimd: fix igmp source packet check

2 years agoMerge pull request #12247 from donaldsharp/bgp_open_issues
Donatas Abraitis [Wed, 2 Nov 2022 19:45:50 +0000 (21:45 +0200)]
Merge pull request #12247 from donaldsharp/bgp_open_issues

bgpd: Ensure that bgp open message stream has enough data to read

2 years agoMerge pull request #12169 from donaldsharp/zebra_meta_q_ordering
Donatas Abraitis [Wed, 2 Nov 2022 18:15:32 +0000 (20:15 +0200)]
Merge pull request #12169 from donaldsharp/zebra_meta_q_ordering

zebra: Fix handling of recursive routes when processing closely in time

2 years agobgpd: Ensure that bgp open message stream has enough data to read 12247/head
Donald Sharp [Wed, 2 Nov 2022 17:24:48 +0000 (13:24 -0400)]
bgpd: Ensure that bgp open message stream has enough data to read

If a operator receives an invalid packet that is of insufficient size
then it is possible for BGP to assert during reading of the packet
instead of gracefully resetting the connection with the peer.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #12235 from anlancs/fix/cleanup-22
Donald Sharp [Wed, 2 Nov 2022 12:21:03 +0000 (08:21 -0400)]
Merge pull request #12235 from anlancs/fix/cleanup-22

include: remove one unused macro

2 years agopimd: fix igmp source packet check 12245/head
Mobashshera Rasool [Wed, 2 Nov 2022 10:17:30 +0000 (03:17 -0700)]
pimd: fix igmp source packet check

ip source 0.0.0.0 is OK as per RFC 3376: 4.2.13.

Co-authored-by: ron <lyq140hf2006@163.com>
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agoMerge pull request #12159 from opensourcerouting/fix/conditional_advertisement_track_...
Russ White [Tue, 1 Nov 2022 16:24:51 +0000 (12:24 -0400)]
Merge pull request #12159 from opensourcerouting/fix/conditional_advertisement_track_updates

bgpd: Notify BGP conditional advertisement thread when the peer goes down

2 years agoMerge pull request #12236 from cscarpitta/fix/replace-inet-top-in-bgp-mplsvpn
David Lamparter [Tue, 1 Nov 2022 12:01:49 +0000 (13:01 +0100)]
Merge pull request #12236 from cscarpitta/fix/replace-inet-top-in-bgp-mplsvpn

2 years agoinclude: remove one unused macro 12235/head
anlan_cs [Mon, 31 Oct 2022 10:14:07 +0000 (06:14 -0400)]
include: remove one unused macro

In "rtnetlink.h", four items are a group, e.g. 116/117/118/119 should be
a group.  But "RTM_SETHWFLAGS" is not in use and has nothing to do with
"NEXTHOPBUCKET".

After comparing with kernel header, better remove it imo.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agoMerge pull request #12114 from opensourcerouting/feature/bgp_aigp_attribute
Russ White [Mon, 31 Oct 2022 15:24:43 +0000 (11:24 -0400)]
Merge pull request #12114 from opensourcerouting/feature/bgp_aigp_attribute

bgpd: Implement AIGP

2 years agoMerge pull request #12195 from anlancs/fix/ospfd-missing-max-metric
Donald Sharp [Mon, 31 Oct 2022 11:40:26 +0000 (07:40 -0400)]
Merge pull request #12195 from anlancs/fix/ospfd-missing-max-metric

ospfd: fix missing max-metric in show running config

2 years agoMerge pull request #12226 from spk-hebbar/zebra_fpm
Donatas Abraitis [Mon, 31 Oct 2022 11:12:58 +0000 (13:12 +0200)]
Merge pull request #12226 from spk-hebbar/zebra_fpm

zebra: Remove duplicate update of msg_type

2 years agoMerge pull request #12232 from anlancs/fix/doc-ospfd-max-metric
Donatas Abraitis [Mon, 31 Oct 2022 11:12:43 +0000 (13:12 +0200)]
Merge pull request #12232 from anlancs/fix/doc-ospfd-max-metric

doc: fix ospf's max-metric command

2 years agodoc: fix ospf's max-metric command 12232/head
anlan_cs [Mon, 31 Oct 2022 08:03:04 +0000 (04:03 -0400)]
doc: fix ospf's max-metric command

"on-shutdown" and "on-startup" have the different timeout range.

Correct the timeout range for "on-shutdown" based on the current code:

```
(ospf)  max-metric router-lsa on-shutdown (5-100)
```

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agoMerge pull request #12230 from cscarpitta/fix/replace-inet-top-in-srv6-lib
mobash-rasool [Mon, 31 Oct 2022 06:34:26 +0000 (12:04 +0530)]
Merge pull request #12230 from cscarpitta/fix/replace-inet-top-in-srv6-lib

lib: Use `%pI6`/`%pI4` to print SRv6 seg6local ctx

2 years agolib: Use `%pI6`/`%pI4` to print SRv6 seg6local ctx 12230/head
Carmine Scarpitta [Sun, 30 Oct 2022 08:15:06 +0000 (09:15 +0100)]
lib: Use `%pI6`/`%pI4` to print SRv6 seg6local ctx

This commit changes `seg6local_context2str()` to use `%pI6`/`%pI4`
instead of `inet_ntop` to print the SRv6 seg6local context information.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2 years agobgpd: Replace `inet_ntop` with `%pI6` 12236/head
Carmine Scarpitta [Sun, 30 Oct 2022 07:25:07 +0000 (08:25 +0100)]
bgpd: Replace `inet_ntop` with `%pI6`

This commit changes some debug prints to use `%pI6` instead of
`inet_ntop` to print SRv6 SIDs.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2 years agoMerge pull request #12224 from cscarpitta/fix/enhance-srv6-locator-chunk-free-api
Donald Sharp [Sat, 29 Oct 2022 23:56:07 +0000 (19:56 -0400)]
Merge pull request #12224 from cscarpitta/fix/enhance-srv6-locator-chunk-free-api

bgpd: Enhance the `srv6_locator_chunk_free()` API by automatically setting the pointer to the freed memory to `NULL`

2 years agoMerge pull request #12215 from LabNConsulting/working/lb/ospf-allow-for-zero
Jafar Al-Gharaibeh [Sat, 29 Oct 2022 21:58:50 +0000 (16:58 -0500)]
Merge pull request #12215 from LabNConsulting/working/lb/ospf-allow-for-zero

ospfd: remove asster on zero length LSA - which is permitted by spec

2 years agoMerge pull request #12222 from LabNConsulting/working/lb/fix-p2X-acks
Jafar Al-Gharaibeh [Sat, 29 Oct 2022 21:57:12 +0000 (16:57 -0500)]
Merge pull request #12222 from LabNConsulting/working/lb/fix-p2X-acks

ospfd: fix bug where acks were not be generated to incoming P2P/P2MP peers

2 years agozebra: Remove duplicate updation of msg_type 12226/head
Spoorthi K [Sat, 29 Oct 2022 17:55:03 +0000 (23:25 +0530)]
zebra: Remove duplicate updation of msg_type

Signed-off-by: Spoorthi K <spk@redhat.com>
2 years agoospfd: fix bug where acks were not be generated to incoming P2P/P2MP neighbors 12222/head
Lou Berger [Sat, 29 Oct 2022 17:17:56 +0000 (17:17 +0000)]
ospfd: fix bug where acks were not be generated to incoming P2P/P2MP neighbors

Signed-off-by: Lou Berger <lberger@labn.net>
2 years agoMerge pull request #12220 from spk-hebbar/patch-1
Jafar Al-Gharaibeh [Sat, 29 Oct 2022 17:02:21 +0000 (12:02 -0500)]
Merge pull request #12220 from spk-hebbar/patch-1

doc: Update with right default FPM server port

2 years agobgpd: Don't check for NULL when removing chunks 12224/head
Carmine Scarpitta [Sat, 29 Oct 2022 15:31:16 +0000 (17:31 +0200)]
bgpd: Don't check for NULL when removing chunks

`srv6_locator_chunk_free()` is a wrapper around the `XFREE()` macro.
Passing a NULL pointer to `XFREE()` is safe. Therefore, checking that
the pointer passed to the `srv6_locator_chunk_free()` is not null is
unnecessary.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2 years agobgpd: Do not set chunk pointer to NULL after free
Carmine Scarpitta [Sat, 29 Oct 2022 15:23:59 +0000 (17:23 +0200)]
bgpd: Do not set chunk pointer to NULL after free

`srv6_locator_chunk_free()` takes care of freeing the memory allocated
for a `struct srv6_locator_chunk` and setting the
`struct srv6_locator_chunk` pointer to NULL.

It is not necessary to explicitly set the pointer to NULL after invoking
`srv6_locator_chunk_free()`.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2 years agolib, bgpd: Enhance `srv6_locator_chunk_free()` API
Carmine Scarpitta [Sat, 29 Oct 2022 15:04:35 +0000 (17:04 +0200)]
lib, bgpd: Enhance `srv6_locator_chunk_free()` API

A programmer can use the `srv6_locator_chunk_free()` function to free
the memory allocated for a `struct srv6_locator_chunk`.

The programmer invokes `srv6_locator_chunk_free()` by passing a single
pointer to the `struct srv6_locator_chunk` to be freed.
`srv6_locator_chunk_free()` uses `XFREE()` to free the memory.
It is the responsibility of the programmer to set the
`struct srv6_locator_chunk` pointer to NULL after freeing memory with
`srv6_locator_chunk_free()`.

This commit modifies the `srv6_locator_chunk_free()` function to take a
double pointer instead of a single pointer. In this way, setting the
`struct srv6_locator_chunk` pointer to NULL is no longer the
programmer's responsibility but is the responsibility of
`srv6_locator_chunk_free()`. This prevents programmers from making
mistakes such as forgetting to set the pointer to NULL after invoking
`srv6_locator_chunk_free()`.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2 years agoMerge pull request #12172 from LabNConsulting/working/lb/api-zero-len-del-flag
Russ White [Sat, 29 Oct 2022 14:38:27 +0000 (10:38 -0400)]
Merge pull request #12172 from LabNConsulting/working/lb/api-zero-len-del-flag

OSPF opaques LSA API - fix bug with LL API delete, add option for zero data length withdrawals

2 years agoospfd: catch and report runt LSAs 12215/head
Lou Berger [Fri, 28 Oct 2022 16:06:04 +0000 (16:06 +0000)]
ospfd: catch and report runt LSAs

Signed-off-by: Lou Berger <lberger@labn.net>
2 years agodoc: Update with right default FPM server port 12220/head
Spoorthi K [Sat, 29 Oct 2022 08:39:00 +0000 (14:09 +0530)]
doc: Update with right default FPM server port

Signed-off-by: Spoorthi K <spk@redhat.com>
2 years agoospfd: remove assert on zero length LSA - which is permitted by spec
Lou Berger [Thu, 27 Oct 2022 19:12:23 +0000 (19:12 +0000)]
ospfd: remove assert on zero length LSA - which is permitted by spec

Signed-off-by: Lou Berger <lberger@labn.net>
2 years agopython: hide inet_ntoa from frrbot 12196/head
David Lamparter [Fri, 28 Oct 2022 10:18:06 +0000 (11:18 +0100)]
python: hide inet_ntoa from frrbot

These are not the inet_ntoa you are looking for ;)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopython: fix a bunch of pylint warnings in clippy
David Lamparter [Fri, 28 Oct 2022 10:13:22 +0000 (11:13 +0100)]
python: fix a bunch of pylint warnings in clippy

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopython: apply black formatting
David Lamparter [Fri, 28 Oct 2022 09:59:41 +0000 (10:59 +0100)]
python: apply black formatting

The python/ directory hasn't been shoved into black yet (unlike
topotests, where most FRR python code is.)  Run black over it.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agoMerge pull request #12216 from donaldsharp/language_none
David Lamparter [Fri, 28 Oct 2022 09:56:26 +0000 (11:56 +0200)]
Merge pull request #12216 from donaldsharp/language_none

2 years agoMerge pull request #12154 from louis-6wind/fix-te-default-bandwidth
Olivier Dugeon [Fri, 28 Oct 2022 07:29:12 +0000 (09:29 +0200)]
Merge pull request #12154 from louis-6wind/fix-te-default-bandwidth

lib: fix the default TE bandwidth

2 years agoMerge pull request #12128 from donaldsharp/pim_br_fix_crash
mobash-rasool [Fri, 28 Oct 2022 05:47:10 +0000 (11:17 +0530)]
Merge pull request #12128 from donaldsharp/pim_br_fix_crash

pimd: Remove pim_br vestiges

2 years agoMerge pull request #12176 from sworleys/BGP-InQ
Russ White [Thu, 27 Oct 2022 20:13:44 +0000 (16:13 -0400)]
Merge pull request #12176 from sworleys/BGP-InQ

bgpd,doc: limit InQ buf to allow for back pressure

2 years agodoc: `debug zebra pbr` does not need to be documented in 2 places 12216/head
Donald Sharp [Thu, 27 Oct 2022 20:03:11 +0000 (16:03 -0400)]
doc: `debug zebra pbr` does not need to be documented in 2 places

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agodoc: Remove `language = none` as that sphinx no longer needs this line
Donald Sharp [Thu, 27 Oct 2022 19:59:57 +0000 (15:59 -0400)]
doc: Remove `language = none` as that sphinx no longer needs this line

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopimd: Remove pim_br vestiges 12128/head
Donald Sharp [Thu, 13 Oct 2022 19:54:43 +0000 (15:54 -0400)]
pimd: Remove pim_br vestiges

If PIM had received a register packet with the Border Router
bit set, pimd would have crashed.  Since I wrote this code
in 2015 and really have pretty much no memory of this and
no-one has ever reported this crash, let's just remove this
code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>