When VLAN-VNI mapping is updated, do not set the L2VNI up event
if the associated VXLAN device is not up.
This may result in bgp synced remote routes to skip installing
in Zebra and onwards (Kernel).
Ticket: #4139506
Signed-off-by: Chirag Shah <chirag@nvidia.com>
Consider the following scenario.
You start from the configuration below:
```
!
segment-routing
srv6
encapsulation
source-address fc00:0:1::1
!
!
!
```
Then you change the source address:
```
r1# configure
r1(config)# segment-routing
r1(config-sr)# srv6
r1(config-srv6)# encapsulation
r1(config-srv6-encap) source-address 1::1
```
And finally, reload the configuration
`python3 frr-reload.py --reload /etc/frr/frr.conf`
frr-reload returns the error below:
```
Failed to execute segment-routing srv6 no source-address 1::1 exit exit
"segment-routing -- srv6 -- no source-address 1::1 -- exit -- exit" we failed to remove this command
% Unknown command: no source-address 1::1
[79975|mgmtd] sending configuration
line 3: % Unknown command[76]: source-address fc00:0:1::1
[79975|mgmtd] Configuration file[/etc/frr/frr.conf] processing failure: 2
```
The reason is that the keyword `encapsulation` is missing in frr-reload.
This patch adds the missing keyword `encapsulation`.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
When OSPFd starts, there is 2 possible scenarios for Segment Routing:
1/ Routes associated to Prefixes are not yet available i.e. Segment Routing LSA
are received before LSA Type 1. In this case, the function
ospf_sr_nhlfe_update() is triggered when a new SPF is launch. Thus, neighbors
and output label are always synchronise with the routing table.
2/ Routes are already available i.e. LSA Type 1 are received before Segment
Routing LSA, in particular the Router Information which contains the SRGB.
During nhlfe computation, perfixes are leave with incomplete configuration, in
particular, the SR nexthop is set to NULL. If this scenario is handle through
the function update_out_nhlfe (triggered when SRGB is received or modified from
a neighbor node), the output label is not correctly configured as the nexthop
SR node associated to the prefix has been leave to NULL.
This patch correct this problem by calling the function compute_nhlfe() when
the nexthop SR Node associated to the prefix is NULL within the
update_out_nhlfe() function. Thus, we guarantee that the SR prefix is always
correctly configuration indpedently of the scenario i.e. arrival of the
different LSA.
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
In zebra_mpls.c it has a usage of MTYPE_NH_LABEL which is
defined in both lib/nexthop.c and zebra/zebra_mpls.c. The
usage in zebra_mpls.c is a realloc. This leads to a crash:
(gdb) bt
0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=126487246404032) at ./nptl/pthread_kill.c:44
1 __pthread_kill_internal (signo=6, threadid=126487246404032) at ./nptl/pthread_kill.c:78
2 __GI___pthread_kill (threadid=126487246404032, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
3 0x0000730a1b442476 in __GI_raise (sig=6) at ../sysdeps/posix/raise.c:26
4 0x0000730a1b94fb18 in core_handler (signo=6, siginfo=0x7ffeed1e07b0, context=0x7ffeed1e0680) at lib/sigevent.c:268
5 <signal handler called>
6 __pthread_kill_implementation (no_tid=0, signo=6, threadid=126487246404032) at ./nptl/pthread_kill.c:44
7 __pthread_kill_internal (signo=6, threadid=126487246404032) at ./nptl/pthread_kill.c:78
8 __GI___pthread_kill (threadid=126487246404032, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
9 0x0000730a1b442476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
10 0x0000730a1b4287f3 in __GI_abort () at ./stdlib/abort.c:79
11 0x0000730a1b9984f5 in _zlog_assert_failed (xref=0x730a1ba59480 <_xref.16>, extra=0x0) at lib/zlog.c:789
12 0x0000730a1b8f8908 in mt_count_free (mt=0x576e0edda520 <MTYPE_NH_LABEL>, ptr=0x576e36617b80) at lib/memory.c:74
13 0x0000730a1b8f8a59 in qrealloc (mt=0x576e0edda520 <MTYPE_NH_LABEL>, ptr=0x576e36617b80, size=16) at lib/memory.c:112
14 0x0000576e0ec85e2e in nhlfe_out_label_update (nhlfe=0x576e368895f0, nh_label=0x576e3660e9b0) at zebra/zebra_mpls.c:1462
15 0x0000576e0ec833ff in lsp_install (zvrf=0x576e3655fb50, label=17, rn=0x576e366197c0, re=0x576e3660a590) at zebra/zebra_mpls.c:224
16 0x0000576e0ec87c34 in zebra_mpls_lsp_install (zvrf=0x576e3655fb50, rn=0x576e366197c0, re=0x576e3660a590) at zebra/zebra_mpls.c:2215
17 0x0000576e0ecbb427 in rib_process_update_fib (zvrf=0x576e3655fb50, rn=0x576e366197c0, old=0x576e36619660, new=0x576e3660a590) at zebra/zebra_rib.c:1084
18 0x0000576e0ecbc230 in rib_process (rn=0x576e366197c0) at zebra/zebra_rib.c:1480
19 0x0000576e0ecbee04 in process_subq_route (lnode=0x576e368e0270, qindex=8 '\b') at zebra/zebra_rib.c:2661
20 0x0000576e0ecc0711 in process_subq (subq=0x576e3653fc80, qindex=META_QUEUE_BGP) at zebra/zebra_rib.c:3226
21 0x0000576e0ecc07f9 in meta_queue_process (dummy=0x576e3653fae0, data=0x576e3653fb80) at zebra/zebra_rib.c:3265
22 0x0000730a1b97d2a9 in work_queue_run (thread=0x7ffeed1e3f30) at lib/workqueue.c:282
23 0x0000730a1b96b039 in event_call (thread=0x7ffeed1e3f30) at lib/event.c:1996
24 0x0000730a1b8e4d2d in frr_run (master=0x576e36277e10) at lib/libfrr.c:1232
25 0x0000576e0ec35ca9 in main (argc=7, argv=0x7ffeed1e4208) at zebra/main.c:536
Clearly replacing a label stack is an operation that should be owned by
lib/nexthop.c. So lets move this function into there and have
zebra_mpls.c just call the function to replace the label stack.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
If the desired state is the same - do nothing instead of resetting once again.
Fixes: bdb5ae8bce ("bgpd: Make suppress-fib-pending clear peering")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Upon high load the ospf_instance_redistribute test can attempt
to install routes with sharpd before the connected routes have
fully baked themselves into zebra. Since sharpd intentionally
has no retry mechanism we need to ensure that the test is waiting
a small bit.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
The support bundle was not gathering any msdp data
for pim at all. Let's add a bit to allow us to
have more data here when a suppport bundle is generated
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
There were no zebra show commands related to mpls labels
being generated for support bundles. Let's rectify that
situation.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
When a support bundle is created no isis commands were
issued to attempt to gather data about what is going
on in isis. Let's rectify that
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Test MSDP new log toggle: the MSDP peer connection state and SA events
should be logged.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
bgp_vrf_route_leak_basic uses "import/export vrf" commands to perform
route leaks between VRF on the r1 router. The same result can be
achieved by using the "route-target import / export" commands.
Copy bgp_vrf_route_leak_basic to bgp_vpnv4_route_leak_basic. Change
BGP configuration to handle the route leaks with "route-target import /
export". Change to retry timers. No other changes.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
If bgp is coming up and bgp has not received the interface address yet
but bgp has knowledge about a bfd peering, allow it to set the peering
data appropriately.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
a) timers are really large preventing convergence in 30 seconds
b) The same configuration does not need to be initiated 60 times
when things are not working properly. Once is enough.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This function when it is run by bgp_start is expected
to return a `enum connect_result`. But instead
the function returns a variety of values that are
not really being checked for. Consolidate to a correct
choice.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Remove from MSDP peer data structure two temporary variables
that should only be used when calling library functions.
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
Now with a full AutoRP implementation, we can test AutoRP in a full network setup
beginning with candidate RP announcements all the way through discovery and active RP
selection.
Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
Fully flushed out the AutoRP implementation now with the AutoRP mapping agent.
This touched most of AutoRP in order to have common reuse of containers for each
section of AutoRP operation (Candidate RP announcement, Mapping agent, Discovery).
Many debugs had guards added and many more debug logs added.
Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
When using bfd in remote-dataplane client mode, don't close
a new client socket if we're going to try to use it.
Signed-off-by: Mark Stapp <mjs@cisco.com>