Adjust one debug info, separate the ip address from it. Just like it is processed
in `redistribute_update()`.
Before:
```
34:1375.75.75.75/32: Redist del: re 0x55c1112067e0 (0:static), new re 0x55c1112de7c0 (0:static)
```
After:
```
(34:13):75.75.75.75/32: Redist del: re 0x55c1112067e0 (0:static), new re 0x55c1112de7c0 (0:static)
```
Signed-off-by: anlan_cs <vic.lan@pica8.com>
Add a test-case to the NHRP test that installs routes over the
NHRP tunnel endpoint routes. This confirms that zebra will use
NHRP routes when validating incoming routes from other daemons
(sharpd in this test).
Signed-off-by: Mark Stapp <mjs@labn.net>
Add a config option so that sharpd can install routes without
the ALLOW_RECURSION flag, matching IGP behavior.
The default remains 'recursion'.
Signed-off-by: Mark Stapp <mjs@labn.net>
Treat NHRP-installed routes as valid, as if they were
CONNECTED routes, when checking candidate routes'
nexthops for validity. This allows use of NHRP by an
IGP, for example, that doesn't normally want recursive
nexthop resolution.
Signed-off-by: Mark Stapp <mjs@labn.net>
bgp_zebra_tm_connect calls bgp_zebra_get_table_range which
just used the global zclient. Which of course still had
us exposing the global zclient to read and drop important
data from zebra. This fixes commit 787c61e03c
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
bgp_zebra_tm_connect calls bgp_zebra_get_table_range which
just used the global zclient. Which of course still had
us exposing the global zclient to read and drop important
data from zebra. This fixes commit 787c61e03c
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
The changes allow the test to correctly pass in case the connection
between two peers is be established in less than 0.5 seconds after the
delayopen timer expires.
Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
Code is looking up the nlsock to generate the batch messages
and then looking it up again to get the response. Let's
just look it up one time.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Attempt to set the hold time in the bgp flowspec exabgp
config. In addition it was noticed that upstream bgp_flowspec
tests are still not negotiating peering within the time frame
specified. This is because the first tcp packet is missed
and no keepalive/hold time are negotiated and exabgp will
not attempt a reconnect for quite some time. Make this
test slower when things go south.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
The isis_tilfa_topo1 test is failing because insufficient time was
given for isis to converge on the system under system load. Extend
the time and decrease the hello-interval timers to give it more
of a chance to converge.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
The test is failing because it assumes a json key
is always present when it is not. Test for it
before having the test fail.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
I have a local test run where the sharp route-map usage
was being checked for 5 seconds. I saw usages going up
for each 1 second check and the 5th one was at 497 out
of 500. Looks like the system was really loaded. Let's
give it more time to coalesce under heavy load.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
There are parts of our daemons that upon certain types
of errors that a zlog_backtrace is auto-generated.
It is desirable for this to be caught and have the
test auto-failed.
Issue: #13787
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
The total number of octets of the Sub-TLV Value field. The Sub-TLV Length field
contains 1 octet if the Sub-TLV Type field contains a value in the range from
0-127. The Sub-TLV Length field contains two octets if the Sub-TLV Type field
contains a value in the range from 128-255.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
The cli "show ip pim nexthop json" gives the RPF information.
However it doesn't give PIM enable status on the nexthop interface.
Added pimEnabled field in this clis,
this will tell if PIM is enabled or not on the nexthop interface.
Example:
frr# show ip pim nexthop
Number of registered addresses: 1
Address Interface Nexthop
108.0.0.2 ens224 108.0.0.2
frr# show ip pim nexthop json
{
"108.0.0.2":{
"address":"108.0.0.2",
"nexthops":[
{
"interface":"ens224",
"pimEnabled":true,
"nexthop":"108.0.0.2"
}
]
}
}
frr# configure terminal
frr(config)# int ens224
frr(config-if)# no ip pim
frr(config-if)# end
frr# show ip pim nexthop json
{
"108.0.0.2":{
"address":"108.0.0.2",
"nexthops":[
{
"interface":"ens224",
"pimEnabled":false,
"nexthop":"108.0.0.2"
}
]
}
}
Signed-off-by: Sarita Patra <saritap@vmware.com>
The mpls configuration does not work when an interface is
created after having applied the frr configuration. The
below scenario illustrates:
> root@dut:~# modprobe mpls
> root@dut:~# zebra &
> [..]
> dut(config)# interface ifacenotcreated
> dut(config-if)# mpls enable
> dut(config-if)# Ctrl-D
> root@dut:~# ip li show ifacenotcreated
> Device "ifacenotcreated" does not exist.
> root@dut:~# ip li add ifacenotcreated type dummy
> 0
Fix this by forcing the mpls flag when the interface is detected.
> root@dut:~# cat /proc/sys/net/mpls/conf/ifacenotcreat/input
> 1
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
OSPFv2 no area x stub no-summary only resets
'no-summary' config. From frr-reload if the config
line 'area x stub no-summary' is removed then
it needs to remove completely. Before this change
it took two frr-roload to remove the config which is
inconsistent behavior.
Fix is to frr-reload to add extra line to delete
'no area x stub'.
Ticket:#3514775
Testing Done:
Running config:
router ospf
ospf router-id 6.6.6.6
area 0.0.0.1 stub no-summary
area 0.0.0.2 stub
exit
!
router ospf vrf sym_1
area 0.0.1.1 range 24.1.1.0/24
area 0.0.1.2 stub no-summary
exit
changed frr.conf:
router ospf
ospf router-id 6.6.6.6
area 0.0.0.2 stub
exit
!
router ospf vrf sym_1
area 0.0.1.1 range 24.1.1.0/24
exit
Lines To Delete
===============
router ospf
no area 0.0.0.1 stub <<<< newly added
router ospf vrf sym_1
no area 0.0.1.2 stub <<<< newly added
router ospf
no area 0.0.0.1 stub no-summary
router ospf vrf sym_1
no area 0.0.1.2 stub no-summary
After fix new running-config post reload:
i
router ospf
ospf router-id 6.6.6.6
area 0.0.0.2 stub
exit
!
router ospf vrf sym_1
area 0.0.1.1 range 24.1.1.0/24
exit
Before fix running-config post 1st reload:
router ospf
ospf router-id 6.6.6.6
area 0.0.0.1 stub
area 0.0.0.2 stub
exit
!
router ospf vrf sym_1
area 0.0.1.1 range 24.1.1.0/24
area 0.0.1.2 stub
exit
Signed-off-by: Chirag Shah <chirag@nvidia.com>
More details: https://www.rfc-editor.org/rfc/rfc8810.html
Not sure if we want to maintain the old code more.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
When `dplane_fpm_nl` receives a route, it allocates memory for a dplane
context and calls `netlink_route_change_read_unicast_internal` without
initializing the `intf_extra_list` contained in the dplane context. If
`netlink_route_change_read_unicast_internal` is not able to process the
route, we call `dplane_ctx_fini` to free the dplane context. This causes
a crash because `dplane_ctx_fini` attempts to access the intf_extra_list
which is not initialized.
To solve this issue, we can call `dplane_ctx_route_init`to initialize
the dplane route context properly, just after the dplane context
allocation.
(gdb) bt
#0 0x0000555dd5ceae80 in dplane_intf_extra_list_pop (h=0x7fae1c007e68) at ../zebra/zebra_dplane.c:427
#1 dplane_ctx_free_internal (ctx=0x7fae1c0074b0) at ../zebra/zebra_dplane.c:724
#2 0x0000555dd5cebc99 in dplane_ctx_free (pctx=0x7fae2aa88c98) at ../zebra/zebra_dplane.c:869
#3 dplane_ctx_free (pctx=0x7fae2aa88c98, pctx@entry=0x7fae2aa78c28) at ../zebra/zebra_dplane.c:855
#4 dplane_ctx_fini (pctx=pctx@entry=0x7fae2aa88c98) at ../zebra/zebra_dplane.c:890
#5 0x00007fae31e93f29 in fpm_read (t=) at ../zebra/dplane_fpm_nl.c:605
#6 0x00007fae325191dd in thread_call (thread=thread@entry=0x7fae2aa98da0) at ../lib/thread.c:2006
#7 0x00007fae324c42b8 in fpt_run (arg=0x555dd74777c0) at ../lib/frr_pthread.c:309
#8 0x00007fae32405ea7 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#9 0x00007fae32325a2f in clone () from /lib/x86_64-linux-gnu/libc.so.6
Fixes: #13754
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
The function `dplane_ctx_route_init` initializes a dplane route context
from the route object passed as an argument. Let's abstract this
function to allow initializing the dplane route context without actually
copying a route object.
This allows us to use this function for initializing a dplane route
context when we don't have any route to copy in it.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Also, this is visible only if `capability software-version` is enabled.
Example:
```
r1# show ip bgp summary
IPv4 Unicast Summary (VRF default):
BGP router identifier 192.168.1.1, local AS number 65001 vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 1, using 725 KiB of memory
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd PfxSnt Desc
192.168.1.2 4 65002 54 54 0 0 0 00:00:52 0 0 FRRouting/9.1-dev-My
Total number of neighbors 1
r1#
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>