]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
23 months agozebra: Cleanup memory leaks on shutdown
Donald Sharp [Tue, 11 Oct 2022 20:26:42 +0000 (16:26 -0400)]
zebra: Cleanup memory leaks on shutdown

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agoripngd: Cleanup memory allocations on shutdown
Donald Sharp [Tue, 11 Oct 2022 20:21:44 +0000 (16:21 -0400)]
ripngd: Cleanup memory allocations on shutdown

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agoripd: Cleanup memory allocations on shutdown
Donald Sharp [Tue, 11 Oct 2022 20:21:30 +0000 (16:21 -0400)]
ripd: Cleanup memory allocations on shutdown

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agozebra: zrouter.mh_info is leaked on shutdown
Donald Sharp [Tue, 11 Oct 2022 19:22:04 +0000 (15:22 -0400)]
zebra: zrouter.mh_info is leaked on shutdown

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agolib: Free some memory in scripting subsystem at shutdown
Donald Sharp [Tue, 11 Oct 2022 17:21:03 +0000 (13:21 -0400)]
lib: Free some memory in scripting subsystem at shutdown

Pre:
staticd: showing active allocations in memory group libfrr
staticd: memstats:  Scripting                     :     16 * (variably sized)
staticd: memstats:  Hash                          :      2 * (variably sized)
staticd: memstats:  Hash Bucket                   :      8 *         32
staticd: memstats:  Hash Index                    :      1 * (variably sized)
staticd: memstats:  Link List                     :      1 *         40
staticd: memstats:  Link Node                     :      1 *         24
staticd: showing active allocations in memory group logging subsystem
staticd: memstats:  log file target               :      1 *         88
staticd: showing active allocations in memory group staticd

Post:
staticd: showing active allocations in memory group libfrr
staticd: showing active allocations in memory group logging subsystem
staticd: memstats:  log file target               :      1 *         88
staticd: showing active allocations in memory group staticd

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agostaticd: Clean up zclient on shutdown
Donald Sharp [Tue, 11 Oct 2022 16:57:57 +0000 (12:57 -0400)]
staticd: Clean up zclient on shutdown

The zclient data structure was not being cleaned up on shutdown.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agoMerge pull request #12074 from donaldsharp/lib_debugs
Donatas Abraitis [Wed, 12 Oct 2022 07:38:21 +0000 (10:38 +0300)]
Merge pull request #12074 from donaldsharp/lib_debugs

*: Create and use infrastructure to show debugs in lib

23 months agoMerge pull request #12091 from kuldeepkash/update_assert_msg
Donatas Abraitis [Wed, 12 Oct 2022 07:37:10 +0000 (10:37 +0300)]
Merge pull request #12091 from kuldeepkash/update_assert_msg

tests: [topojson]Update assert messages for better debugging

23 months agoMerge pull request #12090 from patrasar/pimv6_show_bsm_db
Donatas Abraitis [Tue, 11 Oct 2022 18:59:22 +0000 (21:59 +0300)]
Merge pull request #12090 from patrasar/pimv6_show_bsm_db

pim6d: Fix RpAddress in "show ipv6 pim bsm-database"

23 months agoMerge pull request #12087 from achernavin22/fix-no-match-rpki
Donatas Abraitis [Tue, 11 Oct 2022 14:05:19 +0000 (17:05 +0300)]
Merge pull request #12087 from achernavin22/fix-no-match-rpki

bgpd: fix "no match rpki" in route-map

23 months agoMerge pull request #12099 from cscarpitta/fix/remove-null-check-before-free
Donatas Abraitis [Tue, 11 Oct 2022 13:39:16 +0000 (16:39 +0300)]
Merge pull request #12099 from cscarpitta/fix/remove-null-check-before-free

bgpd: Don't check for `NULL` when removing SRv6 SIDs

23 months agobgpd: Don't check for NULL when removing SRv6 SIDs
Carmine Scarpitta [Tue, 11 Oct 2022 11:06:39 +0000 (13:06 +0200)]
bgpd: Don't check for NULL when removing SRv6 SIDs

When an SRv6 locator is unset, all the SRv6 SIDs allocated from the
locator are removed. Before freeing the memory allocated for an SRv6
SID, we check if the pointer to the SID is `NULL`.

However, checking for `NULL` before freeing memory is useless.

This PR aims to improve the code's readability by removing the
useless `NULL` checks.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
23 months agobgpd: fix "no match rpki" in route-map
Alexander Chernavin [Mon, 10 Oct 2022 13:17:54 +0000 (13:17 +0000)]
bgpd: fix "no match rpki" in route-map

With this fix, make "no match rpki" in a route-map actually remove the
node in the candidate configuration instead of creating it.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
23 months agoMerge pull request #12084 from ak503/bgp_show_lc
Donatas Abraitis [Tue, 11 Oct 2022 06:56:39 +0000 (09:56 +0300)]
Merge pull request #12084 from ak503/bgp_show_lc

bgpd: fix display bgp large-community exact-match

23 months agotests: Applied black formatting
Kuldeep Kashyap [Tue, 11 Oct 2022 06:47:54 +0000 (12:17 +0530)]
tests: Applied black formatting

Applied black formatting to suites,
which were missing.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
23 months agopim6d: Fix RpAddress in "show ipv6 pim bsm-database"
Sarita Patra [Tue, 11 Oct 2022 05:10:43 +0000 (22:10 -0700)]
pim6d: Fix RpAddress in "show ipv6 pim bsm-database"

RpAddress is showing wrong value in
"show ipv6 pim bsm-database" cli. This is fixed now.

Issue: #12089

Signed-off-by: Sarita Patra <saritap@vmware.com>
23 months agotests: Updated assert message for better debugging
Kuldeep Kashyap [Mon, 10 Oct 2022 23:57:50 +0000 (05:27 +0530)]
tests: Updated assert message for better debugging

