]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
2 years agoisisd: pfpacket BPF filter with IS-IS over tunnel support 12979/head
Josef Miegl [Sun, 12 Mar 2023 15:15:27 +0000 (16:15 +0100)]
isisd: pfpacket BPF filter with IS-IS over tunnel support

Signed-off-by: Josef Miegl <josef@miegl.cz>
2 years agoMerge pull request #12923 from donaldsharp/update_group_debug
Donatas Abraitis [Sun, 12 Mar 2023 13:51:51 +0000 (15:51 +0200)]
Merge pull request #12923 from donaldsharp/update_group_debug

bgpd: Add missing items to debug for update group hash key creation

2 years agoMerge pull request #12962 from opensourcerouting/fix/bgpd_ipv6_ll_peering
Jafar Al-Gharaibeh [Sat, 11 Mar 2023 05:09:07 +0000 (23:09 -0600)]
Merge pull request #12962 from opensourcerouting/fix/bgpd_ipv6_ll_peering

bgpd: Check if the peer is configured as interface when checking NHT

2 years agoMerge pull request #12967 from pguibert6WIND/show_zebra_mpls_empty
Donald Sharp [Fri, 10 Mar 2023 22:53:46 +0000 (17:53 -0500)]
Merge pull request #12967 from pguibert6WIND/show_zebra_mpls_empty

2 years agozebra: add json support when "show zebra mpls" returns nothing 12967/head
Philippe Guibert [Fri, 3 Mar 2023 12:21:00 +0000 (13:21 +0100)]
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>
2 years agoMerge pull request #12963 from anlancs/fix/bgpd-keep-common
Donatas Abraitis [Wed, 8 Mar 2023 14:12:03 +0000 (16:12 +0200)]
Merge pull request #12963 from anlancs/fix/bgpd-keep-common

bgpd: Simplify the code for show command

2 years agobgpd: Simplify the code for show command 12963/head
anlan_cs [Tue, 7 Mar 2023 00:50:00 +0000 (08:50 +0800)]
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>
2 years agotests: Check if IPv6 BGP Link-Local peering works 12962/head
Donatas Abraitis [Tue, 7 Mar 2023 20:41:58 +0000 (22:41 +0200)]
tests: Check if IPv6 BGP Link-Local peering works

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Check if the peer is configured as interface when checking NHT
Donatas Abraitis [Tue, 7 Mar 2023 20:36:15 +0000 (22:36 +0200)]
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>
2 years agoMerge pull request #12890 from pguibert6WIND/attr_cleaning_misc
Russ White [Tue, 7 Mar 2023 14:46:24 +0000 (09:46 -0500)]
Merge pull request #12890 from pguibert6WIND/attr_cleaning_misc

bgp attribute cleaning misc

2 years agoMerge pull request #12940 from anlancs/fix/bfd-clean-echo
Russ White [Tue, 7 Mar 2023 14:33:33 +0000 (09:33 -0500)]
Merge pull request #12940 from anlancs/fix/bfd-clean-echo

bfdd: remove useless check for ECHO packet

2 years agoMerge pull request #12946 from opensourcerouting/fix/memory_leak_adj_out_set
Russ White [Tue, 7 Mar 2023 14:31:27 +0000 (09:31 -0500)]
Merge pull request #12946 from opensourcerouting/fix/memory_leak_adj_out_set

bgpd: Intern attributes before putting into rib-out

2 years agobgpd: Add missing items to debug for update group hash key creation 12923/head
Donald Sharp [Wed, 1 Mar 2023 20:43:42 +0000 (15:43 -0500)]
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>
2 years agoMerge pull request #12960 from anlancs/doc/some-words-doc
Donatas Abraitis [Tue, 7 Mar 2023 06:25:50 +0000 (08:25 +0200)]
Merge pull request #12960 from anlancs/doc/some-words-doc

doc: Correct some words

2 years agoMerge pull request #12934 from LabNConsulting/ziemba/rfapi-memleak-cleanup-12478
Donatas Abraitis [Mon, 6 Mar 2023 19:19:36 +0000 (21:19 +0200)]
Merge pull request #12934 from LabNConsulting/ziemba/rfapi-memleak-cleanup-12478

bgpd/rfapi: memleak: clean CE tables at exit

2 years agoMerge pull request #12957 from opensourcerouting/fix/no_need_to_send_notification
Donald Sharp [Mon, 6 Mar 2023 14:45:40 +0000 (09:45 -0500)]
Merge pull request #12957 from opensourcerouting/fix/no_need_to_send_notification

bgpd: Do not send notification twice when parsing NLRI labels

2 years agoMerge pull request #12958 from opensourcerouting/fix/commitlint_master_branch
Donald Sharp [Mon, 6 Mar 2023 14:45:17 +0000 (09:45 -0500)]
Merge pull request #12958 from opensourcerouting/fix/commitlint_master_branch

tools: Do not run commit linter for other branches than master

2 years agodoc: Correct some words 12960/head
anlan_cs [Tue, 28 Feb 2023 07:52:06 +0000 (15:52 +0800)]
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>
2 years agotools: Do not run commit linter for other branches than master 12958/head
Donatas Abraitis [Sun, 5 Mar 2023 19:12:23 +0000 (21:12 +0200)]
tools: Do not run commit linter for other branches than master

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Do not send notification twice when parsing NLRI labels 12957/head
Donatas Abraitis [Sun, 5 Mar 2023 18:56:05 +0000 (20:56 +0200)]
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>
2 years agoMerge pull request #12951 from donaldsharp/label_decode_crash
Donatas Abraitis [Sun, 5 Mar 2023 18:49:51 +0000 (20:49 +0200)]
Merge pull request #12951 from donaldsharp/label_decode_crash

