Commit Graph

30375 Commits

Author SHA1 Message Date
Siger Yang
7ef70ad5d4
doc: add vrrp interoperability help and command
Add VRRPv3 `checksum-with-ipv4-pseudoheader` command and
interoperability help text.

Signed-off-by: Siger Yang <siger.yang@outlook.com>
2022-11-29 03:59:23 +08:00
Jafar Al-Gharaibeh
e7ae04259d
Merge pull request #12414 from opensourcerouting/fix/update_workflow
Some doc changes
2022-11-28 14:36:54 -05:00
Donatas Abraitis
f4ebc6f04e doc: Do not forget to update the reference table for release dates
As a part of release, an additional checkpoint when creating a stabilization
branch.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-28 17:37:24 +02:00
Donatas Abraitis
9de44c0a1b doc: Update release dates and add a hint on how to get dates correctly
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-28 17:37:23 +02:00
Donald Sharp
0ec939675a ospf6d: Consolidate to ospf6_route_is_identical
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-11-28 10:30:31 -05:00
Donald Sharp
8f1bf68740 ospf6d: ospf6_route_cmp_nexthops make return sane
The ospf6_route_cmp_nexthops function was returning 0 for same
and 1 for not same.  Let's reverse the polarity and actually make
the returns useful long term.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-11-28 09:41:03 -05:00
Donald Sharp
7b7ca2d319 ospfd: Do not auto-debug DR-Election notifications
Every 1/2 hour my logs are filling up with this:
2022-11-26 13:54:47.531 [DEBG] ospfd: [P4PQ9-K4XFD] DR-Election[1st]: Backup 192.168.119.229
2022-11-26 13:54:47.531 [DEBG] ospfd: [HBZ7F-65Y86] DR-Election[1st]: DR     192.168.119.229
2022-11-26 13:54:47.531 [DEBG] ospfd: [H01MF-RN00N] DR-Election[2nd]: Backup 0.0.0.0
2022-11-26 13:54:47.531 [DEBG] ospfd: [R7BJ4-KP8JT] DR-Election[2nd]: DR     192.168.119.229

This should be guarded by an if check to ensure that the operator really
wants to see this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-11-28 08:57:38 -05:00
Donald Sharp
15e78e64b4 ospfd: Do not always debug joining AllDRouters Multicast group
My log file is filling up with:
2022-11-26 13:24:47.532 [DEBG] ospfd: [RY794-DQ7AK] interface 192.168.119.229 [2] join AllDRouters Multicast group.

Every 1/2 hour.  There is nothing an operator needs to do here and nothing
that they can change.  Let's guard this output.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-11-28 08:53:20 -05:00
Donald Sharp
74f3656d12 bgpd: Null checking is not needed on failure
Memory allocations that fail crash the program.  Checking
for NULL is not going to do anything.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-11-28 08:52:48 -05:00
Donald Sharp
89eb8c8e4d
Merge pull request #12389 from opensourcerouting/ospf6d-asbr-infinite-loop
ospf6d: fix infinite loop when adding ASBR route
2022-11-28 08:45:50 -05:00
Francois Dumontet
bb31900439 topotest: add test for confederation
add a test dedicated to confederation. it also take into
account the support of AS memberwith same id  that the
confederation id.

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
2022-11-28 14:24:49 +01:00
Donald Sharp
b90a00d151
Merge pull request #12405 from opensourcerouting/static-improv
staticd: improve CLI/northbound translation code
2022-11-28 08:13:09 -05:00
Donald Sharp
d58334ea1c
Merge pull request #12342 from opensourcerouting/fix/small_waiting_times
tests: Fail tests immediately if they use too low wait/count values
2022-11-28 08:10:23 -05:00
Donald Sharp
398c407399
Merge pull request #12363 from opensourcerouting/feature/add_size_label_github
github: Create size label for every PR
2022-11-28 07:48:52 -05:00
Donald Sharp
e54bb3e725
Merge pull request #12408 from opensourcerouting/fix/mpls_vtysh_print
zebra: Use `mpls enable`, not `mpls` when generating a config
2022-11-28 07:48:16 -05:00
Rafael Zalamena
a082324649 lib: handle visual studio code C/C++ extension
Add some `pragma`s to handle errors that the C/C++ extension is not able
to understand.

