]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
4 years agotools/checkpatch: downgrade string concat warning 6766/head
David Lamparter [Mon, 1 Feb 2021 16:33:03 +0000 (17:33 +0100)]
tools/checkpatch: downgrade string concat warning

This is the best I can make the asm blocks in lib/xref.h look, so just
mute the warning.  (It shouldn't come in relevant for other code.)

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agotests: add unit test for xrefs
David Lamparter [Sat, 18 Jul 2020 09:39:31 +0000 (11:39 +0200)]
tests: add unit test for xrefs

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agodoc/developer: xrefs
David Lamparter [Sat, 18 Jul 2020 09:12:52 +0000 (11:12 +0200)]
doc/developer: xrefs

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/xref: add xrefs for install_element()
David Lamparter [Tue, 21 Jul 2020 06:28:04 +0000 (08:28 +0200)]
lib/xref: add xrefs for install_element()

Combined with the DEFUN xrefs, this means we can extract the full CLI
tree from a binary file.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/xref: add xrefs for DEFUNs
David Lamparter [Tue, 28 Apr 2020 13:19:24 +0000 (15:19 +0200)]
lib/xref: add xrefs for DEFUNs

This allows grabbing a list of all DEFUNs and their help texts through
the xref extraction mechanics.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/xref: add xrefs on zlog_* calls
David Lamparter [Tue, 28 Apr 2020 07:30:59 +0000 (09:30 +0200)]
lib/xref: add xrefs on zlog_* calls

This allows extracting a list of all log messages including their ECs
and autogenerated unique IDs for them.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/xref: use to transport thread_* file/line/func
David Lamparter [Tue, 28 Apr 2020 07:30:50 +0000 (09:30 +0200)]
lib/xref: use to transport thread_* file/line/func

Just a better way of doing what was previously the "debugargdef" macro.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib/xref: put setup calls in libraries
David Lamparter [Thu, 30 Apr 2020 19:33:11 +0000 (21:33 +0200)]
lib/xref: put setup calls in libraries

Our "true" libraries (i.e. not modules) don't invoke neither
FRR_DAEMON_INFO nor FRR_MODULE_SETUP, hence XREF_SETUP isn't invoked
either.  Invoke it directly to get things working.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: "xref" identifier infrastructure
David Lamparter [Thu, 9 Aug 2018 20:50:19 +0000 (22:50 +0200)]
lib: "xref" identifier infrastructure

This adds the machinery for cross reference points (hence "xref") for
things to be annotated with source code location or other metadata
and/or to be uniquely identified and found at runtime or by dissecting
executable files.

The extraction tool to walk down an ELF file is done and working but
needs some more cleanup and will be added in a separate commit.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: move frr_weak_random to header file
David Lamparter [Fri, 1 May 2020 08:59:53 +0000 (10:59 +0200)]
lib: move frr_weak_random to header file

Makes more sense to have this as a static inline.  Also I don't want to
be forced to link network.o into clippy ;)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agoMerge pull request #7965 from opensourcerouting/netns-doc
Donald Sharp [Mon, 1 Feb 2021 14:01:25 +0000 (09:01 -0500)]
Merge pull request #7965 from opensourcerouting/netns-doc

doc: add information about network namespaces

4 years agoMerge pull request #7988 from ton31337/fix/initialize_raw_data
Donald Sharp [Mon, 1 Feb 2021 12:42:21 +0000 (07:42 -0500)]
Merge pull request #7988 from ton31337/fix/initialize_raw_data

bgpd: Initialize bgp_notify.raw_data before passing to bgp_notify_rec…

4 years agoMerge pull request #7969 from donaldsharp/more_flags
Donatas Abraitis [Mon, 1 Feb 2021 07:12:09 +0000 (09:12 +0200)]
Merge pull request #7969 from donaldsharp/more_flags

More flags

4 years agobgpd: Initialize bgp_notify.raw_data before passing to bgp_notify_receive() 7988/head
Donatas Abraitis [Sun, 31 Jan 2021 14:20:36 +0000 (16:20 +0200)]
bgpd: Initialize bgp_notify.raw_data before passing to bgp_notify_receive()