bgpd: Fix use beyond end of stream of labeled unicast parsing

2 years agoMerge pull request #12950 from harryreps/master
Donatas Abraitis [Sat, 4 Mar 2023 11:09:10 +0000 (13:09 +0200)]
Merge pull request #12950 from harryreps/master

babeld: fix #11808 to avoid infinite loops

2 years agobgpd: Fix use beyond end of stream of labeled unicast parsing 12951/head
Donald Sharp [Sat, 4 Mar 2023 02:58:33 +0000 (21:58 -0500)]
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>
2 years agobabeld: fix #11808 to avoid infinite loops 12950/head
harryreps [Fri, 3 Mar 2023 23:17:14 +0000 (23:17 +0000)]
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>
2 years agoMerge pull request #12935 from opensourcerouting/ospf6d-la-bit
Mark Stapp [Fri, 3 Mar 2023 20:38:32 +0000 (15:38 -0500)]
Merge pull request #12935 from opensourcerouting/ospf6d-la-bit

ospf6d: fix processing of inter-area-prefix-LSAs with the LA-bit set

2 years agoMerge pull request #12937 from opensourcerouting/ospf6d-redist
Mark Stapp [Fri, 3 Mar 2023 20:38:02 +0000 (15:38 -0500)]
Merge pull request #12937 from opensourcerouting/ospf6d-redist

ospf6d: small fixes in the handling of redistributed routes

2 years agobgpd: Intern attributes before putting into rib-out 12946/head
Donatas Abraitis [Fri, 3 Mar 2023 15:33:51 +0000 (17:33 +0200)]
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>
2 years agoMerge pull request #12942 from LabNConsulting/chopps/fixpause
Donatas Abraitis [Fri, 3 Mar 2023 15:20:14 +0000 (17:20 +0200)]
Merge pull request #12942 from LabNConsulting/chopps/fixpause

tests: fix --pause functionality

2 years agobgpd: rfapi memleak: clean CE tables at exit 12934/head
G. Paul Ziemba [Thu, 2 Mar 2023 21:23:08 +0000 (13:23 -0800)]
bgpd: rfapi memleak: clean CE tables at exit

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2 years agotests: fix --pause functionality 12942/head
Christian Hopps [Fri, 3 Mar 2023 07:49:10 +0000 (02:49 -0500)]
tests: fix --pause functionality

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoMerge pull request #12945 from opensourcerouting/fix/relax_a_bit_some_commitlint_rules
Christian Hopps [Fri, 3 Mar 2023 12:13:44 +0000 (07:13 -0500)]
Merge pull request #12945 from opensourcerouting/fix/relax_a_bit_some_commitlint_rules

tools: Do not force Sentence-case for commit messages

2 years agotools: Do not force Sentence-case for commit messages 12945/head
Donatas Abraitis [Fri, 3 Mar 2023 12:10:36 +0000 (14:10 +0200)]
tools: Do not force Sentence-case for commit messages

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobfdd: Remove useless check for ECHO packet 12940/head
anlan_cs [Thu, 2 Mar 2023 09:57:17 +0000 (17:57 +0800)]
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>
2 years agoMerge pull request #12943 from opensourcerouting/feature/add_helpurl
Christian Hopps [Fri, 3 Mar 2023 08:15:16 +0000 (03:15 -0500)]
Merge pull request #12943 from opensourcerouting/feature/add_helpurl

tools: Commit linter minor adjustments

2 years agotools: Add missing `mgmtd` prefix for commitlint 12943/head
Donatas Abraitis [Fri, 3 Mar 2023 08:11:51 +0000 (10:11 +0200)]
tools: Add missing `mgmtd` prefix for commitlint

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agotools: Add missing `pathd` prefix for commitlint
Donatas Abraitis [Fri, 3 Mar 2023 08:07:06 +0000 (10:07 +0200)]
tools: Add missing `pathd` prefix for commitlint

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agotools: Add help url when commitlint fails
Donatas Abraitis [Tue, 7 Feb 2023 21:08:42 +0000 (23:08 +0200)]
tools: Add help url when commitlint fails

Just point to our workflow documentation.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoospf6d: fix processing of inter-area-prefix-LSAs with the LA-bit set 12935/head
Renato Westphal [Thu, 2 Mar 2023 22:39:17 +0000 (19:39 -0300)]
ospf6d: fix processing of inter-area-prefix-LSAs with the LA-bit set

RFC 5340, Section 4.8.3 says:
  "Prefixes having the NU-bit set in their PrefixOptions field should
  be ignored by the inter-area route calculation".

Fix a bug where, in addition to the NU-bit, ospf6d was also ignoring
prefixes having the LA-bit set when computing inter-area routes. In
practice, this fixes interoperability issues with vendors that set
the LA-bit in loopback prefixes (among other cases).

While here, fix a copy-and-paste error where a log message wasn't
showing accurate information about what happened.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agoospf6d: handle redistributed routes without nexthop addresses 12937/head
Renato Westphal [Thu, 2 Mar 2023 23:20:39 +0000 (20:20 -0300)]
ospf6d: handle redistributed routes without nexthop addresses

Do not assume that all redistributed routes have a nexthop address,
otherwise blackhole nexthops can be misinterpreted as IPv6 addresses,
leading to inconsistencies.

Also, change the signature of a few functions to allow const nexthop
addresses, such that in6addr_any can be used without type casts.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agoospf6d: originate AS-External LSAs with a forwarding address
Renato Westphal [Thu, 2 Mar 2023 23:20:39 +0000 (20:20 -0300)]
ospf6d: originate AS-External LSAs with a forwarding address