Updating topojson script's assert messages,
which will help in better debugging, when
test will fail.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
23 months agoMerge pull request #9998 from pguibert6WIND/bgp_tcp_keepalive
Donatas Abraitis [Mon, 10 Oct 2022 12:46:30 +0000 (15:46 +0300)]
Merge pull request #9998 from pguibert6WIND/bgp_tcp_keepalive

Bgp tcp keepalive

23 months agobgpd: fix display bgp large-community exact-match
Your Name [Mon, 10 Oct 2022 10:51:27 +0000 (13:51 +0300)]
bgpd: fix display bgp large-community exact-match

Before patch:
frr# show bgp large-community 1:1:1 exact-match
% Large-community malformed

After patch:
frr# show bgp large-community 1:1:1 exact-match

Signed-off-by: Dmitrii Turlupov <dturlupov@factor-ts.ru>
23 months agoMerge pull request #12082 from anlancs/fix/cleanup-21
Donatas Abraitis [Mon, 10 Oct 2022 09:37:21 +0000 (12:37 +0300)]
Merge pull request #12082 from anlancs/fix/cleanup-21

bgpd: cosmetic function address

23 months agoMerge pull request #12070 from cscarpitta/fix/srv6-sid-print-using-pI6
Donatas Abraitis [Mon, 10 Oct 2022 06:36:36 +0000 (09:36 +0300)]
Merge pull request #12070 from cscarpitta/fix/srv6-sid-print-using-pI6

bgpd: Use `%pI6` to print the SRv6 VPN SIDs

23 months agoMerge pull request #11961 from maduri111/ospfd-debug-cmds
Donatas Abraitis [Sun, 9 Oct 2022 18:16:01 +0000 (21:16 +0300)]
Merge pull request #11961 from maduri111/ospfd-debug-cmds

ospfd: fix for some of ospf debug commands config lost after reboot

23 months agoMerge pull request #12073 from donaldsharp/pi_or_die
Donatas Abraitis [Sun, 9 Oct 2022 14:01:38 +0000 (17:01 +0300)]
Merge pull request #12073 from donaldsharp/pi_or_die

bgpd: Remove unnecessary check for pi and setting type and sub-type

23 months agoMerge pull request #12083 from donaldsharp/nexthop_group_issues_local
Donatas Abraitis [Sun, 9 Oct 2022 14:01:16 +0000 (17:01 +0300)]
Merge pull request #12083 from donaldsharp/nexthop_group_issues_local

tests: nhid is interfering with pattern match

23 months agotests: nhid is interfering with pattern match
Donald Sharp [Sat, 8 Oct 2022 14:35:35 +0000 (10:35 -0400)]
tests: nhid is interfering with pattern match

The bgp_gr_restart_retain_routes test is looking for specific output
that does not include the routes nexthop id:

    def _bgp_check_kernel_retained_routes():
        output = (
            r2.cmd("ip route show 172.16.255.1/32 proto bgp dev r2-eth0")
            .replace("\n", "")
            .rstrip()
        )
        expected = "172.16.255.1 via 192.168.255.1 metric 20"
        diff = topotest.get_textdiff(
            output, expected, "Actual IP Routing Table", "Expected IP RoutingTable"
        )
        if diff:
            return False
        return True

While the output includes nexthop group id's now:

root@r2:# ip route show 172.16.255.1 proto bgp dev r2-eth0
172.16.255.1 nhid 8 via 192.168.255.1 metric 20

Let's just mark r2 as not to use nexthop groups for installation
and this test issue will go away.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agobgpd: cosmetic function address
anlan_cs [Mon, 26 Sep 2022 02:18:52 +0000 (22:18 -0400)]
bgpd: cosmetic function address

No mistake, just to unify style for the parameter of function address - remove
ampersand.  In current code, only this one place of `hook_register()`s needs
to be made.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
23 months ago*: Create and use infrastructure to show debugs in lib
Donald Sharp [Fri, 7 Oct 2022 11:51:17 +0000 (07:51 -0400)]
*: Create and use infrastructure to show debugs in lib

There are lib debugs being set but never show up in
`show debug` commands because there was no way to show
that they were being used.  Add a bit of infrastructure
to allow this and then use it for `debug route-map`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agoMerge pull request #12062 from fdumontet6WIND/hash_list
Mark Stapp [Fri, 7 Oct 2022 11:30:46 +0000 (07:30 -0400)]
Merge pull request #12062 from fdumontet6WIND/hash_list

lib: hash list add function fix

23 months agobgpd: Remove unnecessary check for pi and setting type and sub-type
Donald Sharp [Fri, 7 Oct 2022 00:17:26 +0000 (20:17 -0400)]
bgpd: Remove unnecessary check for pi and setting type and sub-type

There is code that sets the pi based upon matching it against
the same peer.  In this code the type and sub-type are also
compared to the passed in type and sub-type.  Let's just use
type and sub-type as that if we have a pi we know type and sub-type
are already correct.  This should also make the first iteration
work correctly when the pi has not been created yet when we call
the martian_update function.bgpd: Remove unnecessary check for pi and setting type and sub-type

There is code that sets the pi based upon matching it against
the same peer.  In this code the type and sub-type are also
compared to the passed in type and sub-type.  Let's just use
type and sub-type as that if we have a pi we know type and sub-type
are already correct.  This should also make the first iteration
work correctly when the pi has not been created yet when we call
the martian_update function.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agobgpd: Use %pI6 to print SRv6 VPN SIDs
Carmine Scarpitta [Thu, 6 Oct 2022 17:15:50 +0000 (19:15 +0200)]
bgpd: Use %pI6 to print SRv6 VPN SIDs