Move `TRANSPARENT_UNION` to `lib/compiler.h` for consistency.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2022-11-28 08:21:25 -03:00
Donatas Abraitis
79e9f21287
Merge pull request #12369 from mruprich/frr-run-as-non-root
tools: Enable start of FRR for non-root user
2022-11-28 11:31:36 +02:00
Donatas Abraitis
35c46a8718 zebra: Use mpls enable, not mpls when generating a config
If we enable MPLS for an interface via sysctl, we should write `mpls enable`,
not `mpls`.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-28 11:14:06 +02:00
Donatas Abraitis
39fc44d51a
Merge pull request #12403 from donaldsharp/echo_exclusion
Echo exclusion
2022-11-28 10:07:44 +02:00
mobash-rasool
1ad9201f08
Merge pull request #12399 from opensourcerouting/fix/static_color_crash
staticd: Fix crash for an existing route with color
2022-11-27 00:55:40 +05:30
Donald Sharp
a8a0f80b63 lib: Do not log echo PING commands from watchfrr
Since the `echo PING` commands are from watchfrr and are sent
a whole bunch when an operator has `log commands` on the amount
of logging done is quite significant.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-11-26 09:30:48 -05:00
Donald Sharp
bcb486dd3c zebra: Fix tracepoint changes for lttng
The recent tracepoint additions in c317d3f246
did not properly setup the tracepoints for lttng.  Fix this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-11-26 09:30:48 -05:00
Rafael Zalamena
fc6f9d7425 staticd: improve CLI/northbound translation code
Simplify all DEFUNs by moving all logic to the northbound translation
function and transforming all function parameters into a single
structure.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2022-11-25 16:26:10 -03:00
Jafar Al-Gharaibeh
37bc1a024d
Merge pull request #12370 from opensourcerouting/fix/crash_rmap_vpn_nexthop
bgpd: Fix crash for `set ipv4/ipv6 vpn next-hop` command
2022-11-25 10:18:40 -05:00
Francois Dumontet
b0a8f709a5 bgp: fix case where confederation id same as member-as
currently the following configuration

dut:

!
interface ntfp2
 ip router isis 1
!
router bgp 200
 no bgp ebgp-requires-policy
 bgp confederation identifier 300
 bgp confederation peers 300
 neighbor 192.168.1.1 remote-as 100
 neighbor 192.168.2.2 remote-as 300
 !
 address-family ipv4 unicast
  neighbor 192.168.2.2 default-originate
 exit-address-family
!
router isis 1
 is-type level-2-only
 net 49.0001.0002.0002.0002.00
 redistribute ipv4 connected level-2
!
end

router:

!
interface ntfp2
 ip router isis 1
 isis circuit-type level-2-only
!
router bgp 300
 no bgp ebgp-requires-policy
 bgp confederation identifier 300
 bgp confederation peers 200
 neighbor 192.168.2.1 remote-as 200
 neighbor 192.168.3.2 remote-as 400
 !
 address-family ipv4 unicast
  network 3.3.3.0/24
 exit-address-family
!
router isis 1
 is-type level-2-only
 net 49.0001.0003.0003.0003.00
 redistribute ipv4 connected level-2
!
end

on dut result of show bgp ipv4 unicast command is:
show bgp ipv4 unicast

  BGP table version is 1, local router ID is 192.168.2.1, vrf id 0
  Default local pref 100, local AS 200
  Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
                 i internal, r RIB-failure, S Stale, R Removed
  Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
  Origin codes:  i - IGP, e - EGP, ? - incomplete
  RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
  *> 1.1.1.0/24       192.168.1.1              0             0 100 i

instead of

sho bgp ipv4 unicast
BGP table version is 3, local router ID is 192.168.2.1, vrf id 0
Default local pref 100, local AS 200
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.0/24       192.168.1.1              0             0 100 i
*> 3.3.3.0/24       192.168.2.2              0    100      0 (300) i
*> 4.4.4.0/24       192.168.3.2              0    100      0 (300) 400 i

Displayed  3 routes and 3 total paths

According to RFC 5065:the usage of one of the member AS number as the
confederation identifier is not forbidden.

fixes are the following

in bgp_route.c:
in bgp_update remove the test for presence of confederation id in
as_path since, this case is allowed;

in bgp_vty.c
bgp_confederation_peers, remove the test on peer as value

in bgpd.c
bgp_confederation_peers_add
remove the test on peer as value
invert the order of setting peer->sort value and peer->local_as,
since peer->sort is depending from current peer->local_as value