Originate AS-External LSAs with forwarding addresses whenever the
corresponding redistributed routes have a global nexthop address.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agoMerge pull request #12650 from isabelladeleon12/advertise_high_metrics
Russ White [Thu, 2 Mar 2023 21:42:50 +0000 (16:42 -0500)]
Merge pull request #12650 from isabelladeleon12/advertise_high_metrics

isisd: Add support for advertise-high-metrics

2 years agoMerge pull request #12760 from opensourcerouting/fix/switch_to_pr_for_commitlint
mobash-rasool [Thu, 2 Mar 2023 07:54:28 +0000 (13:24 +0530)]
Merge pull request #12760 from opensourcerouting/fix/switch_to_pr_for_commitlint

tools: Replace pull_request_target to pull_request for commitlint action

2 years agoMerge pull request #12903 from patrasar/pim_rp_nexthop_fix
Donatas Abraitis [Thu, 2 Mar 2023 07:54:18 +0000 (09:54 +0200)]
Merge pull request #12903 from patrasar/pim_rp_nexthop_fix

pimd, pim6d: Don't track nexthop for RP 0.0.0.0 & 0::0

2 years agoMerge pull request #12921 from donaldsharp/pim_regiface_crash
Donatas Abraitis [Thu, 2 Mar 2023 06:14:35 +0000 (08:14 +0200)]
Merge pull request #12921 from donaldsharp/pim_regiface_crash

pimd: Prevent crash when pimreg already exists.

2 years agoMerge pull request #12008 from patrasar/pimv6_bsm_process
Donatas Abraitis [Thu, 2 Mar 2023 06:10:32 +0000 (08:10 +0200)]
Merge pull request #12008 from patrasar/pimv6_bsm_process

pimd, pim6d: Fix RPF check

2 years agopimd: Prevent crash when pimreg already exists. 12921/head
Donald Sharp [Wed, 1 Mar 2023 19:41:21 +0000 (14:41 -0500)]
pimd: Prevent crash when pimreg already exists.

If the pimreg device exists but it has not been set to the pim->pimreg pointer we can have
a crash.  Just prevent the crash since it's some sort of startup / re-org the network
issue.

(gdb) bt
0  0x00007f0485b035cb in raise () from /lib/x86_64-linux-gnu/libpthread.so.0
1  0x00007f0485c0fbec in core_handler (signo=6, siginfo=0x7ffdc0198030, context=<optimized out>) at lib/sigevent.c:264
2  <signal handler called>
3  0x00007f04859668eb in raise () from /lib/x86_64-linux-gnu/libc.so.6
4  0x00007f0485951535 in abort () from /lib/x86_64-linux-gnu/libc.so.6
5  0x00007f0485c3af76 in _zlog_assert_failed (xref=xref@entry=0x55692269b940 <_xref.23164>, extra=extra@entry=0x0) at lib/zlog.c:680
6  0x00005569226150d0 in pim_if_new (ifp=0x556922c82900, gm=gm@entry=false, pim=pim@entry=false, ispimreg=ispimreg@entry=true,
    is_vxlan_term=is_vxlan_term@entry=false) at pimd/pim_iface.c:124
7  0x0000556922615140 in pim_if_create_pimreg (pim=pim@entry=0x556922cc11e0) at pimd/pim_iface.c:1549
8  0x0000556922616bc8 in pim_if_create_pimreg (pim=0x556922cc11e0) at pimd/pim_iface.c:1613
9  pim_ifp_create (ifp=0x556922cc0e70) at pimd/pim_iface.c:1641
10 0x00007f0485c32cf9 in zclient_interface_add (cmd=<optimized out>, zclient=<optimized out>, length=<optimized out>, vrf_id=77) at lib/zclient.c:2214
11 0x00007f0485c3346a in zclient_read (thread=<optimized out>) at lib/zclient.c:4003
12 0x00007f0485c215ed in thread_call (thread=thread@entry=0x7ffdc0198880) at lib/thread.c:2008
13 0x00007f0485bdbbc8 in frr_run (master=0x556922a10470) at lib/libfrr.c:1223
14 0x000055692260312b in main (argc=<optimized out>, argv=0x7ffdc0198b98, envp=<optimized out>) at pimd/pim_main.c:176

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #12920 from sri-mohan1/sri-mohan-ldp
mobash-rasool [Wed, 1 Mar 2023 19:10:26 +0000 (00:40 +0530)]
Merge pull request #12920 from sri-mohan1/sri-mohan-ldp

ldpd: changes for code maintainability

2 years agoldpd: changes for code maintainability 12920/head
sri-mohan1 [Wed, 1 Mar 2023 11:54:54 +0000 (17:24 +0530)]
ldpd: changes for code maintainability

these changes are for improving the code maintainability and readability

Signed-off-by: sri-mohan1 <sri.mohan@samsung.com>
2 years agoMerge pull request #12917 from pguibert6WIND/bpi_ultimate_path_debug
Donatas Abraitis [Wed, 1 Mar 2023 08:04:43 +0000 (10:04 +0200)]
Merge pull request #12917 from pguibert6WIND/bpi_ultimate_path_debug

Bpi ultimate path debug

2 years agoMerge pull request #12811 from Avineus/frr_neighlog_5884
Donatas Abraitis [Wed, 1 Mar 2023 07:59:01 +0000 (09:59 +0200)]
Merge pull request #12811 from Avineus/frr_neighlog_5884

Fix for "Debugs For RFC 5549 Neighbor Creation #5884"