Use %pI6 to print the SRv6 VPN SIDs in bgpd VTY.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
23 months agoMerge pull request #12034 from opensourcerouting/fix/gr_hard_notification
Russ White [Thu, 6 Oct 2022 14:05:11 +0000 (10:05 -0400)]
Merge pull request #12034 from opensourcerouting/fix/gr_hard_notification

bgpd: Do not send Deconfig/Shutdown message when restarting

23 months agoMerge pull request #12038 from pguibert6WIND/show_bgp_nexthop_better
Russ White [Thu, 6 Oct 2022 14:04:49 +0000 (10:04 -0400)]
Merge pull request #12038 from pguibert6WIND/show_bgp_nexthop_better

bgpd: improve 'show bgp nexthop' command

23 months agoMerge pull request #12040 from opensourcerouting/fix/bgp_local_as_remote_as
Russ White [Thu, 6 Oct 2022 14:03:26 +0000 (10:03 -0400)]
Merge pull request #12040 from opensourcerouting/fix/bgp_local_as_remote_as

bgpd: Allow using remote-as the same as local-as

23 months agotests: make hash collision test collide harder
David Lamparter [Thu, 6 Oct 2022 13:27:08 +0000 (15:27 +0200)]
tests: make hash collision test collide harder

The issue fixed in the previous commit now correctly triggers a failure:
("assertion (list_add(&head, &itm[j]) == &itm[j]) failed")

Turns out the "shitty" hash function was not shitty enough.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
23 months agolib: fix typesafe hash add with hash collision
Francois Dumontet [Tue, 4 Oct 2022 14:26:19 +0000 (16:26 +0200)]
lib: fix typesafe hash add with hash collision

The typesafe hash data structure enforces items to be unique, but their
hash values may still collide.  To this extent, when two items have the
same hash value, the compare function is called to see if it returns 0
(aka "equal").

While the _find() function handles this correctly, the _add() function
mistakenly only checked the first item with a colliding hash value for
equality, and if it was inequal proceeded to add the new item.  There
may however be additional items with the same hash value collision, one
of which could still compare as equal.  In that case, _add() would
mistakenly add the new element, failing to notice the already added
item.  Breakage ensues.

Fix by looking for an equal element among *all* existing items with the
same hash value, not just the first.

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
[DL: rewrote commit message, fixed whitespace/formatting]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
23 months agoMerge pull request #12054 from opensourcerouting/feature/show_that_route_is_not_adver...
mobash-rasool [Thu, 6 Oct 2022 09:53:21 +0000 (15:23 +0530)]
Merge pull request #12054 from opensourcerouting/feature/show_that_route_is_not_advertised

bgpd: Show why the prefix is inaccessible in show commands

23 months agoMerge pull request #11983 from maduri111/bgpd-cond-adv-debug
Donatas Abraitis [Thu, 6 Oct 2022 09:42:28 +0000 (12:42 +0300)]
Merge pull request #11983 from maduri111/bgpd-cond-adv-debug

bgpd: adding debug command for conditional advertisement

23 months agobgpd: conditional advertisement code cleanup
Madhuri Kuruganti [Thu, 6 Oct 2022 07:13:05 +0000 (12:43 +0530)]
bgpd: conditional advertisement code cleanup

Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
23 months agoMerge pull request #11838 from Pdoijode/v6-gua-nh-bgp-update
Donatas Abraitis [Thu, 6 Oct 2022 07:04:37 +0000 (10:04 +0300)]
Merge pull request #11838 from Pdoijode/v6-gua-nh-bgp-update

bgpd: BGP does not update next-hop when global V6 address is configured

23 months agobgpd: adding debug command for conditional advertisement
Madhuri Kuruganti [Wed, 21 Sep 2022 07:03:52 +0000 (12:33 +0530)]
bgpd: adding debug command for conditional advertisement

Signed-off-by: Madhuri Kuruganti <maduri111@gmail.com>
23 months agoMerge pull request #12060 from donaldsharp/tunnel_shenanigans
Jafar Al-Gharaibeh [Wed, 5 Oct 2022 22:50:48 +0000 (17:50 -0500)]
Merge pull request #12060 from donaldsharp/tunnel_shenanigans

zebra: Allow tunneldump data to work properly on non-supported kernels

23 months agoMerge pull request #12017 from patrasar/pimv6_hello
Donald Sharp [Wed, 5 Oct 2022 12:25:28 +0000 (08:25 -0400)]
Merge pull request #12017 from patrasar/pimv6_hello

pimd, pim6d: send secondary address in PIM hello packet

23 months agoMerge pull request #12063 from opensourcerouting/fix/update_package_development_versions
Donald Sharp [Wed, 5 Oct 2022 12:10:15 +0000 (08:10 -0400)]
Merge pull request #12063 from opensourcerouting/fix/update_package_development_versions

debian, redhat: Update changelog for new release (8.5)

23 months agoMerge pull request #12019 from devicenull/master
Donatas Abraitis [Wed, 5 Oct 2022 11:14:58 +0000 (14:14 +0300)]
Merge pull request #12019 from devicenull/master

Configure systemd to always restart FRR, regardless of exit code

23 months agoMerge pull request #12013 from SaiGomathiN/11895
Donatas Abraitis [Wed, 5 Oct 2022 11:09:39 +0000 (14:09 +0300)]
Merge pull request #12013 from SaiGomathiN/11895

pim6d: Adding new Debug CLI for MLD

23 months agoMerge pull request #12048 from taspelund/display_retrans_mismatch
Donatas Abraitis [Wed, 5 Oct 2022 11:08:06 +0000 (14:08 +0300)]
Merge pull request #12048 from taspelund/display_retrans_mismatch

RA logging improvements

23 months agobgpd: improve 'show bgp nexthop' command
Philippe Guibert [Wed, 28 Sep 2022 15:23:51 +0000 (17:23 +0200)]
bgpd: improve 'show bgp nexthop' command

