]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
3 years agopim6d: Implementing "show ipv6 mroute summary" CLI
Abhishek N R [Fri, 8 Apr 2022 07:34:02 +0000 (00:34 -0700)]
pim6d: Implementing "show ipv6 mroute summary" CLI

Adding new show CLI to display ipv6 mroute summary information.

Signed-off-by: Abhishek N R <abnr@vmware.com>
3 years agopim6d: Implementing "show ipv6 mroute count" CLI
Abhishek N R [Fri, 8 Apr 2022 07:20:53 +0000 (00:20 -0700)]
pim6d: Implementing "show ipv6 mroute count" CLI

Adding new show CLI to display ipv6 mroute count information.

Signed-off-by: Abhishek N R <abnr@vmware.com>
3 years agopim6d: Implementing "show ipv6 mroute" CLI
Abhishek N R [Fri, 8 Apr 2022 06:52:28 +0000 (23:52 -0700)]
pim6d: Implementing "show ipv6 mroute" CLI

Adding new show CLI to display ipv6 mroute information.

Signed-off-by: Abhishek N R <abnr@vmware.com>
3 years agozebra: Removed show_ipv6_mroute cli from zebra_vty.c
Abhishek N R [Fri, 8 Apr 2022 06:01:37 +0000 (23:01 -0700)]
zebra: Removed show_ipv6_mroute cli from zebra_vty.c

Signed-off-by: Abhishek N R <abnr@vmware.com>
3 years agopimd: Moving the common functions from pim_cmd.c
Abhishek N R [Fri, 8 Apr 2022 05:42:03 +0000 (22:42 -0700)]
pimd: Moving the common functions from pim_cmd.c

Moving the functions that are used by both IPV4 and IPV6 to a
common file pim_cmd_common.c file

Signed-off-by: Abhishek N R <abnr@vmware.com>
3 years agoMerge pull request #11031 from AbhishekNR/v6_multicast
David Lamparter [Thu, 28 Apr 2022 08:06:00 +0000 (10:06 +0200)]
Merge pull request #11031 from AbhishekNR/v6_multicast

3 years agoMerge pull request #11106 from donaldsharp/werror_error_error
David Lamparter [Thu, 28 Apr 2022 07:49:49 +0000 (09:49 +0200)]
Merge pull request #11106 from donaldsharp/werror_error_error

3 years agoMerge pull request #11098 from opensourcerouting/zapi-mrib-v6
Donald Sharp [Wed, 27 Apr 2022 13:27:49 +0000 (09:27 -0400)]
Merge pull request #11098 from opensourcerouting/zapi-mrib-v6

zebra, pimd: add IPv6 support to NEXTHOP_LOOKUP_MRIB

3 years agotests: Correctly align variable type in tests 11106/head
Donald Sharp [Wed, 27 Apr 2022 12:16:50 +0000 (08:16 -0400)]
tests: Correctly align variable type in tests

New compilers are noticing that the tests are compiling with
a pointer for the bgpd_privs variable while the bgp library
that is being linked against is not a pointer.  Since
these tests had the declaration just to make the compiler
happy, let's actually align the variable type to make the
compiler even happier.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Ensure pkt_afi and pkt_safi are not used uninited in some cases
Donald Sharp [Wed, 27 Apr 2022 11:57:41 +0000 (07:57 -0400)]
bgpd: Ensure pkt_afi and pkt_safi are not used uninited in some cases

The compiler is, rightly, pointing out that in some cases it is
possible that the pkt_afi and pkt_safi values are not properly
set and could result in a use before initialized.  I do not
actually belive that this is possible, but let's make the compiler
happy.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agodoc: Updated the doc for show ipv6 multicast commands 11031/head
Abhishek N R [Wed, 20 Apr 2022 04:40:06 +0000 (21:40 -0700)]
doc: Updated the doc for show ipv6 multicast commands

Signed-off-by: Abhishek N R <abnr@vmware.com>
3 years agopim6d: Implementing "show ipv6 multicast count" CLI
Abhishek N R [Thu, 14 Apr 2022 07:07:41 +0000 (00:07 -0700)]
pim6d: Implementing "show ipv6 multicast count" CLI

Signed-off-by: Abhishek N R <abnr@vmware.com>
3 years agopim6d: Implementing "show ipv6 multicast" CLI
Abhishek N R [Thu, 14 Apr 2022 06:30:28 +0000 (23:30 -0700)]
pim6d: Implementing "show ipv6 multicast" CLI

Signed-off-by: Abhishek N R <abnr@vmware.com>
3 years agoMerge pull request #11095 from ecbaldwin/unlock-node-always
Donald Sharp [Tue, 26 Apr 2022 19:26:03 +0000 (15:26 -0400)]
Merge pull request #11095 from ecbaldwin/unlock-node-always