bgp_confederation_peers_remove
invert the order of setting peer->sort value and peer->local_as,
since peer->sort is depending from current peer->local_as value

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
2022-11-25 15:28:32 +01:00
Donatas Abraitis
3278956b17 staticd: Do not crash when modifying an existing static route with color
```
$ vtysh -c 'conf' -c 'ip route 192.168.0.0/32 192.168.10.65 color 123'
$ vtysh -c 'show ip route 192.168.0.0/32 json' | jq '."192.168.0.0/32"[0].nexthops[0].srteColor'
123
$ vtysh -c 'conf' -c 'ip route 192.168.0.0/32 192.168.10.65'
$ vtysh -c 'show ip route 192.168.0.0/32 json' | jq '."192.168.0.0/32"[0].nexthops[0].srteColor'
0
```

Before this patch:
```
STATIC: Received signal 6 at 1666938633 (si_addr 0x4e1a, PC 0x7f295139c438); aborting...
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(zlog_backtrace_sigsafe+0x70) [0x7f29519ef0a0]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(zlog_signal+0xec) [0x7f29519ef28c]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(+0xccee2) [0x7f2951a1aee2]
STATIC: /lib/x86_64-linux-gnu/libpthread.so.0(+0x11390) [0x7f2951742390]
STATIC: /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38) [0x7f295139c438]
STATIC: /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7f295139e03a]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(_zlog_assert_failed+0xe6) [0x7f2951a46766]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(+0xae7ee) [0x7f29519fc7ee]
STATIC: /home/u1/mGIT/frr-master/staticd/.libs/lt-staticd(routing_control_plane_protocols_control_plane_protocol_staticd_route_list_src_
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(+0xaf264) [0x7f29519fd264]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(+0xafb4f) [0x7f29519fdb4f]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(nb_candidate_commit_apply+0x33) [0x7f29519fde33]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(nb_candidate_commit+0x9e) [0x7f29519fdf6e]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(+0xb0469) [0x7f29519fe469]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(+0xb3055) [0x7f2951a01055]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(nb_cli_apply_changes+0xd8) [0x7f2951a01358]
STATIC: /home/u1/mGIT/frr-master/staticd/.libs/lt-staticd() [0x407ec2]
STATIC: /home/u1/mGIT/frr-master/staticd/.libs/lt-staticd() [0x40a307]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(+0x74923) [0x7f29519c2923]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(cmd_execute_command+0xe4) [0x7f29519c2aa4]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(cmd_execute+0xc9) [0x7f29519c2c49]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(+0xe4184) [0x7f2951a32184]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(+0xe4436) [0x7f2951a32436]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(+0xe6fcc) [0x7f2951a34fcc]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(thread_call+0x98) [0x7f2951a2cc28]
STATIC: /home/u1/mGIT/frr-master/lib/.libs/libfrr.so.0(frr_run+0xe8) [0x7f29519e7518]
STATIC: /home/u1/mGIT/frr-master/staticd/.libs/lt-staticd(main+0xda) [0x40572a]
STATIC: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f2951387840]
STATIC: /home/u1/mGIT/frr-master/staticd/.libs/lt-staticd(_start+0x29) [0x4058e9]
STATIC: in thread vtysh_read scheduled from lib/vty.c:2710 vty_event()
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-25 16:22:34 +02:00
Donatas Abraitis
30560259e4
Merge pull request #12392 from patrasar/pimv6_bsm_cli
pim6d: Fix RpAddress in "show ipv6 pim bsm-database"
2022-11-25 11:01:46 +02:00
Siger Yang
9f2379bdd2
vrrpd: add IPv4 pseudoheader option for VRRPv3
This commit adds a new option to control whether a VRRPv3 group
accepts / computes its checksum with a prepended IPv4 pseudoheader.
This should improve interoperability with other devices.

Signed-off-by: Siger Yang <siger.yang@outlook.com>
2022-11-25 16:21:59 +08:00
Donatas Abraitis
a433c49cc6
Merge pull request #12371 from proelbtn/fix-frr-reload-doesnot-work
bgpd: Fix the order of SRv6 locator parameters
2022-11-25 09:20:50 +02:00
Sarita Patra
5abe4eef2c pim6d: Fix RpAddress in "show ipv6 pim bsm-database"
The fix for issue #12089 was reverted while resolving conflict
for PR https://github.com/FRRouting/frr/pull/11600/.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2022-11-24 22:43:15 -08:00
Renato Westphal
4dfe15200a ospf6d: fix infinite loop when adding ASBR route
Commit 8f359e1593 removed a check that prevented the same route
from being added twice. In certain topologies, that change resulted in
the following infinite loop when adding an ASBR route:

ospf6_route_add
 ospf6_top_brouter_hook_add
  ospf6_abr_examin_brouter
   ospf6_abr_examin_summary
    ospf6_route_add
     (repeat until stack overflow)

Revert the offending commit and update `ospf6_route_is_identical()` to
not do comparison using `memcmp()`.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2022-11-24 13:08:26 -03:00
Russ White
d15c84fa22
Merge pull request #12317 from mobash-rasool/ospf-fixes
ospfd: Fix RFC conformance test cases 25.19 and 27.6
2022-11-24 10:21:25 -05:00
Donatas Abraitis
7718ba25e0 bgpd: Implement BGP4V2-MIB (bgp4V2PeerErrorsTable)
```
iso.3.6.1.3.5.1.1.3.1.1.1.4.192.168.10.64 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.1.1.4.192.168.10.65 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.1.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.1.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.1.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.2.1.4.192.168.10.64 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.2.1.4.192.168.10.65 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.2.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.2.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.2.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.3.1.4.192.168.10.64 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.3.1.4.192.168.10.65 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.3.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.3.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.3.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.4.1.4.192.168.10.64 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.4.1.4.192.168.10.65 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.4.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.4.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.4.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.5.1.4.192.168.10.64 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.5.1.4.192.168.10.65 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.5.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.5.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.5.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.6.1.4.192.168.10.64 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.6.1.4.192.168.10.65 = Gauge32: 6
iso.3.6.1.3.5.1.1.3.1.6.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.6.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.6.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.7.1.4.192.168.10.64 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.7.1.4.192.168.10.65 = Gauge32: 2
iso.3.6.1.3.5.1.1.3.1.7.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.7.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.7.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Gauge32: 0
iso.3.6.1.3.5.1.1.3.1.8.1.4.192.168.10.64 = Gauge32: 22223
iso.3.6.1.3.5.1.1.3.1.8.1.4.192.168.10.65 = Gauge32: 22227
iso.3.6.1.3.5.1.1.3.1.8.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Gauge32: 22223
iso.3.6.1.3.5.1.1.3.1.8.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Gauge32: 22223
iso.3.6.1.3.5.1.1.3.1.8.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Gauge32: 22223
iso.3.6.1.3.5.1.1.3.1.9.1.4.192.168.10.64 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.9.1.4.192.168.10.65 = Hex-STRING: 4F 4B 00
iso.3.6.1.3.5.1.1.3.1.9.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.9.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.9.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.10.1.4.192.168.10.64 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.10.1.4.192.168.10.65 = Hex-STRING: 02 4F 4B 00
iso.3.6.1.3.5.1.1.3.1.10.2.16.42.2.71.128.1.35.0.0.0.0.0.0.0.0.0.2 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.10.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.121 = Hex-STRING: 00
iso.3.6.1.3.5.1.1.3.1.10.2.16.42.12.47.7.72.150.6.102.0.0.0.0.0.0.177.128 = Hex-STRING: 00
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-24 16:57:03 +02:00
Donatas Abraitis
3573b171e0 bgpd: Keep the notification data under peer's struct when sending
Before this patch, data is flushed, and we can't see the data after we send
the notification.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-24 16:57:02 +02:00
Rafael Zalamena
f68114c1c3 bfdd: fix IPv4 socket source selection
The imported BFD code had some logic to ignore the source address when
using single hop IPv4. The BFD peer socket function should allow the
source to be selected so we can:
1. Select the source address in the outgoing packets
2. Only receive packets from that specific source

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2022-11-24 11:16:18 -03:00
Ryoga Saito
4d0ee77eaf tests: Correct srv6 locator testcases
Previous commit changes the order of srv6 locator parameters. So, this
PR reflect the previous changes.

