Commit Graph

31388 Commits

Author SHA1 Message Date
Russ White
e5325ec96a
Merge pull request #12989 from opensourcerouting/fix/memory_leaks_bgpd
bgpd: Free memory allocated by ecommunity_ecom2str()
2023-03-14 10:15:07 -04:00
Russ White
0fdd5742a0
Merge pull request #12979 from miegl/isis_tun
isisd: IS-IS over tunnel (GRE, GENEVE)
2023-03-14 10:05:01 -04:00
Russ White
cff3239215
Merge pull request #12965 from donaldsharp/gr_vrf_aware
zebra: Make GR debug logs at least vrf aware
2023-03-14 08:45:02 -04:00
Russ White
4c88ac57d7
Merge pull request #12922 from opensourcerouting/ospf-gr-fixes
OSPF Graceful Restart fixes
2023-03-14 08:38:36 -04:00
Donatas Abraitis
0da34e499a bgpd: Drop afi_t from bgp_evpn_global_node_lookup()
Not used.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-03-14 12:05:58 +02:00
Donatas Abraitis
59d6b4d6ab bgpd: Rename bgp_afi_node_lookup() to bgp_safi_node_lookup()
afi not used in this function, reduce a bit.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-03-14 12:01:56 +02:00
Donatas Abraitis
9dc5d874a0 bgpd: Free memory allocated by ecommunity_ecom2str()
Return local string, copied from returned value of ecom2str.