bgpd: ensure that the node gets unlocked in all cases

3 years agobgpd: ensure that the node gets unlocked in all cases 11095/head
Carl Baldwin [Wed, 29 Dec 2021 21:32:33 +0000 (14:32 -0700)]
bgpd: ensure that the node gets unlocked in all cases

The logic to unlock dest if iteration completed without iterating the
entire node was flawed. Specifically, if iteration terminated due to
`gr_deferred == 0` then the node would not get unlocked.

This change takes into account the fact that dest will be NULL only in
the case when the entire table was iterated and all nodes were already
unlocked. In any other case, it needs to be unlocked.

Signed-off-by: Carl Baldwin <carl@ecbaldwin.net>
3 years agoMerge pull request #11076 from routingrocks/vrrp_master_ad_cli
Russ White [Tue, 26 Apr 2022 15:37:15 +0000 (11:37 -0400)]
Merge pull request #11076 from routingrocks/vrrp_master_ad_cli

vrrpd: Fix display of 'Master Advertisement interval'

3 years agoMerge pull request #11079 from opensourcerouting/staticd-nht-refactor-fix-startrace
Russ White [Tue, 26 Apr 2022 15:36:34 +0000 (11:36 -0400)]
Merge pull request #11079 from opensourcerouting/staticd-nht-refactor-fix-startrace

staticd: reorg, refactor and improve NHT code

3 years agoMerge pull request #11088 from opensourcerouting/pim-debug-snafus
mobash-rasool [Tue, 26 Apr 2022 15:35:50 +0000 (21:05 +0530)]
Merge pull request #11088 from opensourcerouting/pim-debug-snafus

pimd: fix SNAFUs in debug flags

3 years agopimd: clean up zlookup nexthop handling 11098/head
David Lamparter [Tue, 26 Apr 2022 14:10:15 +0000 (16:10 +0200)]
pimd: clean up zlookup nexthop handling

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopim6d: implement/un-stub MRIB lookup
David Lamparter [Thu, 10 Mar 2022 14:38:59 +0000 (15:38 +0100)]
pim6d: implement/un-stub MRIB lookup

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agozebra, pimd: add AF param on NEXTHOP_LOOKUP_MRIB
David Lamparter [Tue, 26 Apr 2022 12:52:53 +0000 (14:52 +0200)]
zebra, pimd: add AF param on NEXTHOP_LOOKUP_MRIB

By changing this API call to use a `struct ipaddr`, which encodes the
type of IP address with it.  (And rename/remove the `IPV4` from the
command name.)

Also add a comment explaining that this function call is going to be
obsolete in the long run since pimd needs to move to proper MRIB NHT.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agozebra: add rib_match_ipv6_multicast variant
David Lamparter [Tue, 26 Apr 2022 12:29:38 +0000 (14:29 +0200)]
zebra: add rib_match_ipv6_multicast variant

... for IPv6, analogous to v4.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopimd: Moving the common functions from pim_cmd.c
Abhishek N R [Thu, 7 Apr 2022 10:35:22 +0000 (03:35 -0700)]
pimd: Moving the common functions from pim_cmd.c

Moving the functions that are used by both IPV4 and IPV6 to a
common file pim_cmd_common.c file

Signed-off-by: Abhishek N R <abnr@vmware.com>
3 years agoMerge pull request #10712 from patrasar/pim_nexthop_prefix_to_pimaddr
David Lamparter [Tue, 26 Apr 2022 13:39:36 +0000 (15:39 +0200)]
Merge pull request #10712 from patrasar/pim_nexthop_prefix_to_pimaddr

3 years agoMerge pull request #10980 from SaiGomathiN/namechng
David Lamparter [Tue, 26 Apr 2022 13:26:42 +0000 (15:26 +0200)]
Merge pull request #10980 from SaiGomathiN/namechng

3 years agoMerge pull request #11077 from anlancs/fix/bfdd-hang-pathdown
Rafael Zalamena [Tue, 26 Apr 2022 13:00:32 +0000 (10:00 -0300)]
Merge pull request #11077 from anlancs/fix/bfdd-hang-pathdown

bfdd: fix broken FSM in active mode

3 years agoMerge pull request #11074 from fdumontet6WIND/FMJA/isis_ldp_close
Russ White [Tue, 26 Apr 2022 12:47:10 +0000 (08:47 -0400)]
Merge pull request #11074 from fdumontet6WIND/FMJA/isis_ldp_close

isisd: ldp cleaning issue on invalid sptree

3 years agoMerge pull request #11083 from anlancs/fix/bgpd-minor-format
Russ White [Tue, 26 Apr 2022 12:40:27 +0000 (08:40 -0400)]
Merge pull request #11083 from anlancs/fix/bgpd-minor-format