Signed-off-by: Ryoga Saito <ryoga.saito@linecorp.com>
2022-11-24 17:19:53 +09:00
Abhishek N R
86fb444df6 pimd, pim6d: Using ttable for displaying "show ip/ipv6 pim bsrp-info" command output
Fixes: #11246

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-11-23 23:56:33 -08:00
Donatas Abraitis
f6ebf84d43
Merge pull request #12374 from sworleys/VRF-Disable
lib: disable vrf before terminating interfaces
2022-11-24 09:28:42 +02:00
Donatas Abraitis
c58e9095bf
Merge pull request #12365 from chiragshah6/fdev2
bgpd: JSON support for show ip bgp vrf all update-group
2022-11-24 09:03:47 +02:00
Ashwini Reddy
fa5a9276d1 bgpd: JSON support for show ip bgp vrf all update-group
Ticket:#3229030
Testing Done: UT

Changes:

 - JSON support for the update group command.

Testing:

torc-11# show ip bgp vrf all ipv6 update-groups json

torc-12# show bgp vrf all update-groups json
{
  "default":{
    "2":{
      "groupCreateTime":{
        "epoch":1669225617,
        "epochString":"Wed Nov 23 17:46:57 2022\n"
      },
      "afi":"IPv6",
      "safi":"unicast",
      "outRouteMap":"MY_ORIGIN_ASPATH_ONLY",
      "minRouteAdvInt":0,
      "subGroup":[
        {
          "subGroupId":2,
          "groupCreateTime":{
            "epoch":1669225617,
            "epochString":"Wed Nov 23 17:46:57 2022\n"
          },
          "statistics":{
            "joinEvents":2,
            "pruneEvents":0,
            "mergeEvents":0,
            "splitEvents":0,
            "switchEvents":0,
            "peerRefreshEvents":0,
            "mergeCheckEvents":2
          },
          "coalesceTime":1100,
          "version":12,
          "packetQueueInfo":{
            "qeueueLen":0,
            "queuedTotal":1,
            "queueHwmLen":1,
            "totalEnqueued":1
          },
          "adjListCount":1,
          "needsRefresh":false,
          "peers":[
            "uplink_1",
            "uplink_2"
          ]
        }
      ]
    }
  }
}
{
  "sym_3":{
  }
}
{
  "sym_5":{
  }
}
{
  "sym_2":{
  }
}
{
  "sym_4":{
  }
}
{
  "sym_1":{
  }
}