```
2523558-==2523558==
2523558-==2523558== Conditional jump or move depends on uninitialised value(s)
2523558:==2523558==    at 0x47F242: bgp_notify_admin_message (bgp_debug.c:505)
2523558-==2523558==    by 0x47F242: bgp_notify_print (bgp_debug.c:534)
2523558-==2523558==    by 0x4BA9BC: bgp_notify_receive (bgp_packet.c:1905)
2523558-==2523558==    by 0x4BA9BC: bgp_process_packet (bgp_packet.c:2602)
2523558-==2523558==    by 0x4904B7E: thread_call (thread.c:1681)
2523558-==2523558==    by 0x48CAA27: frr_run (libfrr.c:1126)
2523558-==2523558==    by 0x474B1A: main (bgp_main.c:540)
2523558-==2523558==  Uninitialised value was created by a stack allocation
2523558:==2523558==    at 0x4BA33D: bgp_process_packet (bgp_packet.c:2529)
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #7984 from donaldsharp/hidden_command
Donatas Abraitis [Sun, 31 Jan 2021 09:05:35 +0000 (11:05 +0200)]
Merge pull request #7984 from donaldsharp/hidden_command

bgpd: Remove hidden `neighbor X route-map Y <in|out>` command

4 years agoMerge pull request #7970 from volta-networks/fix_snmp_topotest_test_oid_walk
Donatas Abraitis [Sat, 30 Jan 2021 20:24:11 +0000 (22:24 +0200)]
Merge pull request #7970 from volta-networks/fix_snmp_topotest_test_oid_walk

tests: update snmp topotest api test_oid_walk

4 years agobgpd: Remove hidden `neighbor X route-map Y <in|out>` command 7984/head
Donald Sharp [Sat, 30 Jan 2021 02:27:49 +0000 (21:27 -0500)]
bgpd: Remove hidden `neighbor X route-map Y <in|out>` command

This command was put in place to allow upgrades for the
neighbor command from the BGP_NODE and have it put
into the ipv4 uni node instead.  Since this
utterly kills the yang conversion.  I believe we need
to remove this.  Since people upgrading will just loose
the route-map applicatoin( if they are using such an old
config ) and RFC 8212 will come into play.  They'll figure
it out pretty fast.

Fixes: #7983
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: Add `bgp_nexthop_dump_bnc_change_flags` function 7969/head
Donald Sharp [Thu, 28 Jan 2021 01:03:03 +0000 (20:03 -0500)]
bgpd: Add `bgp_nexthop_dump_bnc_change_flags` function

Allow us to read what the change flags are instead of having
to look them up.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: Add bgp_nexthop_dump_bnc_flags
Donald Sharp [Thu, 28 Jan 2021 00:56:13 +0000 (19:56 -0500)]
bgpd: Add bgp_nexthop_dump_bnc_flags

Add a function that allows us to see a string version of the
bnc->flags bit fields.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7953 from mjstapp/fix_more_ntoa
Rafael Zalamena [Fri, 29 Jan 2021 11:01:03 +0000 (08:01 -0300)]
Merge pull request #7953 from mjstapp/fix_more_ntoa

libs, ospfd: remove inet_ntoa

4 years agoMerge pull request #7960 from kishorekunal01/bgp_fix_allowas_in
Donatas Abraitis [Fri, 29 Jan 2021 07:17:26 +0000 (09:17 +0200)]
Merge pull request #7960 from kishorekunal01/bgp_fix_allowas_in

BGP: "no neighbor <peer-group> allowas-in" is not resetting the peer-group member allowas_in[afi][safi].

4 years agoMerge pull request #7974 from donaldsharp/more_if_zero
Donatas Abraitis [Fri, 29 Jan 2021 07:14:49 +0000 (09:14 +0200)]
Merge pull request #7974 from donaldsharp/more_if_zero

More if zero

4 years agotests: update snmp topotest api test_oid_walk 7970/head
Karen Schoener [Thu, 28 Jan 2021 16:30:34 +0000 (11:30 -0500)]
tests: update snmp topotest api test_oid_walk

Update snmp topotest api test_oid_walk to validate a subset
of rows in a mib walk.

Signed-off-by: Karen Schoener <karen@voltanet.io>
4 years agoMerge pull request #7955 from volta-networks/fix_isis_lsp_bit_topotest
Donald Sharp [Thu, 28 Jan 2021 21:58:27 +0000 (16:58 -0500)]
Merge pull request #7955 from volta-networks/fix_isis_lsp_bit_topotest

tests: temporarily remove isis-lsp-bit-topo1 topotest

4 years agoMerge pull request #7967 from ton31337/feature/show_bgp_summary_wide
Donald Sharp [Thu, 28 Jan 2021 21:00:58 +0000 (16:00 -0500)]
Merge pull request #7967 from ton31337/feature/show_bgp_summary_wide

bgpd: Add `show bgp summary wide` command

4 years agoMerge pull request #7968 from ton31337/feature/doc_ebgp_reset_session
Donald Sharp [Thu, 28 Jan 2021 20:41:39 +0000 (15:41 -0500)]
Merge pull request #7968 from ton31337/feature/doc_ebgp_reset_session

doc: ebgp-requires-policy requires manuall session clearing

4 years agoospfd: ospf_nbr_nbma_lookup_next always returns NULL 7974/head
Donald Sharp [Thu, 28 Jan 2021 19:56:11 +0000 (14:56 -0500)]
ospfd: ospf_nbr_nbma_lookup_next always returns NULL

The calling function of ospf_nbr_nbma_lookup_next calls
this function and then immediately returns when it
gets the NULL.  Just cleanup a bit more code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agopbrd: Remove #if 0 code
Donald Sharp [Thu, 28 Jan 2021 19:04:59 +0000 (14:04 -0500)]
pbrd: Remove #if 0 code

I am not even sure what the goal of this code was in any
way shape fashion or form.  But since it's pbr_nht.c
I as the original author should know... But I don't.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agolib: Remove #if 0 code
Donald Sharp [Thu, 28 Jan 2021 19:04:02 +0000 (14:04 -0500)]
lib: Remove #if 0 code

Just some more dead code that has been sitting unused for
a very long time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoeigrpd: Remove #if 0 dead code
Donald Sharp [Thu, 28 Jan 2021 19:00:45 +0000 (14:00 -0500)]
eigrpd: Remove #if 0 dead code

There is some dead code in eigrpd

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobfdd: Remove #if 0
Donald Sharp [Thu, 28 Jan 2021 18:58:34 +0000 (13:58 -0500)]
bfdd: Remove #if 0

We do have a bunch of old code that is never used.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agozebra: Remove #if 0 code
Donald Sharp [Thu, 28 Jan 2021 18:55:31 +0000 (13:55 -0500)]
zebra: Remove #if 0 code

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: Remove #if 0 code
Donald Sharp [Thu, 28 Jan 2021 18:53:03 +0000 (13:53 -0500)]
bgpd: Remove #if 0 code

Remove all dead #if 0 code from bgpd.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoisisd: Remove #if 0 code
Donald Sharp [Thu, 28 Jan 2021 18:45:44 +0000 (13:45 -0500)]
isisd: Remove #if 0 code

Looks like the #if 0 code in this place was for ESI support
on solaris.  We do not support solaris anymore.  So let's
remove with prejudice.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoripngd: Remove #if 0 code
Donald Sharp [Thu, 28 Jan 2021 18:43:46 +0000 (13:43 -0500)]
ripngd: Remove #if 0 code

Remove some more dead code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoripd: #if 0 we know what you are up to.
Donald Sharp [Thu, 28 Jan 2021 18:40:05 +0000 (13:40 -0500)]
ripd: #if 0 we know what you are up to.

rip, ripped out the #if 0 code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agopimd: Remove #if 0 code from system
Donald Sharp [Thu, 28 Jan 2021 18:37:53 +0000 (13:37 -0500)]
pimd: Remove #if 0 code from system

Old dead code.
Like a log
jamming your build system

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agotests: temporarily remove isis-lsp-bits-topo1 topotest 7955/head
lynne [Wed, 27 Jan 2021 20:34:11 +0000 (15:34 -0500)]
tests: temporarily remove isis-lsp-bits-topo1 topotest

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
4 years agoospf6d: Remove #if 0 code that has not been used in a long time
Donald Sharp [Thu, 28 Jan 2021 18:34:55 +0000 (13:34 -0500)]
ospf6d: Remove #if 0 code that has not been used in a long time

The earliest that some of this code is 2018.  There is not
much point in keeping this code around.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoospfd: Remove #if 0 code
Donald Sharp [Thu, 28 Jan 2021 18:21:12 +0000 (13:21 -0500)]
ospfd: Remove #if 0 code

The #if 0 code in ospfd, has not been compiled since at least
2012.  If we are at least 9 years old at this point with no effort
to use or save, we should just get rid of it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobgpd: Removing "neighbor <peer-group> allowas-in" 7960/head
Kishore Kunal [Thu, 28 Jan 2021 05:26:24 +0000 (05:26 +0000)]
bgpd: Removing "neighbor <peer-group> allowas-in"

Unconfig not resetting the peer-group member allowas_in[afi][safi]
This is causing remote route to be accept.

Signed-off-by: Kishore Kunal <kishorekunal01@broadcom.com>
4 years agodoc: ebgp-requires-policy requires manuall session clearing 7968/head
Donatas Abraitis [Thu, 28 Jan 2021 15:15:02 +0000 (17:15 +0200)]
doc: ebgp-requires-policy requires manuall session clearing

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #7933 from deastoe/show-route-header-sep
Donald Sharp [Thu, 28 Jan 2021 14:55:52 +0000 (09:55 -0500)]
Merge pull request #7933 from deastoe/show-route-header-sep

lib: restore blank line after show route header

4 years agobgpd: Show NoNeg instead of bad parsing `show bgp summary` if disabled 7967/head
Donatas Abraitis [Thu, 28 Jan 2021 14:12:03 +0000 (16:12 +0200)]
bgpd: Show NoNeg instead of bad parsing `show bgp summary` if disabled

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agodoc: Add `show bgp summary wide` short description
Donatas Abraitis [Thu, 28 Jan 2021 14:04:38 +0000 (16:04 +0200)]
doc: Add `show bgp summary wide` short description

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Include local AS for JSON output in `show bgp summary json` cmd
Donatas Abraitis [Thu, 28 Jan 2021 13:56:33 +0000 (15:56 +0200)]
bgpd: Include local AS for JSON output in `show bgp summary json` cmd

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Add `show bgp summary wide` command
Donatas Abraitis [Thu, 28 Jan 2021 11:00:40 +0000 (13:00 +0200)]
bgpd: Add `show bgp summary wide` command

Add LocalAS into wide output and extend Desc to 64 chars instead of 20.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agodoc: add information about network namespaces 7965/head
Rafael Zalamena [Thu, 28 Jan 2021 11:45:10 +0000 (08:45 -0300)]
doc: add information about network namespaces

Let user know that there are standardized ways to use network namespaces.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #7952 from kuldeepkash/documentation
Donatas Abraitis [Thu, 28 Jan 2021 08:34:55 +0000 (10:34 +0200)]
Merge pull request #7952 from kuldeepkash/documentation

doc: topotests-markers typo error

4 years agoMerge pull request #7433 from sudhanshukumar22/bgp-aggregate-member-issue
Donatas Abraitis [Thu, 28 Jan 2021 08:34:22 +0000 (10:34 +0200)]
Merge pull request #7433 from sudhanshukumar22/bgp-aggregate-member-issue

bgpd:'bgpd' core generated on Leaf device with system-test config

4 years ago*: Update version string
Donald Sharp [Wed, 27 Jan 2021 20:32:52 +0000 (15:32 -0500)]
*: Update version string

Update the version string to reflect work towards next release

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agolibs, ospfd: remove inet_ntoa 7953/head
Mark Stapp [Wed, 27 Jan 2021 20:00:10 +0000 (15:00 -0500)]
libs, ospfd: remove inet_ntoa

inet_ntoa not permitted - replace instances.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodoc: topotests-markers typo error 7952/head
kuldeepkash [Wed, 27 Jan 2021 19:45:31 +0000 (19:45 +0000)]
doc: topotests-markers typo error

Fixed topotests-markers typo error

Signed-off-by: kuldeepkash <kashyapk@vmware.com>
4 years agoMerge pull request #7936 from pjdruddy/l3vpn-lableled-nh-check
Donald Sharp [Wed, 27 Jan 2021 18:00:29 +0000 (13:00 -0500)]
Merge pull request #7936 from pjdruddy/l3vpn-lableled-nh-check

bgpd: make sure nh is valid for MPLS vpn routes

4 years agobgpd: make sure nh is valid for MPLS vpn routes 7936/head
Pat Ruddy [Thu, 21 Jan 2021 14:16:26 +0000 (14:16 +0000)]
bgpd: make sure nh is valid for MPLS vpn routes

If we are using a nexthop for a MPLS VPN route make sure the
nexthop is over a labeled path. This new check mirrors the one
in validate_paths (where routes are enabled when a nexthop
becomes reachable). The check is introduced to the code path
where routes are added and the nexthop is looked up.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agolib: restore blank line after show route header 7933/head
Duncan Eastoe [Tue, 26 Jan 2021 12:19:05 +0000 (12:19 +0000)]
lib: restore blank line after show route header

In 5a3cf85391b3665b5344d577e98aaa29a1927818 the trailing empty line
following the "show ip(v6) route" header was removed. Restore it for
consistency.

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
4 years agotests: more robust show route header stripping
Duncan Eastoe [Tue, 26 Jan 2021 16:59:48 +0000 (16:59 +0000)]
tests: more robust show route header stripping

In test_converge_protocols() use sed to match the "show ip(v6) route"
header and strip it, rather than using tail which requires hardcoding
the expected length of the header (which is subject to change).

Signed-off-by: Duncan Eastoe <duncan.eastoe@att.com>
4 years agoMerge pull request #7935 from donaldsharp/ospf6_use_after_free
Mark Stapp [Tue, 26 Jan 2021 21:04:24 +0000 (16:04 -0500)]
Merge pull request #7935 from donaldsharp/ospf6_use_after_free

ospf6d: Track wait_timer and disable when needed

4 years agoMerge pull request #7925 from opensourcerouting/watchfrr-netns
Donald Sharp [Tue, 26 Jan 2021 20:31:04 +0000 (15:31 -0500)]
Merge pull request #7925 from opensourcerouting/watchfrr-netns

watchfrr: fix crash on missing optional argument

4 years agoMerge pull request #7938 from mjstapp/fix_netlink_debugs
Donald Sharp [Tue, 26 Jan 2021 20:30:41 +0000 (15:30 -0500)]
Merge pull request #7938 from mjstapp/fix_netlink_debugs

zebra: debug messages go under conditionals

4 years agoMerge pull request #7368 from eololab/add-pidfile-in-frr.service
Donald Sharp [Tue, 26 Jan 2021 18:29:26 +0000 (13:29 -0500)]
Merge pull request #7368 from eololab/add-pidfile-in-frr.service

tools: add PIDFile option in frr.service

4 years agozebra: debug messages go under conditionals 7938/head
Mark Stapp [Tue, 26 Jan 2021 17:29:39 +0000 (12:29 -0500)]
zebra: debug messages go under conditionals

Move a couple of unprotected debug calls in the netlink code
under DEBUG_KERNEL.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #7635 from AnuradhaKaruppiah/ead-evi-knobs
Patrick Ruddy [Tue, 26 Jan 2021 17:14:57 +0000 (17:14 +0000)]
Merge pull request #7635 from AnuradhaKaruppiah/ead-evi-knobs

bgpd: add config knobs to disable rx and tx of ead-per-evi routes

4 years agowatchfrr: fix SA warning 7925/head
Rafael Zalamena [Tue, 26 Jan 2021 16:58:34 +0000 (13:58 -0300)]
watchfrr: fix SA warning

`valid_command` now causes static analyzer complaints since it no
longer assumes `optarg` is non-NULL. If this was the case then
`valid_command` would return `false` (or 0) because it would mean the
string is empty and doesn't contain the '%s' it expects.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #7934 from donaldsharp/valgrind_cleanups
Mark Stapp [Tue, 26 Jan 2021 15:55:35 +0000 (10:55 -0500)]
Merge pull request #7934 from donaldsharp/valgrind_cleanups

pimd: Prevent use after free

4 years agoospf6d: Track wait_timer and disable when needed 7935/head
Donald Sharp [Tue, 26 Jan 2021 13:10:49 +0000 (08:10 -0500)]
ospf6d: Track wait_timer and disable when needed

When removing ospfv3 from an interface that has been previously
put into wait state, there is a possible use after free of the
oi because the wait_timer could have been started for the interface.
This is because the wait_timer was not tracked by the interface
and we just created a thread for it without storing the thread
pointer.

Issue: #7932
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agopimd: Prevent use after free 7934/head
Donald Sharp [Tue, 26 Jan 2021 12:48:40 +0000 (07:48 -0500)]
pimd: Prevent use after free

Valgrind is reporting this:
==22220== Invalid read of size 4
==22220==    at 0x11DC2B: pim_if_delete (pim_iface.c:215)
==22220==    by 0x11DD71: pim_if_terminate (pim_iface.c:76)
==22220==    by 0x128E03: pim_instance_terminate (pim_instance.c:66)
==22220==    by 0x128E03: pim_vrf_delete (pim_instance.c:159)
==22220==    by 0x48E0010: vrf_delete (vrf.c:251)
==22220==    by 0x48E0010: vrf_delete (vrf.c:225)
==22220==    by 0x48E02FE: vrf_terminate (vrf.c:551)
==22220==    by 0x149495: pim_terminate (pimd.c:142)
==22220==    by 0x13C61B: pim_sigint (pim_signals.c:44)
==22220==    by 0x48CF862: quagga_sigevent_process (sigevent.c:103)
==22220==    by 0x48DD324: thread_fetch (thread.c:1404)
==22220==    by 0x48A926A: frr_run (libfrr.c:1122)
==22220==    by 0x11B85E: main (pim_main.c:167)
==22220==  Address 0x5912160 is 1,200 bytes inside a block of size 1,624 free'd
==22220==    at 0x48369AB: free (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==22220==    by 0x128E52: pim_instance_terminate (pim_instance.c:74)
==22220==    by 0x128E52: pim_vrf_delete (pim_instance.c:159)
==22220==    by 0x48E0010: vrf_delete (vrf.c:251)
==22220==    by 0x48E0010: vrf_delete (vrf.c:225)
==22220==    by 0x48F1353: zclient_vrf_delete (zclient.c:1896)
==22220==    by 0x48F1353: zclient_read (zclient.c:3511)
==22220==    by 0x48DD826: thread_call (thread.c:1585)
==22220==    by 0x48A925F: frr_run (libfrr.c:1123)
==22220==    by 0x11B85E: main (pim_main.c:167)
==22220==  Block was alloc'd at
==22220==    at 0x4837B65: calloc (in /usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
==22220==    by 0x48ADA4F: qcalloc (memory.c:110)
==22220==    by 0x128B9B: pim_instance_init (pim_instance.c:82)
==22220==    by 0x128B9B: pim_vrf_new (pim_instance.c:142)
==22220==    by 0x48E0C5A: vrf_get (vrf.c:217)
==22220==    by 0x48F13C9: zclient_vrf_add (zclient.c:1863)
==22220==    by 0x48F13C9: zclient_read (zclient.c:3508)
==22220==    by 0x48DD826: thread_call (thread.c:1585)
==22220==    by 0x48A925F: frr_run (libfrr.c:1123)
==22220==    by 0x11B85E: main (pim_main.c:167)

On pim vrf deletion, ensure that the vrf->info pointers are NULL as well
as the free'd pim pointer for ->vrf is NULL as well.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7676 from ton31337/fix/show_ip_bgp_summary_description_truncate
Russ White [Tue, 26 Jan 2021 12:43:45 +0000 (07:43 -0500)]
Merge pull request #7676 from ton31337/fix/show_ip_bgp_summary_description_truncate

bgpd: Strip neighbors's description to 20 chars in show bgp summary

4 years agoMerge pull request #7898 from donaldsharp/pim_igmp_crash
Russ White [Tue, 26 Jan 2021 12:39:58 +0000 (07:39 -0500)]
Merge pull request #7898 from donaldsharp/pim_igmp_crash

pimd: Prevent crash with igmp only config

4 years agoMerge pull request #7901 from donaldsharp/pim_marking
Russ White [Tue, 26 Jan 2021 12:39:02 +0000 (07:39 -0500)]
Merge pull request #7901 from donaldsharp/pim_marking

tests: Fix to use global variable for pim marking

4 years agoMerge pull request #7928 from volta-networks/fix_simple_snmp_add_checks
Russ White [Tue, 26 Jan 2021 12:34:11 +0000 (07:34 -0500)]
Merge pull request #7928 from volta-networks/fix_simple_snmp_add_checks

tests: update simple_snmp_test to check for memory leaks, router failure

4 years agoMerge pull request #7127 from opensourcerouting/ospf_ti-lfa
Russ White [Tue, 26 Jan 2021 12:32:04 +0000 (07:32 -0500)]
Merge pull request #7127 from opensourcerouting/ospf_ti-lfa

ospfd: add support for Topology Independent LFA (TI-LFA)

4 years agoMerge pull request #7843 from volta-networks/feat_isis_attach_bit
Russ White [Tue, 26 Jan 2021 12:28:20 +0000 (07:28 -0500)]
Merge pull request #7843 from volta-networks/feat_isis_attach_bit

isisd: Fix Attach-bit processing

4 years agoMerge pull request #7923 from donaldsharp/gcc10-cleanups
Mark Stapp [Mon, 25 Jan 2021 17:30:52 +0000 (12:30 -0500)]
Merge pull request #7923 from donaldsharp/gcc10-cleanups

Gcc10 cleanups

4 years agoMerge pull request #7905 from mjstapp/fix_zapi_nhg
Donald Sharp [Mon, 25 Jan 2021 15:29:04 +0000 (10:29 -0500)]
Merge pull request #7905 from mjstapp/fix_zapi_nhg

zebra, sharpd: async results for NHGs

4 years agotests: update simple_snmp_test to check for memory leaks, router failure 7928/head
Karen Schoener [Fri, 22 Jan 2021 15:51:36 +0000 (10:51 -0500)]
tests: update simple_snmp_test to check for memory leaks, router failure

Signed-off-by: Karen Schoener <karen@voltanet.io>
4 years agolib: Wrapper a function to make gcc-10 happy 7923/head
Donald Sharp [Sun, 24 Jan 2021 13:00:43 +0000 (08:00 -0500)]
lib: Wrapper a function to make gcc-10 happy

gcc-10 is complaining:

lib/frrscript.c:42:14: error: cast between incompatible function types from ‘const char * (*)(lua_State *, const char *)’ to ‘void (*)(lua_State *, const void *)’ [-Werror=cast-function-type]
   42 |   .encoder = (encoder_func)lua_pushstring,
      |              ^

Wrapper it to make it happy.  Not sure what else to do.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agolib: Prevent possible memory overwrite
Donald Sharp [Sun, 24 Jan 2021 12:52:55 +0000 (07:52 -0500)]
lib: Prevent possible memory overwrite

fname is MAXPATHLEN and scriptdir and fs->name are less then
MAXPATHLEN but the combination of those two + the `.lua` are
greater than the MAXPATHLEN.  Just give us more room to prevent
a coding boo boo.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoospf6d: use a new json_object per loop iteration
Donald Sharp [Sun, 24 Jan 2021 12:48:22 +0000 (07:48 -0500)]
ospf6d: use a new json_object per loop iteration

When redistributing multiple route types into ospfv3
the code must create a new array per route type into
the the json code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7922 from ton31337/fix/bgpd_blackhole_community_ibgp
Donald Sharp [Mon, 25 Jan 2021 12:22:39 +0000 (07:22 -0500)]
Merge pull request #7922 from ton31337/fix/bgpd_blackhole_community_ibgp

bgpd: Advertise BLACKHOLE community tagged prefixes to iBGP peers

4 years agowatchfrr: fix crash on missing optional argument
Rafael Zalamena [Mon, 25 Jan 2021 11:33:01 +0000 (08:33 -0300)]
watchfrr: fix crash on missing optional argument

Fix `netns` command line handling for missing argument (it's optional).

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agobgpd: Assert that community_str2com("no-export") always returns non-NULL 7922/head
Donatas Abraitis [Mon, 25 Jan 2021 07:51:22 +0000 (09:51 +0200)]
bgpd: Assert that community_str2com("no-export") always returns non-NULL

community_str2com("no-export"); returns ALWAYS non-NULL.

If NULL returned here, we really have a bigger problems in the call path.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agotests: Check if BLACKHOLE community prefixes are visible inside local AS
Donatas Abraitis [Sun, 24 Jan 2021 08:59:27 +0000 (10:59 +0200)]
tests: Check if BLACKHOLE community prefixes are visible inside local AS

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Set no-export community for blackhole tagged prefixes
Donatas Abraitis [Sun, 24 Jan 2021 08:54:50 +0000 (10:54 +0200)]
bgpd: Set no-export community for blackhole tagged prefixes

RFC says to prevent propagation of the prefix outside the local AS.

So, let's use NO_EXPORT.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Log prefix when community filter fails
Donatas Abraitis [Sun, 24 Jan 2021 08:48:41 +0000 (10:48 +0200)]
bgpd: Log prefix when community filter fails

This is needed when NO_ADVERTISE or NO_EXPORT is handled for outgoing
updates.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #7890 from wesleycoakley/docker-fixups
Donatas Abraitis [Sat, 23 Jan 2021 14:41:31 +0000 (16:41 +0200)]
Merge pull request #7890 from wesleycoakley/docker-fixups

docker: builder fixups

4 years agozebra: send async nhg update results 7905/head
Mark Stapp [Thu, 21 Jan 2021 15:12:05 +0000 (10:12 -0500)]
zebra: send async nhg update results

Send the results of daemons' nhg updates asynchronously,
after the update has actually completed. Capture additional
info about the source daemon in order to locate the correct
zapi session. Simplify the result types considered by the
zebra_nhg module.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agotests: Fix to use global variable for pim marking 7901/head
Donald Sharp [Thu, 21 Jan 2021 15:30:57 +0000 (10:30 -0500)]
tests: Fix to use global variable for pim marking

Use the preferred methodology of marking
for pim tests and update new pim tests with
appropriate mark

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #7911 from opensourcerouting/topotest-marker2
Donald Sharp [Fri, 22 Jan 2021 20:50:32 +0000 (15:50 -0500)]
Merge pull request #7911 from opensourcerouting/topotest-marker2

doc: fixed confusing examples in topotest marker doc

4 years agoMerge pull request #7906 from donaldsharp/sig_abrt frr-8.0-dev
Mark Stapp [Fri, 22 Jan 2021 20:33:27 +0000 (15:33 -0500)]
Merge pull request #7906 from donaldsharp/sig_abrt

lib: Allow us to catch abort and do some small cleanup

4 years agodoc: fixed confusing statements in topotest marker doc 7911/head
David Schweizer [Fri, 22 Jan 2021 14:14:18 +0000 (15:14 +0100)]
doc: fixed confusing statements in topotest marker doc

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
4 years agoMerge pull request #7899 from ton31337/fix/bgpd_blackhole_community base_7.6
Donald Sharp [Fri, 22 Jan 2021 13:36:27 +0000 (08:36 -0500)]
Merge pull request #7899 from ton31337/fix/bgpd_blackhole_community

bgpd: Massage Blackhole community

4 years agoMerge pull request #7904 from volta-networks/fix_test_oid_walk
Donald Sharp [Fri, 22 Jan 2021 13:32:39 +0000 (08:32 -0500)]
Merge pull request #7904 from volta-networks/fix_test_oid_walk

tests: update snmp test infastructure api test_oid_walk

4 years agoMerge pull request #7909 from pjdruddy/snmp-skip-test
Donald Sharp [Fri, 22 Jan 2021 13:23:56 +0000 (08:23 -0500)]
Merge pull request #7909 from pjdruddy/snmp-skip-test

test: add snmp skip test

4 years agoMerge pull request #7902 from opensourcerouting/topotest-marker
Donald Sharp [Fri, 22 Jan 2021 13:23:02 +0000 (08:23 -0500)]
Merge pull request #7902 from opensourcerouting/topotest-marker

tests: Standardized Topotest PyTest Markers

4 years agoMerge pull request #7854 from patrasar/2606829
Mark Stapp [Fri, 22 Jan 2021 13:21:27 +0000 (08:21 -0500)]
Merge pull request #7854 from patrasar/2606829

bgpd : multiple memory leak fixes in show commands

4 years agodocker: centos 7, 8 yang bump and repo fixes 7890/head
Wesley Coakley [Wed, 20 Jan 2021 05:49:37 +0000 (00:49 -0500)]
docker: centos 7, 8 yang bump and repo fixes

Bump libyang version in centos containers to 1.0.184 and (1) change
"PowerTools" repository to "powertools" to accomodate CentOS Stream
changes

(1) https://bugs.centos.org/view.php?id=17920

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
4 years agodocker: prefer alpine:latest for building
Wesley Coakley [Wed, 20 Jan 2021 03:58:31 +0000 (22:58 -0500)]
docker: prefer alpine:latest for building

Building with alpine:edge caused some weirdness with our build
scripts, switching to the stable branch seems to have aleviated this.

We can also ditch the "edge" repositories as the main and community
repositories provide all packages we need

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
4 years agotest: add snmp skip test 7909/head
Pat Ruddy [Fri, 22 Jan 2021 10:11:22 +0000 (10:11 +0000)]
test: add snmp skip test

Since SNMP is a pain to install add a check which will be used
in all SNMP tests in future to silently skip SNMP tests if SNMP
has not been installed on the base system.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agoMerge pull request #7903 from donaldsharp/bgp_8212_doc
Donatas Abraitis [Fri, 22 Jan 2021 07:24:35 +0000 (09:24 +0200)]
Merge pull request #7903 from donaldsharp/bgp_8212_doc

doc: Update bgp doc for more rfc-8212 talk