- for a given IP nexthop, dump all NH entries, including
colored entries, or entries with an ifindex.
- when a given IP nexthop is requested, the path is displayed.
For better readibility, remove the carriage return between
'Last update' and 'Paths', because ctime() function already
performs carriage return.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
23 months agodebian, redhat: Update changelog for new release (8.5)
Donatas Abraitis [Tue, 4 Oct 2022 18:43:29 +0000 (21:43 +0300)]
debian, redhat: Update changelog for new release (8.5)

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
23 months agozebra: Allow tunneldump data to work properly on non-supported kernels
Donald Sharp [Tue, 4 Oct 2022 12:51:38 +0000 (08:51 -0400)]
zebra: Allow tunneldump data to work properly on non-supported kernels

When zebra requests tunnel data it is sending a RTM_GETTUNNEL per
interface that is a VXLAN tunnel.  If the kernel that is being
used does not support the particular request type then zebra
will get a error message per tunnel request back.  Unfortunately
netlink_parse_info *stops* reading on the first error message.
Therefor one kernels that are returning an error message
let's gather all of those errors.  This will allow things
like route reads to actually work properly

Fixes: #12056
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agobuild: FRR 8.5 development version
Donatas Abraitis [Tue, 4 Oct 2022 18:33:18 +0000 (21:33 +0300)]
build: FRR 8.5 development version

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
23 months agoMerge pull request #12058 from donaldsharp/fabricd_excessive_debugs
Donatas Abraitis [Tue, 4 Oct 2022 18:28:27 +0000 (21:28 +0300)]
Merge pull request #12058 from donaldsharp/fabricd_excessive_debugs

fabricd:  Turn off excessive logging when peering will not come up

23 months agoMerge pull request #12061 from mruprich/show-bgp-graceful-restart-typo
Donatas Abraitis [Tue, 4 Oct 2022 18:26:45 +0000 (21:26 +0300)]
Merge pull request #12061 from mruprich/show-bgp-graceful-restart-typo

bgpd: show ip bgp neighbors graceful-restart typo

23 months agozebra: ignore unspec RetransTimer in RA validation
Trey Aspelund [Fri, 30 Sep 2022 20:47:54 +0000 (20:47 +0000)]
zebra: ignore unspec RetransTimer in RA validation

Section 6.2.7 of RFC 4861 states that a router SHOULD log
inconsistencies in RA information detected on a given link:
```
    - Cur Hop Limit values (except for the unspecified value of zero
      other inconsistencies SHOULD be logged to system network
      management).

    - Values of the M or O flags.

    - Reachable Time values (except for the unspecified value of zero).

    - Retrans Timer values (except for the unspecified value of zero).

    - Values in the MTU options.

    - Preferred and Valid Lifetimes for the same prefix.  If
      AdvPreferredLifetime and/or AdvValidLifetime decrement in real
      time as specified in Section 6.2.1 then the comparison of the
      lifetimes cannot compare the content of the fields in the Router
      Advertisement, but must instead compare the time at which the
      prefix will become deprecated and invalidated, respectively.  Due
      to link propagation delays and potentially poorly synchronized
      clocks between the routers such comparison SHOULD allow some time
      skew.
```

We were not logging inconsistencies if "the unspecified value of zero"
was used for Reachable Time but were logging them for Retrans Timer.
This updates the validation check to also skip the logging of Retrans
Timer inconsistencies if either local/rx value is 0.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
23 months agozebra: show local/rx values in RA mismatch debugs
Trey Aspelund [Fri, 30 Sep 2022 19:58:31 +0000 (19:58 +0000)]
zebra: show local/rx values in RA mismatch debugs

When we process a received Router Advertisement we have some logic in
place to detect and log mismatches in a handful of flags/values.
However, these logs do not include what the actual values are, which
means it's up to the operator to grab a packet capture and compare that
against the local configuration...
So let's make life a little easier by including those in the log itself.

Before:
```
2022/09/30 20:37:16 ZEBRA: [KV2V1-7GM7G][EC 4043309149] enp1s0(2): Rx RA - our AdvCurHopLimit doesn't agree with fe80::5054:ff:feca:b085
2022/09/30 20:37:16 ZEBRA: [KS0BP-4GR8K][EC 4043309149] enp1s0(2): Rx RA - our AdvManagedFlag doesn't agree with fe80::5054:ff:feca:b085
2022/09/30 20:37:16 ZEBRA: [RE4EC-VYEJ2][EC 4043309149] enp1s0(2): Rx RA - our AdvOtherConfigFlag doesn't agree with fe80::5054:ff:feca:b085
2022/09/30 20:37:16 ZEBRA: [X6794-9MW18][EC 4043309149] enp1s0(2): Rx RA - our AdvReachableTime doesn't agree with fe80::5054:ff:feca:b085
2022/09/30 20:37:16 ZEBRA: [S1KXC-H8F4W][EC 4043309149] enp1s0(2): Rx RA - our AdvRetransTimer doesn't agree with fe80::5054:ff:feca:b085
```