Co-authored-by: Chirag Shah <chirag@nvidia.com>
Signed-off-by: Ashwini Reddy <ashred@nvidia.com>
2022-11-23 19:04:00 -08:00
Mark Stapp
a86afb3e0e
Merge pull request #12377 from opensourcerouting/fix/enable_scripting
zebra: Replace TC definitions for dplane
2022-11-23 15:53:50 -05:00
mobash-rasool
7fa0639372
Merge pull request #12260 from opensourcerouting/pim-plist-masklen
pimd: consistently ignore prefix list mask len
2022-11-23 23:32:17 +05:30
Donatas Abraitis
2272627571 zebra: Replace TC definitions for dplane
They were replaced, but forgot for `--enable-scripting`.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-11-23 17:35:33 +02:00
Michal Ruprich
d8743c28ea doc: Adding a description for a new option
Documentation for FRR_NO_ROOT option added to the
/etc/frr/daemons file

Signed-off-by: Michal Ruprich <mruprich@redhat.com>
2022-11-23 10:19:33 +01:00
Michal Ruprich
1d42fb941a tools: Enable start of FRR for non-root user
There might be use cases when this would make sense, for example
running FRR in a container as a designated user.

Signed-off-by: Michal Ruprich <mruprich@redhat.com>
2022-11-23 10:19:10 +01:00
Donatas Abraitis
89f74214e7
Merge pull request #12355 from mobash-rasool/pim6-conformance
pim6d, pimd: RFC conformance - Discard join/prune msg when WC bit is set but RPT bit is unset
2022-11-23 11:07:05 +02:00
Abhishek N R
774d8ad38b pimd, pim6d: Using ttable for displaying "show ip/ipv6 pim nexthop" command output
Before:

R4(config)# do show ipv6 pim nexthop
Number of registered addresses: 6
Address         Interface        Nexthop
---------------------------------------------
3700🔢1234🔢1234🔢1234:1234 ens161           fe80::250:56ff:feb7:d8d5
5101::10        ens224.51        5101::10
3300::5555      ens161           fe80::250:56ff:feb7:d8d5
4400::1         ens161           fe80::250:56ff:feb7:d8d5
1020::10        ens257           1020::10
3000::1         ens192.4010      fe80::250:56ff:feb7:493b
3000::1         ens193.4015      fe80::250:56ff:feb7:b12a