bgpd: optimize "auto_rt" searching procedure for evpn

3 years agoMerge pull request #11086 from ton31337/feature/rmap_aspath_replace
Russ White [Tue, 26 Apr 2022 12:38:58 +0000 (08:38 -0400)]
Merge pull request #11086 from ton31337/feature/rmap_aspath_replace

bgpd: Add `set as-path replace <any|ASN>` cmd for route-maps

3 years agoMerge pull request #11092 from ton31337/fix/reuse_addf_json
Russ White [Tue, 26 Apr 2022 12:35:53 +0000 (08:35 -0400)]
Merge pull request #11092 from ton31337/fix/reuse_addf_json

bgpd: Drop inet_ntop for route_vty_out_overlay()

3 years agoMerge pull request #11089 from opensourcerouting/build-gcc-11.2
Igor Ryzhov [Tue, 26 Apr 2022 10:18:18 +0000 (13:18 +0300)]
Merge pull request #11089 from opensourcerouting/build-gcc-11.2

build: fix new gcc 11.2 warnings

3 years agopimd: add missing `debug igmp trace detail` 11088/head
David Lamparter [Mon, 25 Apr 2022 12:01:42 +0000 (14:01 +0200)]
pimd: add missing `debug igmp trace detail`

The flag was defined but there was no command to actually enable it.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopimd: fix reversed logic for "debug ... detail"
David Lamparter [Mon, 25 Apr 2022 11:53:17 +0000 (13:53 +0200)]
pimd: fix reversed logic for "debug ... detail"

The normal flag was enabling detail messages, but what we want is the
detail flag enabling normal messages.

Remove the _ONLY macro while at it, it's only used for config print &
that seems like a place where making the difference explicitly visible
is helpful regardless.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agoMerge pull request #11085 from bobuhiro11/fix_func_bits
Donatas Abraitis [Tue, 26 Apr 2022 06:21:39 +0000 (09:21 +0300)]
Merge pull request #11085 from bobuhiro11/fix_func_bits

bgpd: take SRv6 func-bits into account when generating SIDs

3 years agoMerge pull request #11081 from donaldsharp/bgp_import_check
Sri Mohana Singamsetty [Mon, 25 Apr 2022 22:59:46 +0000 (15:59 -0700)]
Merge pull request #11081 from donaldsharp/bgp_import_check

bgpd: Fix import check removal

3 years agoMerge pull request #11080 from chiragshah6/fdev1
Russ White [Mon, 25 Apr 2022 19:21:38 +0000 (15:21 -0400)]
Merge pull request #11080 from chiragshah6/fdev1

tools: frr-reload fix bgp neighbor and bgp instance deletion

3 years agobgpd: Drop inet_ntop for route_vty_out_overlay() 11092/head
Donatas Abraitis [Mon, 25 Apr 2022 17:34:20 +0000 (20:34 +0300)]
bgpd: Drop inet_ntop for route_vty_out_overlay()

Reuse %pI4/%pI6/%pIA

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobuild: fix new gcc 11.2 warnings 11089/head
David Lamparter [Mon, 25 Apr 2022 12:07:41 +0000 (14:07 +0200)]
build: fix new gcc 11.2 warnings

Some recent improvement in GCC triggers 2 new warnings, and they're
actual bugs (reading beyond end of prefix_ipv6 by accessing it as
prefix, which is larger.)  Luckily it's only in sharpd.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agobgpd: Add `set as-path replace <any|ASN>` cmd for route-maps 11086/head
Donatas Abraitis [Mon, 25 Apr 2022 07:34:36 +0000 (10:34 +0300)]
bgpd: Add `set as-path replace <any|ASN>` cmd for route-maps

```
route-map tstas permit 10
 set as-path replace 1
exit
```

Before:

```
donatas-laptop(config-router-af)# do show ip bgp 10.10.10.10/32
BGP routing table entry for 10.10.10.10/32, version 13
Paths: (1 available, best #1, table default)
  Advertised to non peer-group peers:
  192.168.10.65
  65000 1 2 3 123
    192.168.10.65 from 192.168.10.65 (10.10.10.11)
      Origin IGP, metric 0, valid, external, best (First path received)
      Last update: Mon Apr 25 10:39:50 2022
```

After:

