Jafar Al-Gharaibeh
1365d3e2f5
Merge pull request #9744 from idryzhov/isis-redist-cli
...
isisd: fix redistribute CLI
2021-10-05 14:22:27 -05:00
Jafar Al-Gharaibeh
e91c3433bf
Merge pull request #9725 from idryzhov/doc-debug-ospf
...
doc: fix debugging-ospf label
2021-10-05 11:52:32 -05:00
Jafar Al-Gharaibeh
c3b9332476
Merge pull request #9736 from ewlumpkin/comment_spelling_fixes
...
lib: fix spelling nits in command.h
2021-10-05 11:48:20 -05:00
Igor Ryzhov
1bfee9368a
isisd: fix redistribute CLI
...
Currently, it is possible to configure IPv6 protocols for IPv4
redistribution and vice versa in CLI. The YANG model doesn't allow this
so the user receives the following error:
```
nfware(config-router)# redistribute ipv4 ospf6 level-1
% Failed to edit configuration.
YANG error(s):
Invalid enumeration value "ospf6".
Invalid enumeration value "ospf6".
Invalid enumeration value "ospf6".
YANG path: Schema location /frr-isisd:isis/instance/redistribute/ipv4/protocol.
```
Let's make CLI more user-friendly and allow only supported protocols in
redistribution commands.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-05 17:38:21 +03:00
ewlumpkin
81eb8fc749
lib: fix spelling nits in command.h
...
Signed-off-by: ewlumpkin <ewlumpkin@gmail.com>
2021-10-05 03:21:50 +00:00
Renato Westphal
5b9414484c
Merge pull request #9726 from donaldsharp/ospf6_expire
...
ospf6d: Ensure expire thread is properly stopped
2021-10-04 21:13:50 -03:00
Sri Mohana Singamsetty
fd7abfa80b
Merge pull request #9722 from chiragshah6/zdev
...
zebra: add nhg id to show ip route json
2021-10-04 10:07:00 -07:00
Donald Sharp
fc3f4adbc6
ospf6d: Ensure expire thread is properly stopped
...
The lsa->expire thread is for keeping track of when we
are expecting to expire(remove/delete) a lsa. There
are situations where we just decide to straight up
delete the lsa, but we are not ensuring that the
lsa is not already setup for expiration.
In that case just stop the expiry thread and
do the deletion.
Additionally there was a case where ospf6d was
just dropping the fact that a thread was already
scheduled for expiration. In that case we
should just setup the timer again and it will
reset it appropriately.
Fixes : #9721
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-10-04 12:13:57 -04:00
Donatas Abraitis
a3e036f36a
Merge pull request #9689 from AnuradhaKaruppiah/bgp-evpn-lttng
...
bgpd: initial batch of evpn lttng tracepoints
2021-10-04 19:05:41 +03:00
Igor Ryzhov
cb00030f9a
doc: fix debugging-ospf label
...
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-04 15:22:24 +03:00
Chirag Shah
1b3ac4c7ca
zebra: add nhg id to show ip route json
...
Add json field nexthop group id to
'show ip route json'.
Testing Done:
{
"27.0.0.14\/32":[
{
"prefix":"27.0.0.14\/32",
"protocol":"bgp",
"selected":true,
"destSelected":true,
"distance":20,
"metric":0,
"installed":true,
"table":254,
"internalStatus":16,
"internalFlags":8,
"internalNextHopNum":2,
"internalNextHopActiveNum":2,
"nexthopGroupId":103, <---- New field
"uptime":"00:04:37",
"nexthops":[
{
"ip":"fe80::202:ff:fe00:11",
"interfaceName":"uplink-1",
},
{
"ip":"fe80::202:ff:fe00:1d",
"interfaceName":"uplink-2",
}
]
}
]
}
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-10-03 16:20:46 -07:00
Donatas Abraitis
31df775552
Merge pull request #9714 from idryzhov/bgp-ext-comm-doc
...
doc: fix range for bgp expanded community list
2021-10-02 20:14:11 +03:00
Donatas Abraitis
b1fb03f8b1
Merge pull request #9710 from idryzhov/bgp-distribute-list-update
...
bgpd: fix access-list update callback
2021-10-02 20:12:47 +03:00
Donatas Abraitis
5d9e468205
Merge pull request #9701 from AnuradhaKaruppiah/lttng-build-fix
...
bgpd: fix build error seen when lttng is enabled
2021-10-02 20:11:32 +03:00
Anuradha Karuppiah
23aa35ade5
bgpd: initial batch of evpn lttng tracepoints
...
Low overhead bgp-evpn TPs have been added which push data out in a binary
format -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@switch:~# lttng list --userspace |grep "frr_bgp:evpn"
frr_bgp:evpn_mh_nh_rmac_zsend (loglevel: TRACE_DEBUG_LINE (13)) (type: tracepoint)
frr_bgp:evpn_mh_nh_zsend (loglevel: TRACE_INFO (6)) (type: tracepoint)
frr_bgp:evpn_mh_nhg_zsend (loglevel: TRACE_INFO (6)) (type: tracepoint)
frr_bgp:evpn_mh_vtep_zsend (loglevel: TRACE_INFO (6)) (type: tracepoint)
frr_bgp:evpn_bum_vtep_zsend (loglevel: TRACE_INFO (6)) (type: tracepoint)
frr_bgp:evpn_mac_ip_zsend (loglevel: TRACE_INFO (6)) (type: tracepoint)
root@switch:~#
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
In addition to the tracepoints a babeltrace python plugin for pretty
printing (binary data is converted into grepable strings). Sample usage -
frr_babeltrace.py trace_path
Sample tracepoint output -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
1. frr_bgp: evpn_mac_ip_zsend
frr_bgp:evpn_mac_ip_zsend {'action': 'add', 'vni': 1007, 'mac': '00:02:00:00:00:04', 'ip': 'fe80::202:ff:fe00:4', 'vtep': '27.0.0.15', 'esi': '03:44:38:39:ff:ff:01:00:00:02'}
2. frr_bgp: evpn_mh_vtep_zsend
frr_bgp:evpn_mh_vtep_zsend {'action': 'add', 'esi': '03:44:38:39:ff:ff:01:00:00:02', 'vtep': '27.0.0.16'}
3. frr_bgp: evpn_mh_nhg_zsend
frr_bgp:evpn_mh_nhg_zsend {'action': 'add', 'type': 'v4', 'nhg': 74999998, 'esi': '03:44:38:39:ff:ff:01:00:00:02', 'vrf': 85}
4. frr_bgp: evpn_mh_nh_zsend
frr_bgp:evpn_mh_nh_zsend {'nhg': 74999998, 'vtep': '27.0.0.16', 'svi': 93}
5. frr_bgp: evpn_mh_nh_rmac_zsend
frr_bgp:evpn_mh_nh_rmac_zsend {'action': 'add', 'vrf': 85, 'nh': '::ffff:1b00:12', 'rmac': '00:02:00:00:00:50'}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2021-10-01 09:02:25 -07:00
Igor Ryzhov
0757efc0ce
doc: fix range for bgp expanded community list
...
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-01 18:36:02 +03:00
Igor Ryzhov
b0a007df7a
bgpd: fix access-list update callback
...
When a regular access-list is updated, we should update references to
regular access-lists, not as-path access-lists.
Fixes #9707 .
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-01 14:45:07 +03:00
Donald Sharp
d0bf22a10b
Merge pull request #9712 from idryzhov/travis-gprc
...
docker: remove grpc from Travis CI
2021-10-01 07:34:44 -04:00
Igor Ryzhov
7a53c83a68
docker: remove grpc from Travis CI
...
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-01 14:04:42 +03:00
Anuradha Karuppiah
e439b73606
bgpd: fix build error seen when lttng is enabled
...
Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
2021-09-30 08:54:26 -07:00
Igor Ryzhov
ac32b03f98
Merge pull request #9694 from mjstapp/fix_topo_pim_cmp
...
tests: fix string comparison in lib/pim.py
2021-09-30 12:40:55 +03:00
Mark Stapp
94e8feaa9f
tests: fix string comparison in lib/pim.py
...
Use correct string comparison syntax in lib/pim.py
Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2021-09-29 11:49:43 -04:00
David Lamparter
a89bae26f7
Merge pull request #9560 from LabNConsulting/ziemba/frrmod_load-error-messages
...
frrmod_load(): fix error messages
2021-09-29 14:35:35 +02:00
Donald Sharp
ffd7467cc4
Merge pull request #9688 from LabNConsulting/working/lb/fix-tt-bgp-vrf
...
tests: get bgp_l3vpn_to_bgp_vrf running again, also improve logging (minor)
2021-09-29 07:29:39 -04:00
Sri Mohana Singamsetty
2e2d2be87f
Merge pull request #9422 from pguibert6WIND/update_autort_l3vni
...
bgpd: update auto route target for l3vni appropriately
2021-09-28 09:15:34 -07:00
Lou Berger
1b9ebabb27
tests: get bgp_l3vpn_to_bgp_vrf running, also improve logging
...
Signed-off-by: Lou Berger <lberger@labn.net>
2021-09-28 11:29:46 -04:00
Quentin Young
c85f53017a
Merge pull request #9669 from LabNConsulting/chopps/topo-sudo-env
2021-09-28 10:53:23 -04:00
Donald Sharp
8e55e2c87b
Merge pull request #9677 from ton31337/fix/zlog_newline_not_needed
...
tools: Add coccinelle script to catch \n or \r at the end of zlog_*
2021-09-28 10:44:54 -04:00
Russ White
5393318d81
Merge pull request #9682 from adrianomarto/mesh-group-fix
...
pimd: fixing command "no ip msdp mesh-group member"
2021-09-28 10:21:17 -04:00
Adriano Marto Reis
4687748973
pimd: fixing command "no ip msdp mesh-group member"
...
Deleting a mesh-group member no longer deletes the mesh-group.
Complete bug description at:
https://github.com/FRRouting/frr/issues/9664
Signed-off-by: Adriano Marto Reis <adrianomarto@gmail.com>
2021-09-28 12:43:52 +10:00
Donald Sharp
01236d7aa7
Merge pull request #9675 from opensourcerouting/pim-bsm-uaf
...
pimd: fix UAF/heap corruption in BSM code
2021-09-27 09:45:38 -04:00
David Lamparter
bd4aed8555
Merge pull request #9673 from donaldsharp/bgp_paf
2021-09-27 15:37:43 +02:00
Donatas Abraitis
94ca37e0a9
tools: Add coccinelle script to catch \n or \r at the end of zlog_*
...
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-09-27 15:21:52 +03:00
David Lamparter
46d7e17619
Merge pull request #9672 from donaldsharp/ospf6_newline
2021-09-27 10:45:17 +02:00
David Lamparter
200f56710a
pimd: fix UAF/heap corruption in BSM code
...
This `XFREE()` call is in plainly in the wrong spot. `rp_all` (the
224.0.0.0/4 entry) isn't supposed to be free'd ever, and the
conditional above makes quite clear that it remains in use.
It may be possible to exploit this as a heap corruption bug, maybe even
as RCE. I haven't tried; I randomly noticed this while working on the
BSM code. Luckily this code is only run by the CLI for the clear
command, so the surface is very small.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-09-27 10:37:23 +02:00
Donald Sharp
0e5cdd59eb
bgpd: Don't lookup paf structure get straight to the point
...
The paf data structure is stored based upon an internal
bgp enum. The code is looking over all AFI/SAFI's and
doing a paf_af_find which then calls afindex to find
the right paf structure. Let's just loop over the
peer->peer_af_array[] and cut straight to the chase.
Under some loads the paf_af_find was taking up 6%
of the run time. This removes it entirely.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-26 20:17:40 -04:00
Donald Sharp
e2874251ed
ospf6d: Log messages cannot have newlines
...
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-26 19:16:10 -04:00
Christian Hopps
fe226e844a
doc: add sudo environment setup info for topotests
...
Signed-off-by: Christian Hopps <chopps@labn.net>
2021-09-26 19:14:49 -04:00
Quentin Young
83caa5e5c1
Merge pull request #9638 from proelbtn/fix-multipath-srv6-sid
2021-09-24 14:58:12 -04:00
Quentin Young
a3941e8126
Merge pull request #9659 from idryzhov/dev-doc-fix
...
doc: fix code block in grpc docs
2021-09-24 14:14:44 -04:00
Quentin Young
05c587b029
Merge pull request #9661 from ton31337/fix/bgp_frrtrace_for_lttng
2021-09-24 13:53:03 -04:00
Russ White
b8beb67ef5
Merge pull request #9585 from opensourcerouting/ospf6d-nssa-dflt-originate
...
ospf6d: add a knob to generate Type-7 default routes
2021-09-24 13:42:49 -04:00
Donatas Abraitis
d2e4107754
Merge pull request #9660 from pguibert6WIND/bgp_error_swap
...
bgpd: swap bgp error value with file descriptor value
2021-09-23 20:04:24 +03:00
Donatas Abraitis
63836a9647
bgpd: Make sure bgp_dest lock/unlock tracepoints works for LTTng as well
...
Tested with both UDST and LTTng, both are OK.
```
[13:57:31.346131253] (+?.?????????) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "10.0.2.0/24", count = 3 }
[13:57:31.346154756] (+0.000023503) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "192.168.0.0/24", count = 3 }
[13:57:31.346156699] (+0.000001943) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "192.168.10.0/24", count = 2 }
[13:57:31.346157570] (+0.000000871) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "192.168.100.1/32", count = 2 }
[13:57:31.346158521] (+0.000000951) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "192.168.100.2/32", count = 2 }
[13:57:31.356149109] (+0.009990588) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "10.0.2.0/24", count = 3 }
[13:57:31.356155889] (+0.000006780) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "192.168.0.0/24", count = 3 }
[13:57:31.356156840] (+0.000000951) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "192.168.10.0/24", count = 2 }
[13:57:31.356157751] (+0.000000911) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "192.168.100.1/32", count = 2 }
[13:57:31.356158683] (+0.000000932) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 1 }, { prefix = "192.168.100.2/32", count = 2 }
[13:57:34.508252238] (+3.152093555) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "172.16.16.1/32", count = 2 }
[13:57:34.508289549] (+0.000037311) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "172.16.16.2/32", count = 2 }
[13:57:34.508307544] (+0.000017995) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "172.16.16.3/32", count = 2 }
[13:57:34.508433878] (+0.000126334) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "10.0.2.0/24", count = 2 }
[13:57:34.508435891] (+0.000002013) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "10.0.2.0/24", count = 2 }
[13:57:34.508458182] (+0.000022291) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "192.168.0.0/24", count = 2 }
[13:57:34.508458852] (+0.000000670) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "192.168.0.0/24", count = 2 }
[13:57:34.508472821] (+0.000013969) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "192.168.10.0/24", count = 1 }
[13:57:34.508473482] (+0.000000661) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "192.168.10.0/24", count = 1 }
[13:57:34.508487041] (+0.000013559) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "192.168.100.1/32", count = 1 }
[13:57:34.508487792] (+0.000000751) home-spine1.donatas.net frr_bgp:bgp_dest_lock: { cpu_id = 2 }, { prefix = "192.168.100.1/32", count = 1 }
```
Converting bgp_dest_lock_node/bgp_dest_unlock_node to non-inlined function
because LTTng can't work properly with inlined and the compiler does not like
it.
Not sure how it would be with the performance, but let's see.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-09-23 20:00:54 +03:00
Donatas Abraitis
d03c8a8e06
tools: Require a lower LTTng version to compile
...
Debian 9 has 2.9.x, only Ubuntu >= 18 has 2.10.x.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-09-23 20:00:53 +03:00
Igor Ryzhov
d5cd3fd1e0
Merge pull request #9084 from louis-oui/fix-ospf6-router-id
...
ospf6d: fix LSAs remain in LSDB with an old router-id value
2021-09-23 19:03:35 +03:00
Philippe Guibert
046bb34781
bgpd: swap bgp error value with file descriptor value
...
the values were swapped by mistake. fix it.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2021-09-23 14:23:30 +02:00
Igor Ryzhov
98059bbca6
doc: fix code block in grpc docs
...
The code block after the :: is not displayed correctly without an empty
line in between.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-09-23 12:08:12 +03:00
Louis Scalbert
078f609212
ospf6d: reset areas and redistribution at router-id modification
...
The ospf6 router-id is provided by order of preference by:
ospf6d itself if the "ospf6 router-id X.X.X.X" command is set.
- zebra. If the "ip router-id X.X.X.X" zebra command is set, the
configured IP is provided as the ID or alternatively the highest
loopback IPv4 address or else the highest interface IPv4 address.
The running ospf6 router-id is stored in ospf6->router-id.
ospf6->router-id can change in the following conditions:
- A configuration change provides a new router-id value according to
the above rules. ospf6->router-id is updated to the new value if
there is no adjacency in FULL state. Otherwise, the ospf6d process
must be restarted to take the new router-id into account.
- On startup of both zebra and ospf6d, if ospf6d has not yet received a
valid router-id, ospf6d->router-id is set to 0 (i.e. 0.0.0.0). Then,
zebra notifies ospf6d that the router-id is available.
At ospf6->router-id, the current behavior of ospf6d is the following:
- The self generated LSAs that refer to the previous router-id as the
advertising router are kept.
- Self generated LSAs are created with router-id value.
- LSAs from the redistribution that refer to the previous router-id are
kept and no new redistribution LSAs are created.
As a consequence, the routers in the ospf6 areas will get incorrect
LSAs and might not be able to install prefixes of those LSAs into their
RIB.
This fix solves this issue by resetting the areas and the redistribution
when ospf6->router-id updated.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2021-09-23 10:04:36 +02:00
Sri Mohana Singamsetty
4ab65e0983
Merge pull request #9650 from mjstapp/fix_dup_lookup_netlink
...
zebra: stop asking for AF_BRIDGE interface info twice
2021-09-22 16:18:19 -07:00