```
./bgp_snmp_mplsl3vpn.test_bgp_snmp_mplsvpn/r1.bgpd.asan.2925690:Direct leak of 528 byte(s) in 8 object(s) allocated from:
./bgp_snmp_mplsl3vpn.test_bgp_snmp_mplsvpn/r1.bgpd.asan.2925690-    0 0x7efcde5d6037 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
./bgp_snmp_mplsl3vpn.test_bgp_snmp_mplsvpn/r1.bgpd.asan.2925690-    1 0x7efcde1dc7e2 in qcalloc lib/memory.c:105
./bgp_snmp_mplsl3vpn.test_bgp_snmp_mplsvpn/r1.bgpd.asan.2925690-    2 0x5628a0592704 in ecommunity_ecom2str bgpd/bgp_ecommunity.c:947
./bgp_snmp_mplsl3vpn.test_bgp_snmp_mplsvpn/r1.bgpd.asan.2925690-    3 0x7efcdaa558c8 in mplsL3vpnVrfRtTable bgpd/bgp_mplsvpn_snmp.c:1152
./bgp_snmp_mplsl3vpn.test_bgp_snmp_mplsvpn/r1.bgpd.asan.2925690-    4 0x7efcda784139 in netsnmp_old_api_helper helpers/old_api.c:332
./bgp_snmp_mplsl3vpn.test_bgp_snmp_mplsvpn/r1.bgpd.asan.2925690-
./bgp_snmp_mplsl3vpn.test_bgp_snmp_mplsvpn/r1.bgpd.asan.2925690-SUMMARY: AddressSanitizer: 528 byte(s) leaked in 8 allocation(s).
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-03-14 11:07:48 +02:00
mobash-rasool
3ae6704b20
Merge pull request #12978 from donaldsharp/multicast_address
pimd: IN_MULTICAST needs host order
2023-03-14 11:18:35 +05:30
Donatas Abraitis
b3b0679cb0 tools: Use specific syntax for conditions for Github actions
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-03-13 09:52:13 +02:00
Donatas Abraitis
3ac291b526
Merge pull request #12974 from donaldsharp/update_versioning
bgpd: Increment version number even when no data is sent
2023-03-12 21:48:49 +02:00
Josef Miegl
a0956b9522 isisd: pfpacket BPF filter with IS-IS over tunnel support
Signed-off-by: Josef Miegl <josef@miegl.cz>
2023-03-12 16:15:27 +01:00
Donatas Abraitis
8e09dce6bf
Merge pull request #12923 from donaldsharp/update_group_debug
bgpd: Add missing items to debug for update group hash key creation
2023-03-12 15:51:51 +02:00
Donald Sharp
8083e71356 pimd: IN_MULTICAST needs host order
New correct behavior:

eva# conf
eva(config)# ip pim rp 192.168.1.224 224.0.0.0/24
No Path to RP address specified: 192.168.1.224
eva(config)# ip pim rp 224.1.2.3 224.0.0.0/24
% Bad RP address specified: 224.1.2.3
eva(config)#

Fixes: #12970
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-11 19:39:22 -05:00
Donald Sharp
a8038460bd bgpd: Increment version number even when no data is sent
When an update group decides to not send a prefix
announcement because it has not changed, still increment
the version number.  Why?  To allow for the situation
where you have say 2 peers in 1 peer group and shortly
after they come up a 3rd peer comes up.  It will be
placed into a separate update group and could be
coalesced down, when it finishes updating all data
to it.  Now imagine that a single prefix changes at
this point in time as well.  Then first 2 peers may
decide to not send the data, since nothing has changed.
While the 3rd peer will and since the versions numbers
never match they will never coalesce.  So when the decision
is made to skip, update the version number as well.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-11 12:09:23 -05:00
Jafar Al-Gharaibeh
660d14e18b
Merge pull request #12962 from opensourcerouting/fix/bgpd_ipv6_ll_peering
bgpd: Check if the peer is configured as interface when checking NHT
2023-03-10 23:09:07 -06:00
Donald Sharp
3bde1a53cc
Merge pull request #12967 from pguibert6WIND/show_zebra_mpls_empty 2023-03-10 17:53:46 -05:00
Donald Sharp
115ccb9acf lib, bgpd: Add more debugs to GR Capability exchange
a) Make it legible what type of message is being passed
back and forth instead of having to guess it from
the insufficient debugs

b) Make it explicit which bgp instance is sending this
data

c) Cleanup bgp_zebra_update to have a cleaner api

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-09 08:36:51 -05:00
Philippe Guibert
060c7d7073 zebra: add json support when "show zebra mpls" returns nothing
The "show zebra mpls .. json" vty command may return empty information
in case the MPLS database is empty or a given label entry is not
available. When those errors occur, add the braces to return a
valid json format.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-03-09 09:44:14 +01:00
Donald Sharp
edacb45c0c zebra: Make GR debug logs at least vrf aware
The GR debug logs are doing all sorts of wonderful stuff
but they were not actually displaying anything useful to the operator
about what vrf we are operating in.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-08 13:26:16 -05:00
Donatas Abraitis
d7917c2541
Merge pull request #12963 from anlancs/fix/bgpd-keep-common
bgpd: Simplify the code for show command
2023-03-08 16:12:03 +02:00
anlan_cs
344c7da04e bgpd: Simplify the code for show command
Keep the common code for command: "show ip bgp summary [wide]".

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2023-03-08 16:10:05 +08:00
Donatas Abraitis
0f4a09ac25 tests: Check if IPv6 BGP Link-Local peering works
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-03-07 22:45:03 +02:00
Donatas Abraitis
e9ad26e53f bgpd: Check if the peer is configured as interface when checking NHT
This causes early return. peer->conf is NULL for IPv6 link-local peering,
and the session never establish.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-03-07 22:36:15 +02:00
Russ White
e1ee742b53
Merge pull request #12890 from pguibert6WIND/attr_cleaning_misc
bgp attribute cleaning misc
2023-03-07 09:46:24 -05:00
Russ White
bafc9c5dbf
Merge pull request #12940 from anlancs/fix/bfd-clean-echo
bfdd: remove useless check for ECHO packet
2023-03-07 09:33:33 -05:00
Russ White
44ff41e566
Merge pull request #12946 from opensourcerouting/fix/memory_leak_adj_out_set
bgpd: Intern attributes before putting into rib-out
2023-03-07 09:31:27 -05:00
Donald Sharp
b0d2fa3857 bgpd: Add missing items to debug for update group hash key creation
There are some missing values in the debug lines.  Let's add them
in and help us understand.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-07 07:58:27 -05:00
Donatas Abraitis
ae7b16b2d4
Merge pull request #12960 from anlancs/doc/some-words-doc
doc: Correct some words
2023-03-07 08:25:50 +02:00
Donatas Abraitis
f980f77ee0
Merge pull request #12934 from LabNConsulting/ziemba/rfapi-memleak-cleanup-12478
bgpd/rfapi: memleak: clean CE tables at exit
2023-03-06 21:19:36 +02:00
Donald Sharp
aca2040795
Merge pull request #12957 from opensourcerouting/fix/no_need_to_send_notification
bgpd: Do not send notification twice when parsing NLRI labels
2023-03-06 09:45:40 -05:00
Donald Sharp
694bb3fa75
Merge pull request #12958 from opensourcerouting/fix/commitlint_master_branch
tools: Do not run commit linter for other branches than master
2023-03-06 09:45:17 -05:00
Kuldeep Kashyap
7ce53cf7c7 tests: [PIMv6] Adding multicast pim6 SM testsuite
Automated new scenarios to multicast pim6
SM test suite. Added 10 test cases to verify
multicast PIM6-SM functionality.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
Co-Auther: Vijay Kumar Gupta <vijayg@vmware.com>
2023-03-06 05:08:08 -08:00
Kuldeep Kashyap
54bf02c6dd tests: [PIMv6] F/W support for multicast pimv6 automation
Enhanced or added new libraries to support
multicast pimv6 automation

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
Co-Auther: Vijay Kumar Gupta <vijayg@vmware.com>
2023-03-06 05:08:08 -08:00
anlan_cs
c3e691229e doc: Correct some words
Note that `ASNUM` in table, it is missing right parenthesis for
`(1-4294967295)`. So, adjust this table.

And correct other words for doc.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2023-03-06 17:12:50 +08:00
Donatas Abraitis
754a054059 tools: Do not run commit linter for other branches than master
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-03-05 21:15:18 +02:00
Donatas Abraitis
bfeb86dfa8 bgpd: Do not send notification twice when parsing NLRI labels
This is already handled in bgp_nlri_parse() by checking error code.

Even more, we should send error sub-code to be according the NLRI type.

If it's MP_UPDATE/MP_WITHDRAW, sub-code should be an Optional Attribute error.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-03-05 20:58:26 +02:00
Donatas Abraitis
e618cc7b21
Merge pull request #12951 from donaldsharp/label_decode_crash
bgpd: Fix use beyond end of stream of labeled unicast parsing
2023-03-05 20:49:51 +02:00
Donatas Abraitis
0f46adebe4
Merge pull request #12950 from harryreps/master
babeld: fix #11808 to avoid infinite loops
2023-03-04 13:09:10 +02:00
Donald Sharp
7404a914b0 bgpd: Fix use beyond end of stream of labeled unicast parsing
Fixes a couple crashes associated with attempting to read
beyond the end of the stream.

Reported-by: Iggy Frankovic <iggyfran@amazon.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-03-03 22:38:50 -05:00
harryreps
ae1e0e1fed babeld: fix #11808 to avoid infinite loops
Replacing continue in loops to goto done so that index of packet buffer
increases.

Signed-off-by: harryreps <harryreps@gmail.com>
2023-03-03 23:19:33 +00:00
Mark Stapp
e879c3d8a2
Merge pull request #12935 from opensourcerouting/ospf6d-la-bit
ospf6d: fix processing of inter-area-prefix-LSAs with the LA-bit set
2023-03-03 15:38:32 -05:00
Mark Stapp
334b1188c2
Merge pull request #12937 from opensourcerouting/ospf6d-redist
ospf6d: small fixes in the handling of redistributed routes
2023-03-03 15:38:02 -05:00
Donatas Abraitis
84ef27fca3 bgpd: Intern attributes before putting into rib-out
```
==21860==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 80 byte(s) in 2 object(s) allocated from:
    0 0x7f8065294d28 in __interceptor_calloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xded28)
    1 0x7f8064cfd216 in qcalloc lib/memory.c:105
    2 0x5646b7024073 in ecommunity_dup bgpd/bgp_ecommunity.c:252
    3 0x5646b7153585 in route_set_ecommunity_lb bgpd/bgp_routemap.c:2925
    4 0x7f8064d459be in route_map_apply_ext lib/routemap.c:2675
    5 0x5646b7116584 in subgroup_announce_check bgpd/bgp_route.c:2374
    6 0x5646b711b907 in subgroup_process_announce_selected bgpd/bgp_route.c:2918
    7 0x5646b717ceb8 in group_announce_route_walkcb bgpd/bgp_updgrp_adv.c:184
    8 0x7f8064cc6acd in hash_walk lib/hash.c:270
    9 0x5646b717ae0c in update_group_af_walk bgpd/bgp_updgrp.c:2046
    10 0x5646b7181275 in group_announce_route bgpd/bgp_updgrp_adv.c:1030
    11 0x5646b711a986 in bgp_process_main_one bgpd/bgp_route.c:3303
    12 0x5646b711b5bf in bgp_process_wq bgpd/bgp_route.c:3444
    13 0x7f8064da12d7 in work_queue_run lib/workqueue.c:267
    14 0x7f8064d891fb in thread_call lib/thread.c:1991
    15 0x7f8064cdffcf in frr_run lib/libfrr.c:1185
    16 0x5646b6feca67 in main bgpd/bgp_main.c:505
    17 0x7f8063f96c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)