After:
```
Sep 30 20:45:18 ub20-2 zebra[47487]: [GSW5Z-V7DZN][EC 4043309149] enp1s0(2): Rx RA - our AdvCurHopLimit (14) doesn't agree with fe80::5054:ff:fe9a:e2ca (64)
Sep 30 20:45:18 ub20-2 zebra[47487]: [RHHTS-F96DR][EC 4043309149] enp1s0(2): Rx RA - our AdvManagedFlag (0) doesn't agree with fe80::5054:ff:fe9a:e2ca (1)
Sep 30 20:45:18 ub20-2 zebra[47487]: [MNBY3-FTN6W][EC 4043309149] enp1s0(2): Rx RA - our AdvOtherConfigFlag (0) doesn't agree with fe80::5054:ff:fe9a:e2ca (1)
Sep 30 20:45:18 ub20-2 zebra[47487]: [GG62B-XXWR0][EC 4043309149] enp1s0(2): Rx RA - our AdvReachableTime (20) doesn't agree with fe80::5054:ff:fe9a:e2ca (777)
Sep 30 20:45:18 ub20-2 zebra[47487]: [YG220-D6B4H][EC 4043309149] enp1s0(2): Rx RA - our AdvRetransTimer (13) doesn't agree with fe80::5054:ff:fe9a:e2ca (0)
```

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
23 months agobgpd: show ip bgp neighbors graceful-restart typo
Michal Ruprich [Tue, 4 Oct 2022 13:14:48 +0000 (15:14 +0200)]
bgpd: show ip bgp neighbors graceful-restart typo

Noticed a typo in the definition of
show_ip_bgp_neighbors_graceful_restart function.

Signed-off-by: Michal Ruprich <mruprich@redhat.com>
23 months agoMerge pull request #12047 from donaldsharp/bgp_nexthop_individual
Russ White [Tue, 4 Oct 2022 11:41:58 +0000 (07:41 -0400)]
Merge pull request #12047 from donaldsharp/bgp_nexthop_individual

bgpd: Fix `show bgp nexthop A.B.C.D`

23 months agofabricd: Turn off excessive logging when peering will not come up
Donald Sharp [Tue, 4 Oct 2022 11:28:51 +0000 (07:28 -0400)]
fabricd:  Turn off excessive logging when peering will not come up

When fabricd is configured to use an interface and there will be
no peers out that interface, the log file is filling up with:

Oct 04 10:50:03 host2 fabricd[1444769]: [HHXDJ-1DA93] ISIS-Adj (1): Threeway state change Initializing to Up
Oct 04 10:50:03 host2 fabricd[1444769]: [R18GA-MS9R7] OpenFabric: Started initial synchronization with 1111.1111.1111 on enp1s0f1np1
Oct 04 10:50:06 host2 fabricd[1444769]: [HHXDJ-1DA93] ISIS-Adj (1): Threeway state change Up to Initializing
Oct 04 10:50:07 host2 fabricd[1444769]: [NT6J7-1RYRF] OpenFabric: Initial synchronization on enp1s0f1np1 timed out!
Oct 04 10:50:07 host2 fabricd[1444769]: [R18GA-MS9R7] OpenFabric: Started initial synchronization with 3333.3333.3333 on enp1s0f0np0
Oct 04 10:50:08 host2 fabricd[1444769]: [HHXDJ-1DA93] ISIS-Adj (1): Threeway state change Up to Initializing
Oct 04 10:50:11 host2 fabricd[1444769]: [NT6J7-1RYRF] OpenFabric: Initial synchronization on enp1s0f0np0 timed out!
Oct 04 10:50:11 host2 fabricd[1444769]: [HHXDJ-1DA93] ISIS-Adj (1): Threeway state change Initializing to Up
Oct 04 10:50:11 host2 fabricd[1444769]: [R18GA-MS9R7] OpenFabric: Started initial synchronization with 1111.1111.1111 on enp1s0f1np1
Oct 04 10:50:14 host2 fabricd[1444769]: [HHXDJ-1DA93] ISIS-Adj (1): Threeway state change Up to Initializing
Oct 04 10:50:15 host2 fabricd[1444769]: [NT6J7-1RYRF] OpenFabric: Initial synchronization on enp1s0f1np1 timed out!
Oct 04 10:50:16 host2 fabricd[1444769]: [R18GA-MS9R7] OpenFabric: Started initial synchronization with 1111.1111.1111 on enp1s0f1np1
Oct 04 10:50:18 host2 fabricd[1444769]: [HHXDJ-1DA93] ISIS-Adj (1): Threeway state change Initializing to Up

The `Threeway state change..` message is guarded by a debug, but the other 2 are not.
Let's guard those with debugs since the log will be filled up rather quickly
with any sort of aggressive timers.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agobgpd: Show why the prefix is inaccessible in show commands
Donatas Abraitis [Tue, 4 Oct 2022 08:32:39 +0000 (11:32 +0300)]
bgpd: Show why the prefix is inaccessible in show commands