```
donatas-laptop(config-router-af)# do show ip bgp 10.10.10.10/32
BGP routing table entry for 10.10.10.10/32, version 15
Paths: (1 available, best #1, table default)
  Advertised to non peer-group peers:
  192.168.10.65
  65000 65010 2 3 123
    192.168.10.65 from 192.168.10.65 (10.10.10.11)
      Origin IGP, metric 0, valid, external, best (First path received)
      Last update: Mon Apr 25 10:40:16 2022
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: take SRv6 func-bits into account when generating SIDs 11085/head
Nobuhiro MIKI [Mon, 25 Apr 2022 08:17:28 +0000 (17:17 +0900)]
bgpd: take SRv6 func-bits into account when generating SIDs

Prior to this fix, the magic number (16) was used regardless of what value
the user specified for func-bits. With this fix, user-specified values are
handled appropriately.

Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp>
3 years agobgpd: optimize "auto_rt" searching procedure for evpn 11083/head
anlan_cs [Sun, 24 Apr 2022 11:49:02 +0000 (07:49 -0400)]
bgpd: optimize "auto_rt" searching procedure for evpn

RT value will be unique across different VNIs but the
same across routers (in the same AS) for a particula
VNI.

It is unique, so add `break` for search procedure.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agobgpd: minor style change
anlan_cs [Mon, 25 Apr 2022 08:16:44 +0000 (04:16 -0400)]
bgpd: minor style change

Correct two style places and one comment.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agopim6d: Modifying the mld group watermark command name 10980/head
Sai Gomathi N [Fri, 8 Apr 2022 06:01:34 +0000 (23:01 -0700)]
pim6d: Modifying the mld group watermark command name

Modifying the "mld_group_watermark_cmd" to "ipv6_mld_group_watermark_cmd"
and "igmp_group_watermark_cmd" to "ip_igmp_group_watermark_cmd" for consistency.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
3 years agopim6d: Removing duplicate PIM_DECLVAR_CONTEXT macro
Sai Gomathi N [Thu, 7 Apr 2022 12:17:49 +0000 (05:17 -0700)]
pim6d: Removing duplicate PIM_DECLVAR_CONTEXT macro

Removing the duplicate PIM_DECLVAR_CONTEXT from
pim_common_cmd.h file.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
3 years agoMerge pull request #11067 from donaldsharp/domainname
Donatas Abraitis [Mon, 25 Apr 2022 04:40:58 +0000 (07:40 +0300)]
Merge pull request #11067 from donaldsharp/domainname

lib: Ensure an empty string does not get printed for host/domain

3 years agobgpd: Fix import check removal 11081/head
Donald Sharp [Sun, 24 Apr 2022 20:52:46 +0000 (16:52 -0400)]
bgpd: Fix import check removal

Fix: 06e4e90132ad23815c6f288dd7e6be334f5ab233

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>
3 years agotools: string literals -> comments 11080/head
Chirag Shah [Sun, 24 Apr 2022 18:48:08 +0000 (11:48 -0700)]
tools: string literals -> comments

Convert string literals to comment.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agostaticd: redo VRF_DEFAULT NHT registers on connect 11079/head
David Lamparter [Sun, 24 Apr 2022 15:17:30 +0000 (17:17 +0200)]
staticd: redo VRF_DEFAULT NHT registers on connect

Other VRFs get VRF_ADD notifications from zebra which triggers
static_fixup_vrf_ids, but since the default VRF is implicit we need to
make that same call on connect.

This should fix problems with staticd being started before (or
concurrent with and thus racing) zebra.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agostaticd: merge NHT register & update, reorganize
David Lamparter [Sun, 24 Apr 2022 15:10:52 +0000 (17:10 +0200)]
staticd: merge NHT register & update, reorganize

nh_update is only called in two places and both precede a matching
follow-up nht_register call.  Fold the update into register, and make
register do the right thingâ„¢ for all cases (i.e. update refcounts as
needed, and retry zebra NHT registration if it failed before).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agostaticd: use double pointer for NHT decref
David Lamparter [Sun, 24 Apr 2022 13:52:23 +0000 (15:52 +0200)]
staticd: use double pointer for NHT decref

Since this is a free()-type function, clear the caller's pointer to
NULL to aid static analysis and prevent UAF bugs.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agostaticd: minor refactor NHT register code
David Lamparter [Sun, 24 Apr 2022 13:47:58 +0000 (15:47 +0200)]
staticd: minor refactor NHT register code

Put static_nexthop -> prefix code into a small helper, remove extra
prefix variable, and grab AFI from prefix.

This commit should not result in any functional change.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib: prefix_afi() helper
David Lamparter [Sun, 24 Apr 2022 13:46:33 +0000 (15:46 +0200)]
lib: prefix_afi() helper

Just quick shorthand to get an afi_t from a prefix.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agobfdd: fix broken FSM in active mode 11077/head
anlan_cs [Fri, 22 Apr 2022 06:38:33 +0000 (02:38 -0400)]
bfdd: fix broken FSM in active mode

With the simple BFD configuration -
(active mode, single hop, without other parameters)
```
!
bfd
 peer 11.11.11.11
 exit