2 years agoMerge pull request #12914 from patrasar/pim_mroute_fix
Donatas Abraitis [Wed, 1 Mar 2023 07:57:29 +0000 (09:57 +0200)]
Merge pull request #12914 from patrasar/pim_mroute_fix

pimd, pim6d: Don't start KAT timer when traffic received on PIM disabled interface

2 years agobgpd: debug trace retrieve real peer origin of path info 12917/head
Philippe Guibert [Fri, 24 Feb 2023 13:26:59 +0000 (14:26 +0100)]
bgpd: debug trace retrieve real peer origin of path info

The BGP path info debugging information should dump the
real peer information for imported prefixes.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2 years agobgpd: generalize imported peer in bgp best selection function
Philippe Guibert [Fri, 24 Feb 2023 13:19:06 +0000 (14:19 +0100)]
bgpd: generalize imported peer in bgp best selection function

The bgp_path_info_cmp() function needs to get the peer of
imported prefixes in many parts of the algorithm. Use two
local variables to get the original peer either for vpn
imported prefixes or from standard prefixes.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2 years agoMerge pull request #12618 from pguibert6WIND/vpnv4_ecmp
Russ White [Tue, 28 Feb 2023 20:49:05 +0000 (15:49 -0500)]
Merge pull request #12618 from pguibert6WIND/vpnv4_ecmp

Vpnv4 ecmp

2 years agodoc: Add CLI documentation for new advertise high metrics command 12650/head
Isabella de Leon [Tue, 17 Jan 2023 04:25:30 +0000 (20:25 -0800)]
doc: Add CLI documentation for new advertise high metrics command

Update isisd docs with advertise-high-metrics config.

Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2 years agotests: Add test to cover advertise-high-metrics functionality
Isabella de Leon [Tue, 17 Jan 2023 04:19:29 +0000 (20:19 -0800)]
tests: Add test to cover advertise-high-metrics functionality

Add tests that configure and disable advertise-high-metrics with wide, narrow, and transition metric styles. Also test ip route behavior.

Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2 years agoisisd: Add advertise high metrics base functionality
Isabella de Leon [Wed, 11 Jan 2023 01:58:29 +0000 (17:58 -0800)]
isisd: Add advertise high metrics base functionality

Implement advertise-high-metrics set function - when advertise-high-metrics is configured, iterate through each isis interface and update each metric to its high metric value. When advertise-high-metrics is disabled, revert each interface's metric to its originally configured value.

Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2 years agoisisd: Add advertise-high-metrics CLI/YANG support, modify show output
Isabella de Leon [Fri, 6 Jan 2023 18:06:23 +0000 (10:06 -0800)]
isisd: Add advertise-high-metrics CLI/YANG support, modify show output

New config and show functionality:

r1# conf
r1(config)# router isis 1
r1(config-router)#
  advertise-high-metrics  Advertise high metric value on all interfaces
  area-password           Configure the authentication password for an area
  ...
r1(config-router)# advertise-high-metrics
r1(config-router)# end
r1# show isis summary
...
Area 1:
  Net: 49.0001.1720.1700.0002.00
  TX counters per PDU type:
     L2 IIH: 1
    P2P IIH: 36
   LSP RXMT: 0
  RX counters per PDU type:
  Advertise high metrics: Enabled
  Level-2:
   ...
r1# conf
r1(config)# router isis 1
r1(config-router)# no advertise-high-metrics
r1(config-router)# end
r1# show isis summary
...
Area 1:
  Net: 49.0001.1720.1700.0002.00
  TX counters per PDU type:
     L2 IIH: 1
    P2P IIH: 45
   LSP RXMT: 0
  RX counters per PDU type:
  Advertise high metrics: Disabled
  Level-2:
   ...
r1#

Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2 years agopimd, pim6d: Don't track nexthop for RP 0.0.0.0 & 0::0 12903/head
Sarita Patra [Sat, 25 Feb 2023 08:33:13 +0000 (00:33 -0800)]
pimd, pim6d: Don't track nexthop for RP 0.0.0.0 & 0::0

Topology:
========
FHR----Source

Problem:
=======
When FHR receives multicast traffic, there is no RP configured,
PIMD does NHT register for RP address 0.0.0.0 and group 224.0.0.0/4
PIM6D does NHT register for RP address 0::0 and group FF00::0/8

frr# show ip pim nexthop
Number of registered addresses: 1
Address         Interface        Nexthop
---------------------------------------------

frr# show ipv6 pim nexthop
Number of registered addresses: 1
Address         Interface        Nexthop
---------------------------------------------

Fix:
====
Dont track nexthop for RP 0.0.0.0 & 0::0.

frr# show ip pim nexthop
Number of registered addresses: 0

frr# show ipv6 pim nexthop
Number of registered addresses: 0

Issue: #12104

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agoMerge pull request #12840 from dorDiogo/isis_advertise_passive_only
Russ White [Tue, 28 Feb 2023 14:22:32 +0000 (09:22 -0500)]
Merge pull request #12840 from dorDiogo/isis_advertise_passive_only

isisd: Add support for IS-IS advertise-passive-only

2 years agoMerge pull request #12819 from isabelladeleon12/isis_load_config_before_lsp_gen
Russ White [Tue, 28 Feb 2023 13:38:44 +0000 (08:38 -0500)]
Merge pull request #12819 from isabelladeleon12/isis_load_config_before_lsp_gen

isisd: Delay lsp generation to after config processing is complete