Indirect leak of 16 byte(s) in 2 object(s) allocated from:
    0 0x7f8065294b40 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xdeb40)
    1 0x7f8064cfcf01 in qmalloc lib/memory.c:100
    2 0x5646b7024151 in ecommunity_dup bgpd/bgp_ecommunity.c:256
    3 0x5646b7153585 in route_set_ecommunity_lb bgpd/bgp_routemap.c:2925
    4 0x7f8064d459be in route_map_apply_ext lib/routemap.c:2675
    5 0x5646b7116584 in subgroup_announce_check bgpd/bgp_route.c:2374
    6 0x5646b711b907 in subgroup_process_announce_selected bgpd/bgp_route.c:2918
    7 0x5646b717ceb8 in group_announce_route_walkcb bgpd/bgp_updgrp_adv.c:184
    8 0x7f8064cc6acd in hash_walk lib/hash.c:270
    9 0x5646b717ae0c in update_group_af_walk bgpd/bgp_updgrp.c:2046
    10 0x5646b7181275 in group_announce_route bgpd/bgp_updgrp_adv.c:1030
    11 0x5646b711a986 in bgp_process_main_one bgpd/bgp_route.c:3303
    12 0x5646b711b5bf in bgp_process_wq bgpd/bgp_route.c:3444
    13 0x7f8064da12d7 in work_queue_run lib/workqueue.c:267
    14 0x7f8064d891fb in thread_call lib/thread.c:1991
    15 0x7f8064cdffcf in frr_run lib/libfrr.c:1185
    16 0x5646b6feca67 in main bgpd/bgp_main.c:505
    17 0x7f8063f96c86 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21c86)
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-03-03 17:33:51 +02:00
Donatas Abraitis
e119fbf851
Merge pull request #12942 from LabNConsulting/chopps/fixpause
tests: fix --pause functionality
2023-03-03 17:20:14 +02:00
G. Paul Ziemba
cd88639537 bgpd: rfapi memleak: clean CE tables at exit
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2023-03-03 07:03:40 -08:00
Christian Hopps
cad554442b tests: fix --pause functionality
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-03-03 07:19:22 -05:00
Christian Hopps
70de85d669
Merge pull request #12945 from opensourcerouting/fix/relax_a_bit_some_commitlint_rules
tools: Do not force Sentence-case for commit messages
2023-03-03 07:13:44 -05:00
Donatas Abraitis
70594ab7bd tools: Do not force Sentence-case for commit messages
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-03-03 14:10:36 +02:00
anlan_cs
c9aac2c38a bfdd: Remove useless check for ECHO packet
The check with `ip->daddr == ip->saddr` in `bfd_recv_ipv4_fp()` is
useless, instead of it the ECHO packets should simply exit with
TTL checking failure regardless of this condition check.

Just remove the check.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2023-03-03 18:25:12 +08:00
Christian Hopps
bd0699e27a
Merge pull request #12943 from opensourcerouting/feature/add_helpurl
tools: Commit linter minor adjustments
2023-03-03 03:15:16 -05:00