```
donatas-pc# show ip bgp 100.100.100.0/24 longer-prefixes
BGP table version is 13, local router ID is 10.10.10.10, vrf id 0
Default local pref 100, local AS 65000
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

   Network          Next Hop            Metric LocPrf Weight Path
   100.100.100.0/24 0.0.0.0                  0         32768 i

Displayed  1 routes and 15 total paths
donatas-pc# show ip bgp 100.100.100.0/24
BGP routing table entry for 100.100.100.0/24, version 0
Paths: (1 available, no best path)
  Not advertised to any peer
  Local
    0.0.0.0 (inaccessible, import-check enabled) from 0.0.0.0 (10.10.10.10)
      Origin IGP, metric 0, weight 32768, invalid, sourced, local
      Last update: Tue Oct  4 11:31:44 2022
donatas-pc# show ip bgp 100.100.100.0/24 json
{
  "prefix":"100.100.100.0\/24",
  "version":0,
  "paths":[
    {
      "aspath":{
        "string":"Local",
        "segments":[
        ],
        "length":0
      },
      "origin":"IGP",
      "metric":0,
      "weight":32768,
      "valid":false,
      "version":0,
      "sourced":true,
      "local":true,
      "lastUpdate":{
        "epoch":1664872304,
        "string":"Tue Oct  4 11:31:44 2022\n"
      },
      "nexthops":[
        {
          "ip":"0.0.0.0",
          "hostname":"donatas-pc",
          "afi":"ipv4",
          "accessible":false,
          "importCheckEnabled":true,
          "used":true
        }
      ],
      "peer":{
        "peerId":"0.0.0.0",
        "routerId":"10.10.10.10"
      }
    }
  ]
}
donatas-pc#
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
23 months agoMerge pull request #12043 from donaldsharp/bgp_hate
Donatas Abraitis [Sat, 1 Oct 2022 17:40:15 +0000 (20:40 +0300)]
Merge pull request #12043 from donaldsharp/bgp_hate

Bgp hate

23 months agobgpd: Fix `show bgp nexthop A.B.C.D`
Donald Sharp [Fri, 30 Sep 2022 18:58:21 +0000 (14:58 -0400)]
bgpd: Fix `show bgp nexthop A.B.C.D`

The issuing of `show bgp nexthop A.B.C.D` fails even if that
nexthop exists:

eva# show bgp nexthop 192.168.119.120
specified nexthop does not have entry

Fixed:

eva# show bgp nexthop 192.168.119.120
 192.168.119.120 valid [IGP metric 0], #paths 0, peer 192.168.119.120
  if enp39s0
  Last update: Fri Sep 30 14:55:13 2022

  Paths:

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agobgpd: Ensure FRR has enough data to read 2 bytes in bgp_open_option_parse
Donald Sharp [Fri, 30 Sep 2022 12:57:43 +0000 (08:57 -0400)]
bgpd: Ensure FRR has enough data to read 2 bytes in bgp_open_option_parse

In bgp_open_option_parse the code is checking that the
stream has at least 2 bytes to read ( the opt_type and
the opt_length).  However if BGP_OPEN_EXT_OPT_PARAMS_CAPABLE(peer)
is configured then FRR is reading 3 bytes.  Which is not good
since the packet could be badly formateed.  Ensure that
FRR has the appropriate data length to read the data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agobgpd: Ensure FRR has enough data to read 2 bytes in peek_for_as4_capability
Donald Sharp [Fri, 30 Sep 2022 12:51:45 +0000 (08:51 -0400)]
bgpd: Ensure FRR has enough data to read 2 bytes in peek_for_as4_capability

In peek_for_as4_capability the code is checking that the
stream has at least 2 bytes to read ( the opt_type and the
opt_length ).  However if BGP_OPEN_EXT_OPT_PARAMS_CAPABLE(peer)
is configured then FRR is reading 3 bytes.  Which is not good
since the packet could be badly formated.  Ensure that
FRR has the appropriate data length to read the data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agopimd, pim6d: send secondary address in PIM hello packet
Sarita Patra [Fri, 23 Sep 2022 07:08:23 +0000 (00:08 -0700)]
pimd, pim6d: send secondary address in PIM hello packet

Fixed as per rfc7761 section 4.3.1.
"""
Sending Hello Messages
The Address List option advertises all the secondary addresses
associated with the source interface of the router originating the
message.  The option MUST be included in all Hello messages if there
are secondary addresses associated with the source interface and MAY
be omitted if no secondary addresses exist.
"""

Issue: #12015

Signed-off-by: Sarita Patra <saritap@vmware.com>
23 months agotests: Check if the routes in the kernel are retained for GR as well
Donatas Abraitis [Fri, 30 Sep 2022 06:46:00 +0000 (09:46 +0300)]
tests: Check if the routes in the kernel are retained for GR as well

Not only in BGP table.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
23 months agobgpd: Do not send Deconfig/Shutdown message when restarting
Donatas Abraitis [Tue, 27 Sep 2022 14:30:16 +0000 (17:30 +0300)]
bgpd: Do not send Deconfig/Shutdown message when restarting

We might disable sending unconfig/shutdown notifications when
Graceful-Restart is enabled and negotiated.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
23 months agobgpd: BGP does not update next-hop when global V6 address is configured
Pdoijode [Thu, 29 Sep 2022 22:28:38 +0000 (15:28 -0700)]
bgpd: BGP does not update next-hop when global V6 address is configured

When primary global v6 unicast address is configured on an
unnumbered interface, BGP does not re-advertise updates out
with the new global v6 address as the nexthop

Signed-off-by: Pdoijode <pdoijode@nvidia.com>
23 months agotests: Check if BGP works correctly when using local-as == remote-as
Donatas Abraitis [Thu, 29 Sep 2022 18:12:24 +0000 (21:12 +0300)]
tests: Check if BGP works correctly when using local-as == remote-as

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
23 months agobgpd: Allow using remote-as the same as local-as
Donatas Abraitis [Thu, 29 Sep 2022 16:09:13 +0000 (19:09 +0300)]
bgpd: Allow using remote-as the same as local-as

As an example, Arista EOS allows this behavior.

Configuration something like:

```
 neighbor PG peer-group
 neighbor PG remote-as 65001
 neighbor PG local-as 65001
 neighbor 192.168.10.124 peer-group PG
```

Or without peer-group.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
23 months agoMerge pull request #12035 from donaldsharp/pim6_write_non_integrated
Donatas Abraitis [Thu, 29 Sep 2022 11:47:10 +0000 (14:47 +0300)]
Merge pull request #12035 from donaldsharp/pim6_write_non_integrated

pimd: Allow v6 to do non-integrated configuration

2 years agopimd: Remove some unused defines in pimd.h
Donald Sharp [Tue, 27 Sep 2022 16:30:26 +0000 (12:30 -0400)]
pimd: Remove some unused defines in pimd.h

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopimd: Assign a vty port value for v6
Donald Sharp [Tue, 27 Sep 2022 16:29:36 +0000 (12:29 -0400)]
pimd: Assign a vty port value for v6

Let's use 2620

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #12036 from opensourcerouting/fix/show_single_allow-reserved-ranges
Donald Sharp [Wed, 28 Sep 2022 12:24:52 +0000 (08:24 -0400)]
Merge pull request #12036 from opensourcerouting/fix/show_single_allow-reserved-ranges

vtysh: Show allow-reserved-ranges once in config

2 years agoMerge pull request #12028 from mobash-rasool/igmp-querier
Donald Sharp [Tue, 27 Sep 2022 19:45:27 +0000 (15:45 -0400)]
Merge pull request #12028 from mobash-rasool/igmp-querier

pimd: IGMP Querier election is not correct in LAN scenario

2 years agovtysh: Show allow-reserved-ranges once in config
Donatas Abraitis [Tue, 27 Sep 2022 18:39:50 +0000 (21:39 +0300)]
vtysh: Show allow-reserved-ranges once in config

Before:

```
donatas-pc# sh run | include allow-reserved-ranges
allow-reserved-ranges
allow-reserved-ranges
allow-reserved-ranges
allow-reserved-ranges
allow-reserved-ranges
allow-reserved-ranges
donatas-pc#
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11990 from spk-hebbar/patch-1
Donald Sharp [Tue, 27 Sep 2022 16:40:37 +0000 (12:40 -0400)]
Merge pull request #11990 from spk-hebbar/patch-1