2 years agoMerge pull request #12912 from opensourcerouting/fix/free_memory_on_shutdown
Donald Sharp [Tue, 28 Feb 2023 12:51:06 +0000 (07:51 -0500)]
Merge pull request #12912 from opensourcerouting/fix/free_memory_on_shutdown

bgpd: Free aggregate route memory on shutdown

2 years agoMerge pull request #12911 from opensourcerouting/fix/python_warning_ospf
Donald Sharp [Tue, 28 Feb 2023 12:50:10 +0000 (07:50 -0500)]
Merge pull request #12911 from opensourcerouting/fix/python_warning_ospf

tests: Use inequality operator for strings

2 years agoMerge pull request #12913 from opensourcerouting/fix/memory_leak_with_route_maps
Donald Sharp [Tue, 28 Feb 2023 12:49:44 +0000 (07:49 -0500)]
Merge pull request #12913 from opensourcerouting/fix/memory_leak_with_route_maps

bgpd: Intern attributes before putting into rib-out

2 years agopimd: Don't start KAT timer when traffic received on PIM disabled interface 12914/head
Sarita Patra [Tue, 28 Feb 2023 06:50:29 +0000 (22:50 -0800)]
pimd: Don't start KAT timer when traffic received on PIM disabled interface

Topology:
RP---FHR---Source

Problem Statement:
1. In FHR, Enable PIM and IGMP on source connected interface
2. Start multicast traffic. (s,g) mroute and upstream will be created as expected.
3. Disable PIM on source connected interface.
4. Disable IGMP on source connected interface.
5. Stop the traffic.

Mroute will never get timeout.

Root Cause:
In FHR, when PIMD receive multicast data packet on
source connected interface which is IGMP enabled, but PIM
not enabled. PIMD process the packet, install the
mroute and start the KAT timer.

Fix:
Don't process multicast data packet received on PIM disabled

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agobgpd: Intern attributes before putting into rib-out 12913/head
Donatas Abraitis [Mon, 27 Feb 2023 21:40:32 +0000 (23:40 +0200)]
bgpd: Intern attributes before putting into rib-out

After we call subgroup_announce_check(), we leave communities, large-communities
that are modified by route-maps uninterned, and here we have a memory leak.