After:

frr# show ipv6 pim nexthop
Number of registered addresses: 2
Address         Interface        Nexthop
---------------------------------------------
105::105        lo               105::105
12::1           ens192           fe80::250:56ff:feb7:38de

Issue: #11246

Signed-off-by: Abhishek N R <abnr@vmware.com>
2022-11-22 22:59:30 -08:00
Stephen Worley
b14fa9c4dc lib: disable vrf before terminating interfaces
We must disable the vrf before we start terminating interfaces.

On termination, we free the 'zebra_if' struct from the interface ->info
pointer. We rely on that for subsystems like vxlan for cleanup when
shutting down.

'''
==497406== Invalid read of size 8
==497406==    at 0x47E70A: zebra_evpn_del (zebra_evpn.c:1103)
==497406==    by 0x47F004: zebra_evpn_cleanup_all (zebra_evpn.c:1363)
==497406==    by 0x4F2404: zebra_evpn_vxlan_cleanup_all (zebra_vxlan.c:1158)
==497406==    by 0x4917041: hash_iterate (hash.c:267)
==497406==    by 0x4F25E2: zebra_vxlan_cleanup_tables (zebra_vxlan.c:5676)
==497406==    by 0x4D52EC: zebra_vrf_disable (zebra_vrf.c:209)
==497406==    by 0x49A247F: vrf_disable (vrf.c:340)
==497406==    by 0x49A2521: vrf_delete (vrf.c:245)
==497406==    by 0x49A2E2B: vrf_terminate_single (vrf.c:533)
==497406==    by 0x49A2D8F: vrf_terminate (vrf.c:561)
==497406==    by 0x441240: sigint (main.c:192)
==497406==    by 0x4981F6D: frr_sigevent_process (sigevent.c:130)
==497406==  Address 0x6d68c68 is 200 bytes inside a block of size 272 free'd
==497406==    at 0x48470E4: free (vg_replace_malloc.c:872)
==497406==    by 0x4942CF0: qfree (memory.c:141)
==497406==    by 0x49196A9: if_delete (if.c:293)
==497406==    by 0x491C54C: if_terminate (if.c:1031)
==497406==    by 0x49A2E22: vrf_terminate_single (vrf.c:532)
==497406==    by 0x49A2D8F: vrf_terminate (vrf.c:561)
==497406==    by 0x441240: sigint (main.c:192)
==497406==    by 0x4981F6D: frr_sigevent_process (sigevent.c:130)
==497406==    by 0x499A5F0: thread_fetch (thread.c:1775)
==497406==    by 0x492850E: frr_run (libfrr.c:1197)
==497406==    by 0x441746: main (main.c:476)
==497406==  Block was alloc'd at
==497406==    at 0x4849464: calloc (vg_replace_malloc.c:1328)
==497406==    by 0x49429A5: qcalloc (memory.c:116)
==497406==    by 0x491D971: if_new (if.c:174)
==497406==    by 0x491ACC8: if_create_name (if.c:228)
==497406==    by 0x491ABEB: if_get_by_name (if.c:613)
==497406==    by 0x427052: netlink_interface (if_netlink.c:1178)
==497406==    by 0x43BC18: netlink_parse_info (kernel_netlink.c:1188)
==497406==    by 0x4266D7: interface_lookup_netlink (if_netlink.c:1288)
==497406==    by 0x42B634: interface_list (if_netlink.c:2368)
==497406==    by 0x4ABF83: zebra_ns_enable (zebra_ns.c:127)
==497406==    by 0x4AC17E: zebra_ns_init (zebra_ns.c:216)
==497406==    by 0x44166C: main (main.c:408)
'''

Signed-off-by: Stephen Worley <sworley@nvidia.com>
2022-11-22 17:42:29 -05:00
Russ White
2387dca4dc
Merge pull request #12311 from opensourcerouting/feature/bgp_snmp_bgp4v2-mib
bgpd: Implement SNMP BGP4V2-MIB (bgp4V2PeerEntry)
2022-11-22 14:58:22 -05:00
Stephen Worley
f5a6f8202d
Merge pull request #11908 from sigeryang/tc-state-mgmt
zebra: traffic control state management & ZAPI
2022-11-22 12:02:15 -05:00