Update setup.rst

2 years agopimd: Allow v6 to do non-integrated configuration
Donald Sharp [Tue, 27 Sep 2022 16:24:16 +0000 (12:24 -0400)]
pimd: Allow v6 to do non-integrated configuration

Proof:
eva# conf
eva(config)# no service integrated-vtysh-config
eva(config)# end
eva# wr mem
Note: this version of vtysh never writes vtysh.conf
Building Configuration...
Configuration saved to /etc/frr/zebra.conf
Configuration saved to /etc/frr/ripd.conf
Configuration saved to /etc/frr/ripngd.conf
Configuration saved to /etc/frr/ospfd.conf
Configuration saved to /etc/frr/ospf6d.conf
Configuration saved to /etc/frr/bgpd.conf
Configuration saved to /etc/frr/isisd.conf
Configuration saved to /etc/frr/pimd.conf
Configuration saved to /etc/frr/nhrpd.conf
Configuration saved to /etc/frr/eigrpd.conf
Configuration saved to /etc/frr/babeld.conf
Configuration saved to /etc/frr/sharpd.conf
Configuration saved to /etc/frr/fabricd.conf
Configuration saved to /etc/frr/pbrd.conf
Configuration saved to /etc/frr/staticd.conf
Configuration saved to /etc/frr/bfdd.conf
Configuration saved to /etc/frr/vrrpd.conf
Configuration saved to /etc/frr/pim6d.conf
eva#

Fixes: #12011
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #12018 from pguibert6WIND/pathd_warning_noted
Donald Sharp [Tue, 27 Sep 2022 15:39:46 +0000 (11:39 -0400)]
Merge pull request #12018 from pguibert6WIND/pathd_warning_noted

pathd: change the vty output, when no ted is enabled on pathd

2 years agoMerge pull request #12029 from donaldsharp/cputime_stats
Donatas Abraitis [Tue, 27 Sep 2022 15:39:06 +0000 (18:39 +0300)]
Merge pull request #12029 from donaldsharp/cputime_stats

Cputime stats

2 years agoMerge pull request #11985 from opensourcerouting/fix/thread_off_llgr
Russ White [Tue, 27 Sep 2022 15:29:54 +0000 (11:29 -0400)]
Merge pull request #11985 from opensourcerouting/fix/thread_off_llgr

bgpd: Stop LLGR thread when deleting a peer and/or GR flags changed

2 years agoMerge pull request #12006 from opensourcerouting/fix/doc_for_rfc9072
Russ White [Tue, 27 Sep 2022 15:28:06 +0000 (11:28 -0400)]
Merge pull request #12006 from opensourcerouting/fix/doc_for_rfc9072

doc: Add `neighbor PEER extended-optional-parameters` command

2 years agoMerge pull request #12010 from opensourcerouting/fix/logging_for_route_refresh
Russ White [Tue, 27 Sep 2022 15:27:12 +0000 (11:27 -0400)]
Merge pull request #12010 from opensourcerouting/fix/logging_for_route_refresh

bgpd: Print hostname for peer as well when marking as stale for route-refresh

2 years agoMerge pull request #12016 from opensourcerouting/fix/route_map_show_json
Russ White [Tue, 27 Sep 2022 15:26:28 +0000 (11:26 -0400)]
Merge pull request #12016 from opensourcerouting/fix/route_map_show_json

lib: Fix `show route-map NAME json` command and memory leak

2 years agodoc: Update setup.rst
Spoorthi K [Tue, 27 Sep 2022 14:21:42 +0000 (19:51 +0530)]
doc: Update setup.rst

Signed-off-by: Spoorthi K <spk@redhat.com>
2 years agovtysh: Properly handle `service cputime-warning XX` in config
Donald Sharp [Tue, 27 Sep 2022 13:05:30 +0000 (09:05 -0400)]
vtysh: Properly handle `service cputime-warning XX` in config

Prevent duplicate lines from each daemon in vtysh output.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agovtysh: Properly handle `[no] service cputime-stats` in config
Donald Sharp [Tue, 27 Sep 2022 13:02:26 +0000 (09:02 -0400)]
vtysh: Properly handle `[no] service cputime-stats` in config

Prevent duplicate lines from each daemon in vtysh output.

Fixes: #12022
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopimd: IGMP Querier election is not correct in LAN scenario
Mobashshera Rasool [Tue, 27 Sep 2022 11:49:34 +0000 (04:49 -0700)]
pimd: IGMP Querier election is not correct in LAN scenario

When more than 2 routers are present in LAN and the querier
goes down, the other routers will wait for other querier
present timer to expire to elect a new querier.
This issue will be seen when the router having next lower ip
address expires the other querier present timer first and it
starts sending the query message. Now on the other non-querier
routers it will receive this query and reset its other
querier present timer but the querier is still the old one
and since it is lowest ip, it never gets updated to the newly
elected querier.