```
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323:Direct leak of 80 byte(s) in 2 object(s) allocated from:
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #0 0x7f0858d90037 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #1 0x7f08589b15b2 in qcalloc lib/memory.c:105
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #2 0x561f5c4e08d2 in lcommunity_new bgpd/bgp_lcommunity.c:28
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #3 0x561f5c4e11d9 in lcommunity_dup bgpd/bgp_lcommunity.c:141
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #4 0x561f5c5c3b8b in route_set_lcommunity bgpd/bgp_routemap.c:2491
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #5 0x7f0858a177a5 in route_map_apply_ext lib/routemap.c:2675
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #6 0x561f5c5696f9 in subgroup_announce_check bgpd/bgp_route.c:2352
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #7 0x561f5c5fb728 in subgroup_announce_table bgpd/bgp_updgrp_adv.c:682
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #8 0x561f5c5fbd95 in subgroup_announce_route bgpd/bgp_updgrp_adv.c:765
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #9 0x561f5c5f6105 in peer_af_announce_route bgpd/bgp_updgrp.c:2187
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #10 0x561f5c5790be in bgp_announce_route_timer_expired bgpd/bgp_route.c:5032
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #11 0x7f0858a76e4e in thread_call lib/thread.c:1991
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #12 0x7f0858974c24 in frr_run lib/libfrr.c:1185
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #13 0x561f5c3e955d in main bgpd/bgp_main.c:505
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #14 0x7f08583a9d09 in __libc_start_main ../csu/libc-start.c:308
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323:Indirect leak of 144 byte(s) in 2 object(s) allocated from:
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #0 0x7f0858d8fe8f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #1 0x7f08589b1579 in qmalloc lib/memory.c:100
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #2 0x561f5c4e1282 in lcommunity_dup bgpd/bgp_lcommunity.c:144
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #3 0x561f5c5c3b8b in route_set_lcommunity bgpd/bgp_routemap.c:2491
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #4 0x7f0858a177a5 in route_map_apply_ext lib/routemap.c:2675
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #5 0x561f5c5696f9 in subgroup_announce_check bgpd/bgp_route.c:2352
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #6 0x561f5c5fb728 in subgroup_announce_table bgpd/bgp_updgrp_adv.c:682
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #7 0x561f5c5fbd95 in subgroup_announce_route bgpd/bgp_updgrp_adv.c:765
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #8 0x561f5c5f6105 in peer_af_announce_route bgpd/bgp_updgrp.c:2187
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #9 0x561f5c5790be in bgp_announce_route_timer_expired bgpd/bgp_route.c:5032
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #10 0x7f0858a76e4e in thread_call lib/thread.c:1991
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #11 0x7f0858974c24 in frr_run lib/libfrr.c:1185
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #12 0x561f5c3e955d in main bgpd/bgp_main.c:505
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-    #13 0x7f08583a9d09 in __libc_start_main ../csu/libc-start.c:308
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-
./bgp_large_community.test_bgp_large_community_topo_2/r1.bgpd.asan.2465323-SUMMARY: AddressSanitizer: 224 byte(s) leaked in 4 allocation(s).
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Free aggregate route memory on shutdown 12912/head
Donatas Abraitis [Mon, 27 Feb 2023 20:15:07 +0000 (22:15 +0200)]
bgpd: Free aggregate route memory on shutdown

Memory leak happens on shutdown or if BGP already deconfigured.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agotests: Use inequality operator for strings 12911/head
Donatas Abraitis [Mon, 27 Feb 2023 20:08:47 +0000 (22:08 +0200)]
tests: Use inequality operator for strings

tests/topotests/lib/ospf.py:2819: SyntaxWarning: "is not" with a literal. Did you mean "!="?
    _age is not "get"

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #12899 from patrasar/pimv6_mld_interface_cmd
Donatas Abraitis [Mon, 27 Feb 2023 19:01:43 +0000 (21:01 +0200)]
Merge pull request #12899 from patrasar/pimv6_mld_interface_cmd

pim6d: Fix display issue in "show ipv6 mld interface" command

2 years agoMerge pull request #12906 from patrasar/pim_core
Donatas Abraitis [Mon, 27 Feb 2023 18:54:50 +0000 (20:54 +0200)]
Merge pull request #12906 from patrasar/pim_core

pimd, pim6d: Upstream IIF pointing towards PIM and IGMP disabled source conn…

2 years agoMerge pull request #12907 from donaldsharp/memory_why_you_do_this
Donatas Abraitis [Mon, 27 Feb 2023 18:51:53 +0000 (20:51 +0200)]
Merge pull request #12907 from donaldsharp/memory_why_you_do_this

bgpd: Prevent asn dot memory leak

2 years agoMerge pull request #12908 from opensourcerouting/fix/memory_leak_path_attributes
Igor Ryzhov [Mon, 27 Feb 2023 18:46:21 +0000 (20:46 +0200)]
Merge pull request #12908 from opensourcerouting/fix/memory_leak_path_attributes

bgpd: Free temporary memory after using argv_concat()

2 years agobgpd: Free temporary memory after using argv_concat() 12908/head
Donatas Abraitis [Mon, 27 Feb 2023 14:26:32 +0000 (16:26 +0200)]
bgpd: Free temporary memory after using argv_concat()

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agozebra: neigh update netlink log 12811/head
Kavitha [Wed, 15 Feb 2023 11:15:47 +0000 (16:45 +0530)]
zebra: neigh update netlink log

Added debug log in netlink_neigh_update(), with
ifindex, ifname, ipaddress and mac address.

Signed-off-by: Kavitha <kavirhene@gmail.com>
2 years agoMerge pull request #12866 from anlancs/lib/dotas-zero
Donatas Abraitis [Mon, 27 Feb 2023 09:05:47 +0000 (11:05 +0200)]
Merge pull request #12866 from anlancs/lib/dotas-zero

lib: some ASNUMs should be forbidden

2 years agopimd, pim6d: Upstream IIF pointing towards PIM and IGMP disabled source connected... 12906/head
Sarita Patra [Mon, 27 Feb 2023 06:25:05 +0000 (22:25 -0800)]
pimd, pim6d: Upstream IIF pointing towards PIM and IGMP disabled source connected interface

Topology:
=========
RP---FHR<ens224>---Source

Problem Statement:
=================
Step 1:
Enable PIM and IGMP on source connected interface ens224

Step 2:
Start multicast traffic. (s,g) mroute and upstream will be created as expected.

dev# show ip mroute
IP Multicast Routing Table
Flags: S - Sparse, C - Connected, P - Pruned
       R - SGRpt Pruned, F - Register flag, T - SPT-bit for SSM FHR
 Source    Group      Flags  Proto  Input   Output  TTL  Uptime
 50.0.0.4  225.1.1.1  SF     PIM    ens224  pimreg  1    00:37:55

dev# show ip pim upstream
 Iif     Source    Group      State      Uptime    JoinTimer  RSTimer   KATimer   RefCnt
 ens224  50.0.0.4  225.1.1.1  NotJ,RegJ  00:37:57  --:--:--   --:--:--  00:02:43  1

Step 3:
Disable PIM on source connected interafce ens224

dev# show ip mroute
IP Multicast Routing Table
Flags: S - Sparse, C - Connected, P - Pruned
       R - SGRpt Pruned, F - Register flag, T - SPT-bit for SSM FHR
 Source    Group      Flags  Proto  Input   Output  TTL  Uptime
 50.0.0.4  225.1.1.1  SF     PIM    ens224  pimreg  1    00:38:05

dev# show ip pim upstream
 Iif     Source    Group      State      Uptime    JoinTimer  RSTimer   KATimer   RefCnt
 ens224  50.0.0.4  225.1.1.1  NotJ,RegJ  00:38:08  --:--:--   --:--:--  00:02:32  1

Step 4:
Disable IGMP on source connected interface ens224

dev# show ip pim upstream
 Iif     Source    Group      State      Uptime    JoinTimer  RSTimer   KATimer   RefCnt
 ens224  50.0.0.4  225.1.1.1  NotJ,RegJ  00:38:15  --:--:--   --:--:--  00:03:27  1

dev# show ip mroute
IP Multicast Routing Table
Flags: S - Sparse, C - Connected, P - Pruned
       R - SGRpt Pruned, F - Register flag, T - SPT-bit for SSM FHR
 Source    Group      Flags  Proto  Input   Output  TTL  Uptime
 50.0.0.4  225.1.1.1  SF     PIM    <iif?>  pimreg  1    00:38:18

Pim upstream IIF is still pointing towards the source connected
interface which is not pim enabled and not IGMP enabled and
Mroute is still present in the kernel and KAT timer is still running
on the interface, where ifp->info is already set to NULL.
This leads to crash.

Root Cause:
==========
When "no ip pim" commands get executed on source connected interface,
we are updating upstream IIF only when IGMP is not enabled on the same
interface.

Fix:
===
When PIM is disabled on source connected interface, update upstream IIF
no matter if IGMP is enabled or not on the same interface.

Issue: #12848
Issue: #10782

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agotopotests: add vpnv4 ecmp test 12618/head
Philippe Guibert [Mon, 9 Jan 2023 15:29:25 +0000 (16:29 +0100)]
topotests: add vpnv4 ecmp test

This test ensures that BGP VRF instance is able to import ECMP
paths, and is able to install 2 labelled routes accordingly.

The test also ensures that the imported 172.31.0.10/32 prefix
is selected and that the reason why the 172.31.0.10/32 prefix is
selected is not 'Locally configured route'. Actually, imported
routes do not figure out correctly the peer, and the reason is
falsely mentioned as local.

This test also uses IP ranges used for documentation and for
testing.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2 years agobgpd: best path calculation uses peer from imported prefixes
Philippe Guibert [Tue, 10 Jan 2023 08:59:14 +0000 (09:59 +0100)]
bgpd: best path calculation uses peer from imported prefixes

Until now, when calculating the bgp bestpath route, the peer
comparison could not be performed for imported prefixes, as
the peer origin could not be retrieved. As consequence, the
reason why a given prefix as chosen was wrong: "Locally
configured route" was the main reason, whereas the prefix
was imported from a remote peer.

Fix this by searching for the real peer.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2 years agobgpd: Prevent asn dot memory leak 12907/head
Donald Sharp [Sat, 25 Feb 2023 12:43:30 +0000 (07:43 -0500)]
bgpd: Prevent asn dot memory leak

When allocating a new bit of memory free the old first.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopim6d: Fix missing parameters in "show ipv6 mld interface" command 12899/head
Sarita Patra [Fri, 24 Feb 2023 15:13:30 +0000 (07:13 -0800)]
pim6d: Fix missing parameters in "show ipv6 mld interface" command

Before fix:
==========
frr# show ipv6 mld interface
Interface         State  V  Querier                    Timer               Uptime
ens224            up     1  fe80::250:56ff:feb7:a7e3   query 00:00:24.219  00:00:07.031

After fix:
=========
frr(config-if)# do show ipv6 mld interface
 Interface  State  Address                   V  Querier  QuerierIp                 Query Timer   Uptime
 ens224     up     fe80::250:56ff:feb7:a7e3  1  local    fe80::250:56ff:feb7:a7e3  00:01:22.263  00:08:00.237

Issue: #11241

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agoMerge pull request #12900 from opensourcerouting/fix/memory_leak_aspath_dup_astype
Donald Sharp [Sat, 25 Feb 2023 00:17:20 +0000 (19:17 -0500)]
Merge pull request #12900 from opensourcerouting/fix/memory_leak_aspath_dup_astype

bgpd: Avoid double aspath_dup() for confederation when remote-as != AS_SPECIFIED

2 years agobgpd: Avoid double aspath_dup() for confederation when remote-as != AS_SPECIFIED 12900/head
Donatas Abraitis [Fri, 24 Feb 2023 20:01:15 +0000 (22:01 +0200)]
bgpd: Avoid double aspath_dup() for confederation when remote-as != AS_SPECIFIED

Just was blind when not seing it's already dup'ed above:

``` if (peer->sort == BGP_PEER_EBGP
    && (!CHECK_FLAG(peer->af_flags[afi][safi],
    PEER_FLAG_AS_PATH_UNCHANGED)
|| attr->aspath->segments == NULL)
    && (!CHECK_FLAG(peer->af_flags[afi][safi],
    PEER_FLAG_RSERVER_CLIENT))) {
aspath = aspath_dup(attr->aspath); <<<<<<<<<<<<<<<
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agopim6d: Display primary address in "show ipv6 mld interface json" cmd
Sarita Patra [Fri, 24 Feb 2023 15:11:57 +0000 (07:11 -0800)]
pim6d: Display primary address in "show ipv6 mld interface json" cmd

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agopim6d: Don't display MLD disabled or down interfaces in "show ipv6 mld interface...
Sarita Patra [Fri, 24 Feb 2023 15:01:22 +0000 (07:01 -0800)]
pim6d: Don't display MLD disabled or down interfaces in "show ipv6 mld interface" cmd

We should not display down interfaces or MLD disabled interfaces in
"show ipv6 mld interface" command.

Before fix:
==========
frr# show ipv6 mld interface
Interface         State  V  Querier                    Timer               Uptime
ens192            up     2  fe80::250:56ff:feb7:d04    query 00:00:25.432  00:00:07.038
ens224            up     1  fe80::250:56ff:feb7:a7e3   query 00:00:24.219  00:00:07.031
pim6reg            down

After fix:
=========
frr# show ipv6 mld interface
Interface         State  V  Querier                    Timer               Uptime
ens192            up     2  fe80::250:56ff:feb7:d04    query 00:00:25.432  00:00:07.038
ens224            up     1  fe80::250:56ff:feb7:a7e3   query 00:00:24.219  00:00:07.031

Issue: #11241

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agoMerge pull request #12888 from opensourcerouting/fix/peer_af_flag_check_integer
Donald Sharp [Fri, 24 Feb 2023 14:28:41 +0000 (09:28 -0500)]
Merge pull request #12888 from opensourcerouting/fix/peer_af_flag_check_integer

bgpd: Flags fixes

2 years agoMerge pull request #12841 from opensourcerouting/topofix_bgp_gr_retain_routes
Donald Sharp [Fri, 24 Feb 2023 14:24:28 +0000 (09:24 -0500)]
Merge pull request #12841 from opensourcerouting/topofix_bgp_gr_retain_routes

tests: Change bgp_gr_retained_routes to use json output of "ip route"

2 years agolib: some ASNUMs should be forbidden 12866/head
anlan_cs [Wed, 22 Feb 2023 12:57:07 +0000 (20:57 +0800)]
lib: some ASNUMs should be forbidden

In current code, some ASNUMs with redundant zero are legal,
e.g. "1.01", "01.1", "1.001", "001.1", and more.  They should
be forbidden.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agoMerge pull request #12881 from donaldsharp/bgp_rpki_take_two
Martin Winter [Fri, 24 Feb 2023 13:09:59 +0000 (05:09 -0800)]
Merge pull request #12881 from donaldsharp/bgp_rpki_take_two

2 years agopimd, pim6d: Fix join prune handling 12008/head
Sarita Patra [Fri, 24 Feb 2023 10:03:34 +0000 (02:03 -0800)]
pimd, pim6d: Fix join prune handling

When upstream RPF address is secondary address, and
neighborship is built with primary address,
then pim_neighbor_find() fails.

Verify the upstream  RPF address is present in the
neighbor primary and secondary address list.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agopimd, pim6d: Fix pim upstream rpf change
Sarita Patra [Wed, 19 Oct 2022 00:32:11 +0000 (17:32 -0700)]
pimd, pim6d: Fix pim upstream rpf change

When upstream RPF address is secondary, and
neighborship is built with primary address,
then pim_neighbor_find() fails, due to which when there
is upstream change it wont send prune.

Verify the nexthop is present in the neighbor primary
and secondary address list.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agopimd, pim6d: fix pim neighbor check in pim_nexthop_lookup
Sarita Patra [Tue, 18 Oct 2022 23:31:00 +0000 (16:31 -0700)]
pimd, pim6d: fix pim neighbor check in pim_nexthop_lookup

When there is a mismatch in nexthop address (secondary address)
and neighborship address(primary address) on the same interface,
RPF check fails.

This is fixed now.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agopimd, pim6d: Fix RP Unknown IIF
Sarita Patra [Tue, 18 Oct 2022 23:27:14 +0000 (16:27 -0700)]
pimd, pim6d: Fix RP Unknown IIF

When route to RP is having nexthop secndary address,
neighborship is built with primary address,
then pim_neighbor_find() fails, which causes RP IIF
Unknown.

Fix:
Verify pim neighborship on the RP connected interface.

Issue: #11526

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agopimd, pim6d: Fix BSM packet process
Sarita Patra [Tue, 18 Oct 2022 23:06:12 +0000 (16:06 -0700)]
pimd, pim6d: Fix BSM packet process

Problem 1:
When route to BSR is having nexthop secondary address,
neighborship is built with primary address,
then pim_neighbor_find() fails, which cause drop of BSM
packet.

Fix 1:
Verify pim neighborship on the BSM received interface.
Problem 2:

Problem 2:
Source IP BSM address is primary address, where
as nexthop also can be primary or secondary address.

Fix 2:
Avoiding the check (nhaddr == src_ip) for PIMV6

Issue: #11957

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agopimd,pim6d: Modify pim_neighbor_find() API
Sarita Patra [Mon, 23 Jan 2023 05:10:45 +0000 (21:10 -0800)]
pimd,pim6d: Modify pim_neighbor_find() API

Modify pim_neighbor_find() API to find the neighbor
in neighbor secondary list.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agozebra: Send nexthop ifindex for type NEXTHOP_TYPE_IPV6
Sarita Patra [Mon, 10 Oct 2022 18:06:10 +0000 (11:06 -0700)]
zebra: Send nexthop ifindex for type NEXTHOP_TYPE_IPV6

Once RP/BSR address is learned in PIMD, PIMD does nexthop tracking
in Zebra.
For IPV6 address, the nexthop type is either NEXTHOP_TYPE_IPV6
or NEXTHOP_TYPE_IPV6_IFINDEX.
Zebra should send nexthop ifindex information along with nexthop address
to the client (PIMD).

Issue: #11526
Issue: #11957

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agoMerge pull request #12889 from LabNConsulting/chopps/fix-nb-context-arg
Donald Sharp [Fri, 24 Feb 2023 12:37:09 +0000 (07:37 -0500)]
Merge pull request #12889 from LabNConsulting/chopps/fix-nb-context-arg

lib: fix init. use of nb_context to be by value not by reference

2 years agoMerge pull request #12751 from Pdoijode/pdoijode/ospf-vrf-neighbor-detail-1
Donatas Abraitis [Fri, 24 Feb 2023 09:56:28 +0000 (11:56 +0200)]
Merge pull request #12751 from Pdoijode/pdoijode/ospf-vrf-neighbor-detail-1

ospfd: Added missing fields and option to query specific neighbor in VRF

2 years agoMerge pull request #12885 from donaldsharp/bmp_afi_str
Donatas Abraitis [Fri, 24 Feb 2023 09:36:12 +0000 (11:36 +0200)]
Merge pull request #12885 from donaldsharp/bmp_afi_str

lib, bgpd: bmp was not specifying l2vpn afi

2 years agoMerge pull request #12884 from donaldsharp/flowspec_overflow
Christian Hopps [Fri, 24 Feb 2023 07:52:49 +0000 (02:52 -0500)]
Merge pull request #12884 from donaldsharp/flowspec_overflow

bgpd: Flowspec overflow issue

2 years agoMerge pull request #12887 from donaldsharp/remove_ospf_unused_function
Christian Hopps [Fri, 24 Feb 2023 07:49:45 +0000 (02:49 -0500)]
Merge pull request #12887 from donaldsharp/remove_ospf_unused_function

ospfd: Remove unused function