!
```
The interface with 11.11.11.0/24 is a *virtual* interface,
which can be deleted.

After BFD FSM is created and session is ok, do these things:
1) delete this interface
2) create this interface
3) set same ip address in this interface

Now, everything seems completely restored because all configuration
is same. But bad thing happens, BFD session hang on "down" status -
```
root# show bfd peer 11.11.11.11
BFD Peer:
peer 11.11.11.11 vrf default
ID: 638815827
Remote ID: 0
Active mode
Status: down
Downtime: 3 second(s)
Diagnostics: path down <- caused by destroyed interface
Remote diagnostics: ok
```

With the interface creating, `bfdd_sessions_enable_interface()`
wrongly compares added interface with the created, even key of
this `bfd_session` isn't binded with any interface. So this
`bfd_session` will hang on "down" status for ever.

So skip the compare in this case (no interface in key) to wake up
this `bfd_session`.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agotools: frr-reload fix bgp nbr delete
Chirag Shah [Fri, 8 Apr 2022 19:59:53 +0000 (12:59 -0700)]
tools: frr-reload fix bgp nbr delete

When a bgp neighbor removed from associated to peer-group,
the neighbor is fully deleted, subsequent deletion of any
configuration related to the neighbor leads to failure
in frr-reload.

Fix: In frr-reload lines to delete check if any neighbor with
peer-group removal line is present, if so then remove any
further config deletion associated the neighbor needs to removed
from the lines to delete.

Ticket:#3032234
Reviewed By:
Testing Done:

BEFORE FIX:
-----------
2022-04-08 20:03:32,734  INFO: Executed "router bgp 4200000005  no neighbor swp5 interface peer-group UNDERLAY"
2022-04-08 20:03:32,892  INFO: Failed to execute router bgp 4200000005  no neighbor swp5 password SSSS
2022-04-08 20:03:33,050  INFO: Failed to execute router bgp 4200000005  no neighbor swp5 password
2022-04-08 20:03:33,218  INFO: Failed to execute router bgp 4200000005  no neighbor swp5
2022-04-08 20:03:33,354  INFO: Failed to execute router bgp 4200000005  no neighbor
2022-04-08 20:03:33,520  INFO: Failed to execute router bgp 4200000005  no
2022-04-08 20:03:33,521 ERROR: "router bgp 4200000005 --  no" we failed to remove this command
2022-04-08 20:03:33,521 ERROR: % Specify remote-as or peer-group commands first

2022-04-08 20:03:33,691  INFO: Failed to execute router bgp 4200000005  no neighbor swp5 advertisement-interval 0
2022-04-08 20:03:33,853  INFO: Failed to execute router bgp 4200000005  no neighbor swp5 advertisement-interval
2022-04-08 20:03:34,015  INFO: Failed to execute router bgp 4200000005  no neighbor swp5
2022-04-08 20:03:34,145  INFO: Failed to execute router bgp 4200000005  no neighbor
2022-04-08 20:03:34,326  INFO: Failed to execute router bgp 4200000005  no
2022-04-08 20:03:34,327 ERROR: "router bgp 4200000005 --  no" we failed to remove this command
2022-04-08 20:03:34,327 ERROR: % Specify remote-as or peer-group commands first

AFTER FIX:
----------

delete of numbered neighbor:

2022-04-08 19:52:17,204  INFO: Executed "router bgp 4200000005  no
neighbor 1.2.3.4 peer-group UNDERLAY"
2022-04-08 19:52:17,205  INFO: /var/run/frr/reload-GRFX1M.txt content

delete of unnumbered neighbor:
2022-04-08 20:00:02,952  INFO: Executed "router bgp 4200000005  no
neighbor swp5 interface peer-group UNDERLAY"
2022-04-08 20:00:02,953  INFO: /var/run/frr/reload-722C3P.txt content

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agotools: fix bgp instances deletion in frr-reload
Chirag Shah [Sat, 4 Dec 2021 21:27:29 +0000 (13:27 -0800)]
tools: fix bgp instances deletion in frr-reload

BGPd does not allow default instance deletion
in presence of bgp vrf instance;
frr-reload script fails if delete list contains
default instance followed by vrf instance.

Fix:
frr-reload scans lines_to_delete to look for
'router bgp' and 'router bgp vrf ...' line.
If both are present switch the order to delete
bgp vrf instance(s) than default instance at the end.

Testing Done:

Before:

  INFO: Loading Config object from file /etc/frr/frr.conf
  INFO: Loading Config object from vtysh show running
  INFO: Failed to execute no router bgp 40201 <-- Failed to delete
  INFO: Failed to execute no router bgp
  INFO: Failed to execute no router
 ERROR: "no router" we failed to remove this command
 ERROR: % Cannot delete default BGP instance. Dependent VRF instances exist

  INFO: Executed "no router bgp 40201 vrf bgp-test" <-- vrf instance deleted
  INFO: Loading Config object from vtysh show running

After:
  order of deletion switched

  INFO: Loading Config object from file /etc/frr/frr.conf
  INFO: Loading Config object from vtysh show running
  INFO: Executed "no router bgp 40201 vrf bgp-test"
  INFO: Executed "no router bgp 40201"
  INFO: Loading Config object from vtysh show running

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agovrrpd: Fix display of 'Master Advertisement interval' 11076/head
Rajesh Varatharaj [Fri, 22 Apr 2022 21:16:25 +0000 (14:16 -0700)]
vrrpd: Fix display of 'Master Advertisement interval'

VRRP as per RFC 5798 'Master Advertisement interval' field refers to the
advertisement interval, we received the last time we got an Advertisement
from a peer who wasn't us, who was in the master state.
This could be clarified by making the field name 'Master Advertisement
interval (rx)',and when we're in the Master state, we put (stale) after the interval.

Signed-off-by: Rajesh Varatharaj <rvaratharaj@nvidia.com>
3 years agoisisd: ldp cleaning issue on invalid sptree 11074/head
Francois Dumontet [Fri, 22 Apr 2022 17:37:38 +0000 (19:37 +0200)]
isisd: ldp cleaning issue on invalid sptree

That commit aim is to fix an invalid isis access to sptree when
lpd is stopping. isisd is running.

lpd and isisd are running. isis is L1 type configured.
isis_ldp_rlfa_handle_client_close function try to clear
uninitialized spftree.

Expected behavior: isisd not crashing and running.
isis_ldp_rlfa_handle_client_close not trying to clear spftree
that are not initializes due tio the configuration.

Fix: test the configured area's type avoiding to deleted
an unconfigured sptree. function isis_rlfa_handle_client_close
will be aligned on spftree_area_del function

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
3 years agoMerge pull request #11064 from opensourcerouting/fix/allow_only_euid_0_running_frrinit
Donald Sharp [Thu, 21 Apr 2022 23:49:47 +0000 (19:49 -0400)]
Merge pull request #11064 from opensourcerouting/fix/allow_only_euid_0_running_frrinit

tools: Allow running frrinit.sh only for EUID=0

3 years agoMerge pull request #11066 from mobash-rasool/fixes
Donald Sharp [Thu, 21 Apr 2022 23:47:36 +0000 (19:47 -0400)]
Merge pull request #11066 from mobash-rasool/fixes

pimd: Set new to true in igmp_get_source_by_addr api

3 years agolib: Ensure an empty string does not get printed for host/domain 11067/head
Donald Sharp [Thu, 21 Apr 2022 18:13:01 +0000 (14:13 -0400)]
lib: Ensure an empty string does not get printed for host/domain

End operator is showing:
!
frr version 8.0.1
frr defaults traditional
hostname test.example.com
domainname

domainname should not be printed in this case at all.  I do not
see any mechanism in current code that this could happen, but
what do I know?  Put some extra stupid insurance in place
to prevent bad config from being generated.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopimd: Set new to true in igmp_get_source_by_addr api 11066/head
Mobashshera Rasool [Thu, 21 Apr 2022 10:01:33 +0000 (03:01 -0700)]
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>
3 years agoMerge pull request #11063 from opensourcerouting/feature/usage_frrinit_more
Donald Sharp [Wed, 20 Apr 2022 19:04:37 +0000 (15:04 -0400)]
Merge pull request #11063 from opensourcerouting/feature/usage_frrinit_more

tools: Improve usage example for frrinit.sh

3 years agoMerge pull request #11061 from pguibert6WIND/debug_isis_bfd_too
Donald Sharp [Wed, 20 Apr 2022 19:04:16 +0000 (15:04 -0400)]
Merge pull request #11061 from pguibert6WIND/debug_isis_bfd_too

isisd: enable BFD messaging debug when isis bfd is used

3 years agoMerge pull request #11060 from pguibert6WIND/isis_dr_resign_debug
Donald Sharp [Wed, 20 Apr 2022 19:03:12 +0000 (15:03 -0400)]
Merge pull request #11060 from pguibert6WIND/isis_dr_resign_debug

isisd: isis_dr_resign() trace braced with debug isis events

3 years agoMerge pull request #7811 from kuldeepkash/multicast_pim_dr_nondr
Jafar Al-Gharaibeh [Wed, 20 Apr 2022 17:52:46 +0000 (12:52 -0500)]
Merge pull request #7811 from kuldeepkash/multicast_pim_dr_nondr

tests: Add multicast_pim_dr_nondr_test suite

3 years agoMerge pull request #9757 from donaldsharp/zebra_trace
Donatas Abraitis [Wed, 20 Apr 2022 16:05:17 +0000 (19:05 +0300)]
Merge pull request #9757 from donaldsharp/zebra_trace

Zebra trace

3 years agotools: Allow running frrinit.sh only for EUID=0 11064/head
Donatas Abraitis [Wed, 20 Apr 2022 15:33:06 +0000 (18:33 +0300)]
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>
3 years agotools: Improve usage example for frrinit.sh 11063/head
Donatas Abraitis [Wed, 20 Apr 2022 15:08:51 +0000 (18:08 +0300)]
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>
3 years agoisisd: enable BFD messaging debug when isis bfd is used 11061/head
Philippe Guibert [Thu, 7 Apr 2022 09:13:34 +0000 (11:13 +0200)]
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>
3 years agoisisd: isis_dr_resign() trace braced with debug isis events 11060/head
Philippe Guibert [Wed, 20 Apr 2022 11:50:39 +0000 (13:50 +0200)]
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>
3 years agozebra: Name variable better in zebra_trace.h 9757/head
Donald Sharp [Wed, 20 Apr 2022 13:49:36 +0000 (09:49 -0400)]
zebra: Name variable better in zebra_trace.h

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Add tracepoint for netlink_rule_change
Donald Sharp [Wed, 6 Oct 2021 12:59:27 +0000 (08:59 -0400)]
zebra: Add tracepoint for netlink_rule_change

Add a tracepoint for the netlink_rule_change function.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Add tracepoint for netlink_route_change_read_unicast
Donald Sharp [Wed, 6 Oct 2021 12:56:46 +0000 (08:56 -0400)]
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>
3 years agozebra: Add netlink_interface_addr tracepoint
Donald Sharp [Wed, 6 Oct 2021 12:53:02 +0000 (08:53 -0400)]
zebra: Add netlink_interface_addr tracepoint

Add a tracepoint for netlink_interface_addr.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Add netlink_nexthop_change tracepoint
Donald Sharp [Wed, 6 Oct 2021 12:49:58 +0000 (08:49 -0400)]
zebra: Add netlink_nexthop_change tracepoint

Add a tracepoint for the netlink_nexthop_change function.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Add netlink_request_intf_addr tracepoint
Donald Sharp [Wed, 6 Oct 2021 12:34:35 +0000 (08:34 -0400)]
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>
3 years agozebra: Add initial zebra tracepoint support
Donald Sharp [Wed, 6 Oct 2021 12:22:48 +0000 (08:22 -0400)]
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>
3 years agoMerge pull request #11055 from donaldsharp/plist_crash
Donatas Abraitis [Wed, 20 Apr 2022 12:15:08 +0000 (15:15 +0300)]
Merge pull request #11055 from donaldsharp/plist_crash

lib: Prevent crash after shutdown request

3 years agoMerge pull request #10853 from plsaranya/pim_assert_fixes
Donald Sharp [Wed, 20 Apr 2022 11:57:40 +0000 (07:57 -0400)]
Merge pull request #10853 from plsaranya/pim_assert_fixes

pimd: assert fixes

3 years agoMerge pull request #10961 from opensourcerouting/build-ms-ext
Donald Sharp [Wed, 20 Apr 2022 11:51:45 +0000 (07:51 -0400)]
Merge pull request #10961 from opensourcerouting/build-ms-ext

build: enable `-fms-extensions`

3 years agoMerge pull request #11052 from opensourcerouting/fix/log_dir_permissions
Donald Sharp [Wed, 20 Apr 2022 11:45:08 +0000 (07:45 -0400)]
Merge pull request #11052 from opensourcerouting/fix/log_dir_permissions

packaging: A couple of fixes for /var/log/frr

3 years agoMerge pull request #11023 from AbhishekNR/igmp_flag
Donald Sharp [Wed, 20 Apr 2022 11:43:09 +0000 (07:43 -0400)]
Merge pull request #11023 from AbhishekNR/igmp_flag

pimd: Changing PIM_OIF_FLAG_PROTO_IGMP to PIM_OIF_FLAG_PROTO_GM

3 years agoMerge pull request #11051 from donaldsharp/speell_more
Donatas Abraitis [Wed, 20 Apr 2022 08:04:14 +0000 (11:04 +0300)]
Merge pull request #11051 from donaldsharp/speell_more

Speell more

3 years agoMerge pull request #11045 from anlancs/fix/bgpd-cleanup-8-remove
mobash-rasool [Wed, 20 Apr 2022 07:58:17 +0000 (13:28 +0530)]
Merge pull request #11045 from anlancs/fix/bgpd-cleanup-8-remove

zebra: cleanup duplicated "extern"s for evpn-mh

3 years agoMerge pull request #11046 from opensourcerouting/fix/issue_template
Donald Sharp [Wed, 20 Apr 2022 00:01:54 +0000 (20:01 -0400)]
Merge pull request #11046 from opensourcerouting/fix/issue_template

github: Use checkboxes for issue templates

3 years agoMerge pull request #11048 from opensourcerouting/fix/fsync_before_fclose
Donald Sharp [Tue, 19 Apr 2022 22:37:18 +0000 (18:37 -0400)]
Merge pull request #11048 from opensourcerouting/fix/fsync_before_fclose

vtysh: Call fflush+fsync before calling fclose() when saving the config

3 years agoMerge pull request #11004 from volodymyrhuti/master
Donald Sharp [Tue, 19 Apr 2022 22:36:52 +0000 (18:36 -0400)]
Merge pull request #11004 from volodymyrhuti/master

zebra: set ZEBRA_IFC_DOWN on connected routes for inactive interfaces

3 years agozebra: set ZEBRA_IFC_DOWN on connected routes for inactive interfaces 11004/head
Volodymyr Huti [Mon, 11 Apr 2022 03:58:14 +0000 (06:58 +0300)]
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>
3 years agoMerge pull request #11050 from opensourcerouting/fix/pathd_missing
Donald Sharp [Tue, 19 Apr 2022 18:57:46 +0000 (14:57 -0400)]
Merge pull request #11050 from opensourcerouting/fix/pathd_missing

packaging: Add pathd to logrotate

3 years agoMerge pull request #11049 from opensourcerouting/fix/usage_for_frrinit.sh
Donald Sharp [Tue, 19 Apr 2022 18:57:03 +0000 (14:57 -0400)]
Merge pull request #11049 from opensourcerouting/fix/usage_for_frrinit.sh

tools: Print usage for frrinit.sh when running without arguments

3 years agolib: Prevent crash after shutdown request 11055/head
Donald Sharp [Tue, 19 Apr 2022 18:48:29 +0000 (14:48 -0400)]
lib: Prevent crash after shutdown request

Recent commit e92508a741e03b8721ccb3424cbebe4d5476e9d 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>
3 years agopackaging: Add pathd to logrotate 11050/head
Donatas Abraitis [Tue, 19 Apr 2022 11:55:42 +0000 (14:55 +0300)]
packaging: Add pathd to logrotate

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agoMerge pull request #10908 from donaldsharp/proto_only_error
mobash-rasool [Tue, 19 Apr 2022 15:57:29 +0000 (21:27 +0530)]
Merge pull request #10908 from donaldsharp/proto_only_error

zebra: When `zebra nexthop proto only` limit errors

3 years agoMerge pull request #10977 from bobuhiro11/alloc_sid_based_on_prefix
Russ White [Tue, 19 Apr 2022 15:17:57 +0000 (11:17 -0400)]
Merge pull request #10977 from bobuhiro11/alloc_sid_based_on_prefix

bgpd: take SRv6 locator's prefix length into account when generating SIDs

3 years agoMerge pull request #10983 from pguibert6WIND/show_isis_nbr_bfd
Russ White [Tue, 19 Apr 2022 15:17:31 +0000 (11:17 -0400)]
Merge pull request #10983 from pguibert6WIND/show_isis_nbr_bfd

isisd: add bfd information on isis neighbor show command

3 years agoMerge pull request #11030 from ranjanyash54/minls
Russ White [Tue, 19 Apr 2022 15:13:05 +0000 (11:13 -0400)]
Merge pull request #11030 from ranjanyash54/minls

ospf6d: Check for MinLSInterval timer when adding to LSUpdate list

3 years agoMerge pull request #11040 from donaldsharp/bgp_type5_route_handling
Donatas Abraitis [Tue, 19 Apr 2022 14:35:22 +0000 (17:35 +0300)]
Merge pull request #11040 from donaldsharp/bgp_type5_route_handling

bgpd: Allow type 5 routes to be handled better when link is flapping

3 years agopackaging: Use 0640 (frr:frr) as permissions when running under logrotate 11052/head
Donatas Abraitis [Tue, 19 Apr 2022 13:45:03 +0000 (16:45 +0300)]
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>
3 years agopackaging: Set default permissions for /var/log/frr to 0755
Donatas Abraitis [Tue, 19 Apr 2022 11:53:55 +0000 (14:53 +0300)]
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>
3 years ago*: Fix spelling of accidently 11051/head
Donald Sharp [Tue, 19 Apr 2022 12:31:30 +0000 (08:31 -0400)]
*: Fix spelling of accidently

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