Reset the other querier timer only if query is received from
the previously elected querier or a better new querier
This will make sure that non-querier elects the new querier
whose ip address is higher than the old querier
when the old querier goes down via other querier querier
timer expiry

Issue: #12027

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agoMerge pull request #11989 from maduri111/bgpd-cond-adv-peer-unset
Donatas Abraitis [Tue, 27 Sep 2022 12:03:58 +0000 (15:03 +0300)]
Merge pull request #11989 from maduri111/bgpd-cond-adv-peer-unset

bgpd: conditional advertise-map unset on peer not re-advertising with…

2 years agoMerge pull request #11910 from fdumontet6WIND/NAI_Adj
Olivier Dugeon [Tue, 27 Sep 2022 09:24:53 +0000 (11:24 +0200)]
Merge pull request #11910 from fdumontet6WIND/NAI_Adj

 pathd: nai adjacency fix query type f for IPV6

2 years agoMerge pull request #12009 from AbhishekNR/json_last-member-query-count
Donatas Abraitis [Tue, 27 Sep 2022 06:42:11 +0000 (09:42 +0300)]
Merge pull request #12009 from AbhishekNR/json_last-member-query-count

pim6d: Adding last member query count field in "show ipv6 mld interface [ifname] json" command.

2 years agotools: Configure systemd to always restart FRR, regardless of exit code
Brian Rak [Mon, 26 Sep 2022 15:18:26 +0000 (11:18 -0400)]
tools: Configure systemd to always restart FRR, regardless of exit code

The current service file configures restarts on-abnormal, which translates to "unclean signal", "timeout", or "watchdog". This patch updates it to always restart, as there's never really a time watchfrr should exit by itself at all.

Signed-off-by: Brian Rak <brak@vultr.com>
2 years agopathd: change the vty output, when no ted is enabled on pathd
Philippe Guibert [Mon, 26 Sep 2022 15:12:02 +0000 (17:12 +0200)]
pathd: change the vty output, when no ted is enabled on pathd

Change the vty output, in case ted is not enabled.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2 years agoMerge pull request #12002 from opensourcerouting/fix/add_doc_missing_bgp_implemented_rf
Donald Sharp [Mon, 26 Sep 2022 13:07:22 +0000 (09:07 -0400)]
Merge pull request #12002 from opensourcerouting/fix/add_doc_missing_bgp_implemented_rf

doc: Update supported BGP RFC list

2 years agoMerge pull request #12000 from opensourcerouting/fix/remove_deprecated_ospf_command
Donald Sharp [Mon, 26 Sep 2022 12:44:40 +0000 (08:44 -0400)]
Merge pull request #12000 from opensourcerouting/fix/remove_deprecated_ospf_command

ospfd: Remove deprecated command `graceful-restart helper-only`

2 years agoMerge pull request #12003 from anlancs/fix/fpm-crash
Donald Sharp [Mon, 26 Sep 2022 12:43:40 +0000 (08:43 -0400)]
Merge pull request #12003 from anlancs/fix/fpm-crash

zebra: fix fpm crash

2 years agodoc: Updated the document for mld debug commands
Sai Gomathi N [Mon, 26 Sep 2022 09:51:29 +0000 (02:51 -0700)]
doc: Updated the document for mld debug commands

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agolib: Fix `show route-map NAME json` command and memory leak
Donatas Abraitis [Mon, 26 Sep 2022 11:49:54 +0000 (14:49 +0300)]
lib: Fix `show route-map NAME json` command and memory leak

JSON object was generated, but not printed, because the function returned
immediatelly, even without freeing the memory.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Print hostname for peer as well when marking as stale for route-refresh
Donatas Abraitis [Mon, 26 Sep 2022 08:07:01 +0000 (11:07 +0300)]
bgpd: Print hostname for peer as well when marking as stale for route-refresh

Before:

```
2022/09/26 10:13:35.261 BGP: [QCZ1W-VKS36] 192.168.0.1(r0) sending REFRESH_REQ for afi/safi: IPv4/unicast
2022/09/26 10:13:35.262 BGP: [VF3QY-FP1PP] 192.168.0.1: route-refresh for IPv4/unicast, marking prefix 172.16.1.1/32 as stale
2022/09/26 10:13:35.262 BGP: [VF3QY-FP1PP] 192.168.0.1: route-refresh for IPv4/unicast, marking prefix 192.168.0.0/24 as stale
2022/09/26 10:13:35.262 BGP: [SDZS7-XVC4W] 192.168.0.1(r0) rcvd route-refresh (BoRR) for IPv4/unicast, triggering timer for 360 seconds
2022/09/26 10:13:35.362 BGP: [Y6XKR-PF89P] 192.168.0.1(r0) rcvd route-refresh (EoRR) for IPv4/unicast, stopping BoRR timer
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agopim6d: Adding last member query count field in "show ipv6 mld interface [ifname]...
Abhishek N R [Mon, 26 Sep 2022 06:58:51 +0000 (23:58 -0700)]
pim6d: Adding last member query count field in "show ipv6 mld interface [ifname] json" command.

Fixes: #12004
Signed-off-by: Abhishek N R <abnr@vmware.com>
2 years agopimd,pim6d: Change the show running commands based on address family
Sai Gomathi N [Mon, 26 Sep 2022 07:09:45 +0000 (00:09 -0700)]
pimd,pim6d: Change the show running commands based on address family

Change the show running commands for igmp and mld debug commands
based on the address family.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agopim6d: Add 'debug mld trace detail'
Sai Gomathi N [Mon, 26 Sep 2022 06:46:37 +0000 (23:46 -0700)]
pim6d: Add 'debug mld trace detail'

Implementing debug mld trace detail for MLD activity.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>