]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
3 years agoMerge pull request #8506 from ranjanyash54/route_json_change
Russ White [Tue, 4 May 2021 14:24:03 +0000 (10:24 -0400)]
Merge pull request #8506 from ranjanyash54/route_json_change

ospf6d: Change structure of "show ipv6 ospf6 route json" command

3 years agoMerge pull request #8514 from donaldsharp/connected_is_limited
Russ White [Tue, 4 May 2021 11:45:33 +0000 (07:45 -0400)]
Merge pull request #8514 from donaldsharp/connected_is_limited

zebra: Allow one connected route per network mask on a interface

3 years agoMerge pull request #8615 from dslicenc/eigrp-asn-check
Russ White [Tue, 4 May 2021 11:43:48 +0000 (07:43 -0400)]
Merge pull request #8615 from dslicenc/eigrp-asn-check

eigrpd: Test for EIGRP AS number and ensure it's the same

3 years agoMerge pull request #8614 from opensourcerouting/msdp-fixes
Donald Sharp [Tue, 4 May 2021 11:21:51 +0000 (07:21 -0400)]
Merge pull request #8614 from opensourcerouting/msdp-fixes

pimd: MSDP trivial fixes

3 years agoMerge pull request #8621 from donaldsharp/bgp_pbr_clang_sa
Igor Ryzhov [Tue, 4 May 2021 11:06:51 +0000 (14:06 +0300)]
Merge pull request #8621 from donaldsharp/bgp_pbr_clang_sa

bgpd: Prevent test against uninited data

3 years agoMerge pull request #8617 from opensourcerouting/pim-bsm-cleanup
Donald Sharp [Tue, 4 May 2021 11:05:24 +0000 (07:05 -0400)]
Merge pull request #8617 from opensourcerouting/pim-bsm-cleanup

lib, pimd: move bsm code to typesafe lists

3 years agoMerge pull request #8606 from donaldsharp/peer_cleanups
Donatas Abraitis [Tue, 4 May 2021 05:47:26 +0000 (08:47 +0300)]
Merge pull request #8606 from donaldsharp/peer_cleanups

Peer cleanups

3 years agobgpd: Prevent test against uninited data 8621/head
Donald Sharp [Tue, 4 May 2021 01:03:31 +0000 (21:03 -0400)]
bgpd: Prevent test against uninited data

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8613 from opensourcerouting/build-fix-pb-assert
Donald Sharp [Tue, 4 May 2021 00:46:58 +0000 (20:46 -0400)]
Merge pull request #8613 from opensourcerouting/build-fix-pb-assert

build: fix assert() use in .pb-c.c files

3 years agoMerge pull request #8577 from volta-networks/fix_ldp_broken_lsps
Renato Westphal [Mon, 3 May 2021 23:46:32 +0000 (20:46 -0300)]
Merge pull request #8577 from volta-networks/fix_ldp_broken_lsps

ldpd: make allowing broken-lsps to be installed configurable

3 years agoMerge pull request #8603 from Fredi-raspall/pr_tilfa_link_fallback
Igor Ryzhov [Mon, 3 May 2021 19:51:38 +0000 (22:51 +0300)]
Merge pull request #8603 from Fredi-raspall/pr_tilfa_link_fallback

Pr tilfa link fallback

3 years agotests: add scapy to topotests Docker 8617/head
David Lamparter [Mon, 3 May 2021 18:45:43 +0000 (20:45 +0200)]
tests: add scapy to topotests Docker

Not having scapy in the docker image leads to very obtuse failures in
the pim bsm tests (obtuse, as in, it just fails without any hint as to
why...)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib: kill unused list_filter_out_nodes()
David Lamparter [Mon, 3 May 2021 14:40:09 +0000 (16:40 +0200)]
lib: kill unused list_filter_out_nodes()

pimd was the only user of this function, and that has gone away now.
So just kill the function.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopimd: cleanup & convert bsm_rpinfo to TS list
David Lamparter [Mon, 3 May 2021 13:07:44 +0000 (15:07 +0200)]
pimd: cleanup & convert bsm_rpinfo to TS list

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopimd: cleanup & convert bsm_info to TS list
David Lamparter [Mon, 3 May 2021 12:29:43 +0000 (14:29 +0200)]
pimd: cleanup & convert bsm_info to TS list

Just some cleanup before I touch this code;  switching to typesafe list
macros & putting the data directly inline.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopimd: remove unused sz_timer
David Lamparter [Mon, 3 May 2021 12:00:53 +0000 (14:00 +0200)]
pimd: remove unused sz_timer

... yes we may need it later, but if and when that happens we can put it
back there.  No point carrying around unused things.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib: add *_swap_all to typesafe containers
David Lamparter [Mon, 3 May 2021 14:30:30 +0000 (16:30 +0200)]
lib: add *_swap_all to typesafe containers

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agoeigrpd: Test for EIGRP AS number and ensure it's the same 8615/head
Don Slice [Mon, 3 May 2021 11:57:29 +0000 (07:57 -0400)]
eigrpd: Test for EIGRP AS number and ensure it's the same

When receiving a packet, ensure that the AS number is the same.

Fixes: 8515
Signed-off-by: Don Slice <dslice@nvidia.com>
3 years agobuild: fix assert() use in .pb-c.c files 8613/head
David Lamparter [Mon, 3 May 2021 16:47:32 +0000 (18:47 +0200)]
build: fix assert() use in .pb-c.c files

The .pb-c.c files pick up our assert() override, but that needs config.h
to be included too, and that needs to go at the very top of the file...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agodoc: improve PIM documentation 8614/head
Rafael Zalamena [Mon, 3 May 2021 16:38:21 +0000 (13:38 -0300)]
doc: improve PIM documentation

Remove duplicates and explain MSDP better.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agopimd: show MSDP configuration
Rafael Zalamena [Mon, 3 May 2021 15:30:40 +0000 (12:30 -0300)]
pimd: show MSDP configuration

Display the MSDP peer configuration in `show running-config` so it can
be saved on configuration write.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agopimd: reduce code duplication
Rafael Zalamena [Tue, 20 Apr 2021 17:53:49 +0000 (14:53 -0300)]
pimd: reduce code duplication

Standardize a function to get the current VRF node name.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agodoc: document link-fallback ti-lfa option 8603/head
Fredi Raspall [Fri, 23 Apr 2021 17:33:34 +0000 (19:33 +0200)]
doc: document link-fallback ti-lfa option

Signed-off-by: Fredi Raspall <fredi@voltanet.io>
3 years agoisisd: link protection optional fallback in ti-lfa
Fredi Raspall [Fri, 23 Apr 2021 16:33:43 +0000 (18:33 +0200)]
isisd: link protection optional fallback in ti-lfa

The current implementation of TI-LFA computes link-protecting
repair paths (even when node protection is enabled) to have repair
paths to all destinations when no node-protecting repair has been
found. This may be desired or not. E.g. the link-protecting paths
may use the protected node and be, therefore, useless if the node
fails. Also, computing link-protecting repairs incurs extra
calculations.

With this patch, when node protection is enabled, link protecting
repair paths are only computed if "link-fallback" is specified in
the configuration, on a per interface and IS-IS level.

Signed-off-by: Fredi Raspall <fredi@voltanet.io>
3 years agoMerge pull request #8545 from opensourcerouting/assert-our-own
Mark Stapp [Mon, 3 May 2021 15:17:36 +0000 (11:17 -0400)]
Merge pull request #8545 from opensourcerouting/assert-our-own

*: make our own assert() actually work

3 years agoMerge pull request #8605 from donaldsharp/libyang_version
Igor Ryzhov [Mon, 3 May 2021 13:55:11 +0000 (16:55 +0300)]
Merge pull request #8605 from donaldsharp/libyang_version

build: Limit libyang version to under 2.0

3 years agoMerge pull request #8571 from donaldsharp/ifp_speed
Mark Stapp [Mon, 3 May 2021 13:39:41 +0000 (09:39 -0400)]
Merge pull request #8571 from donaldsharp/ifp_speed

zebra: Allow interface up events to read speed

3 years agozebra: Allow one connected route per network mask on a interface 8514/head
Donald Sharp [Mon, 19 Apr 2021 23:23:45 +0000 (19:23 -0400)]
zebra: Allow one connected route per network mask on a interface

Currently FRR reads the kernel for interface state and FRR
creates a connected route per address on an interface.  If
you are in a situation where you have multiple addresses
on an interface just create 1 connected route for them:

sharpd@eva:/tmp/topotests$ vtysh -c "show int dummy302"
Interface dummy302 is up, line protocol is up
  Link ups:       0    last: (never)
  Link downs:     0    last: (never)
  vrf: default
  index 3279 metric 0 mtu 1500 speed 0
  flags: <UP,BROADCAST,RUNNING,NOARP>
  Type: Ethernet
  HWaddr: aa:4a:ed:95:9f:18
  inet 10.4.1.1/24
  inet 10.4.1.2/24 secondary
  inet 10.4.1.3/24 secondary
  inet 10.4.1.4/24 secondary
  inet 10.4.1.5/24 secondary
  inet6 fe80::a84a:edff:fe95:9f18/64
  Interface Type Other
  Interface Slave Type None
  protodown: off

sharpd@eva:/tmp/topotests$ vtysh -c "show ip route connected"
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

C>* 10.4.1.0/24 is directly connected, dummy302, 00:10:03
C>* 192.168.161.0/24 is directly connected, enp39s0, 00:10:03

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoldpd: make allowing broken-lsps to be installed with pop operation configurable 8577/head
lynne [Tue, 27 Apr 2021 16:21:54 +0000 (12:21 -0400)]
ldpd: make allowing broken-lsps to be installed with pop operation configurable

If LDP is miss configured in a setup and the router has LSPs with no remote
label, this code installs the LSP with a pop instruction of the top-level
label so the packet can be forwarded using IP.   This is a best-effort
attempt to deliver labeled IP packets to their final destination instead of
dropping them.    If this config is turned off the code will only install
LSPs that have a valid remote label.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
3 years agoMerge pull request #8566 from rubensfig/isis_metricstyle
David Lamparter [Mon, 3 May 2021 11:30:35 +0000 (13:30 +0200)]
Merge pull request #8566 from rubensfig/isis_metricstyle

doc: isis: document default value for metric-style

3 years agoMerge pull request #8599 from Jafaral/old-doc
David Lamparter [Mon, 3 May 2021 08:45:38 +0000 (10:45 +0200)]
Merge pull request #8599 from Jafaral/old-doc

doc: remove obsolete Netlink discussion, fix svi cmd doc

3 years agoMerge pull request #8479 from mjstapp/zlog_immediate
David Lamparter [Mon, 3 May 2021 08:40:54 +0000 (10:40 +0200)]
Merge pull request #8479 from mjstapp/zlog_immediate

3 years agoMerge pull request #8607 from donaldsharp/better_reasoning
David Lamparter [Mon, 3 May 2021 08:07:43 +0000 (10:07 +0200)]
Merge pull request #8607 from donaldsharp/better_reasoning

lib: Provide some better error handling for operator

3 years agolib: fix random C++ compat problem w/ printfrr 8545/head
David Lamparter [Tue, 16 Mar 2021 10:03:50 +0000 (11:03 +0100)]
lib: fix random C++ compat problem w/ printfrr

These hoops to get warnings for mis-printing `uint64_t` are apparently
breaking some C++ bits...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agotests: fix assert.h header change fallout
David Lamparter [Fri, 23 Apr 2021 10:16:47 +0000 (12:16 +0200)]
tests: fix assert.h header change fallout

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib: rework how we "override" assert()
David Lamparter [Tue, 16 Mar 2021 10:03:44 +0000 (11:03 +0100)]
lib: rework how we "override" assert()

The previous method, using zassert.h and hoping nothing includes
assert.h (which, on glibc at least, just does "#undef assert" and puts
its own definition in...) was fragile - and actually broke undetected.

Just provide our own assert.h and control overriding by putting it in a
separate directory to add to the include path (or not.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib: Provide some better error handling for operator 8607/head
Donald Sharp [Sun, 2 May 2021 11:39:36 +0000 (07:39 -0400)]
lib: Provide some better error handling for operator

When an operator encounters a situation where the number
of FD's open is greater than what we have been configured
to legitimately handle via uname or the `--limit-fds` command
line, abort with a message that they should be able to
debug and figure out what is going on.

Fixes: #8596
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Delay setting peer data until after decision to allow open 8606/head
Donald Sharp [Fri, 30 Apr 2021 23:24:40 +0000 (19:24 -0400)]
bgpd: Delay setting peer data until after decision to allow open

Delay setting local data about a remote peer until after BGP
has decided to allow an open connection to proceed.

Modifying local peer data structures based upon what is
received from a peer should not be done until after BGP
has decided that the open is allowed to proceed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Cleanup bgp_collision_detect indentation
Donald Sharp [Fri, 30 Apr 2021 23:08:27 +0000 (19:08 -0400)]
bgpd: Cleanup bgp_collision_detect indentation

The bgp_collision_detect function is heavily indented.
Perform some cleanup to make it easier to read.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: listener thread pointer is already NULL
Donald Sharp [Fri, 30 Apr 2021 18:10:31 +0000 (14:10 -0400)]
bgpd: listener thread pointer is already NULL

FRR in thread.c clears the passed in double pointer when
we pull it off the ready queue and pass it back to
the calling function via thread_fetch().

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Allow interface up events to read speed 8571/head
Donald Sharp [Tue, 27 Apr 2021 11:15:26 +0000 (07:15 -0400)]
zebra: Allow interface up events to read speed

Initially the reading of the speed of an interface happened
upon interface creation and happened until the speed of a link
settled down to a single value.  The speed of an interface
can also change as that a new optic can be inserted that
changes the speed, in which case FRR would see a interface
down (optic removal) and then a interface up (optic insertion).

In this case FRR would not treat this as an event that changed
the speed.  Let's expand the checking a bit more.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8601 from Fredi-raspall/pr_fix_lfa_debug
Renato Westphal [Sun, 2 May 2021 00:28:07 +0000 (21:28 -0300)]
Merge pull request #8601 from Fredi-raspall/pr_fix_lfa_debug

isisd: fix show LFA debug in show debugging cmd

3 years agoMerge pull request #8602 from Fredi-raspall/pr_fix_lfa_mem_leak
Renato Westphal [Sun, 2 May 2021 00:27:40 +0000 (21:27 -0300)]
Merge pull request #8602 from Fredi-raspall/pr_fix_lfa_mem_leak

isisd: fix memory leak for non-freed spftrees

3 years agobuild: Limit libyang version to under 2.0 8605/head
Donald Sharp [Sat, 1 May 2021 22:38:26 +0000 (18:38 -0400)]
build: Limit libyang version to under 2.0

Ensure that master is not built with libyang version 2 or greater
since we'll fail.

Fixes: #8524
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoisisd: fix show LFA debug in show debugging cmd 8601/head
Fredi Raspall [Wed, 28 Apr 2021 09:16:51 +0000 (11:16 +0200)]
isisd: fix show LFA debug in show debugging cmd

When enabling 'debug isis lfa', the option was correctly enabled
but not displayed by 'show debugging' command.

Signed-off-by: Fredi Raspall <fredi@voltanet.io>
3 years agoisisd: fix memory leak for non-freed spftrees 8602/head
Fredi Raspall [Fri, 23 Apr 2021 22:01:41 +0000 (00:01 +0200)]
isisd: fix memory leak for non-freed spftrees

When enabling TI-LFA the forward SPF for neighbors adjacent to the
PLR is computed. Later, when computing the PQ spaces, the reverse
SPF trees for those adjacent neighbors affected by the protected
interface are computed.

When node protection is enabled, TI-LFA link protection is run
immediately afterwards to compute repairs in case no
node-protecting backup path exists. In this second run, the
existing code tries to compute the reverse SPF tree for the same
node, without freeing the SPF tree of the prior run.

This patch fixes this by not computing the reverse SPF again, thus
avoiding a memory leak and an unnecessary SPF run.

Signed-off-by: Fredi Raspall <fredi@voltanet.io>
4 years agodoc: remove obsolete Netlink discussion, fix svi cmd doc 8599/head
Jafar Al-Gharaibeh [Fri, 30 Apr 2021 23:08:34 +0000 (18:08 -0500)]
doc: remove obsolete Netlink discussion, fix svi cmd doc

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
4 years agoMerge pull request #8576 from pguibert6WIND/macvlan_crash
Quentin Young [Fri, 30 Apr 2021 15:34:32 +0000 (15:34 +0000)]
Merge pull request #8576 from pguibert6WIND/macvlan_crash

4 years agoMerge pull request #8588 from idryzhov/a-lot-of-isis-fixes
Rafael Zalamena [Fri, 30 Apr 2021 10:58:19 +0000 (07:58 -0300)]
Merge pull request #8588 from idryzhov/a-lot-of-isis-fixes

a lot of isis fixes

4 years agoMerge pull request #8585 from stipmonster/asan-fixes-ospf-te
Olivier Dugeon [Fri, 30 Apr 2021 09:34:32 +0000 (11:34 +0200)]
Merge pull request #8585 from stipmonster/asan-fixes-ospf-te

ospfd: Fixed some ASAN errors

4 years agoMerge pull request #8569 from Jafaral/doc-svi
Donatas Abraitis [Fri, 30 Apr 2021 08:20:41 +0000 (11:20 +0300)]
Merge pull request #8569 from Jafaral/doc-svi

doc: add evpn discussion of svi and arp cache

4 years agozebra: at startup, fix links on all namespaces 8576/head
Philippe Guibert [Thu, 29 Apr 2021 10:02:47 +0000 (12:02 +0200)]
zebra: at startup, fix links on all namespaces

when zebra has vrf backend mapped to namespaces, the polling
of interfaces leads to fix all linkages of interfaces. This
was not done on non default namespace. do it for other namespaces.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: add the link interface information on interface updates
Philippe Guibert [Thu, 29 Apr 2021 09:58:15 +0000 (11:58 +0200)]
zebra: add the link interface information on interface updates

There are cases where either link information is not present at
interface creation or link information changed. handle this
situation.

Signed-off-by: Philippe.Guibert <philippe.guibert@6wind.com>
zebra dd link

4 years agoMerge pull request #8570 from qlyoung/revert-ringbuf-readv
Rafael Zalamena [Thu, 29 Apr 2021 21:32:52 +0000 (18:32 -0300)]
Merge pull request #8570 from qlyoung/revert-ringbuf-readv

Revert "bgpd: improve socket read performance"

4 years agoMerge pull request #7789 from rgirada/fix_DR
Olivier Dugeon [Thu, 29 Apr 2021 18:01:06 +0000 (20:01 +0200)]
Merge pull request #7789 from rgirada/fix_DR

ospfd: show ip ospf interface displays only BDR info, Added DR info.

4 years agodoc: add evpn discussion of svi and arp cache 8569/head
Jafar Al-Gharaibeh [Mon, 26 Apr 2021 20:02:29 +0000 (15:02 -0500)]
doc: add evpn discussion of svi and arp cache

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
4 years agoMerge pull request #7165 from qlyoung/fix-zapi-codec-badness
Rafael Zalamena [Thu, 29 Apr 2021 16:50:16 +0000 (13:50 -0300)]
Merge pull request #7165 from qlyoung/fix-zapi-codec-badness

Fix zapi codec badness

4 years agoMerge pull request #8409 from rgirada/ospf-memleak
Donald Sharp [Thu, 29 Apr 2021 16:50:03 +0000 (12:50 -0400)]
Merge pull request #8409 from rgirada/ospf-memleak

ospfd: Fixing few valgrind issues

4 years agoMerge pull request #8591 from mjstapp/fix_sharp_redist_lsp
Igor Ryzhov [Thu, 29 Apr 2021 16:48:03 +0000 (19:48 +0300)]
Merge pull request #8591 from mjstapp/fix_sharp_redist_lsp

sharpd: use correct list of redist protocols in remove lsp

4 years agoMerge pull request #8592 from donaldsharp/debug_cleanup
Mark Stapp [Thu, 29 Apr 2021 16:42:56 +0000 (12:42 -0400)]
Merge pull request #8592 from donaldsharp/debug_cleanup

zebra: msgdump debug strangeness cleanup

4 years agobgpd: avoid allocating very large stack buffer 8570/head
Quentin Young [Mon, 26 Apr 2021 22:59:48 +0000 (18:59 -0400)]
bgpd: avoid allocating very large stack buffer

As pointed out on code review of BGP extended messages, increasing the
maximum BGP message size has the consequence of growing the dynamically
sized stack buffer up to 650K. While unlikely to exceed modern stack
sizes it is still unreasonably large. Remedy this with a heap buffer.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoRevert "lib: add ringbuf socket read function"
Quentin Young [Mon, 26 Apr 2021 22:42:19 +0000 (18:42 -0400)]
Revert "lib: add ringbuf socket read function"

This reverts commit d9d7af1a52d77ed0074ebb72f87678308296e74e.

4 years agoRevert "bgpd: improve socket read performance"
Quentin Young [Mon, 26 Apr 2021 22:42:12 +0000 (18:42 -0400)]
Revert "bgpd: improve socket read performance"

This reverts commit 97a16e648115919aab3784a6511807e35c20ee20.

4 years agoMerge pull request #8110 from rgirada/rmap_nb
Igor Ryzhov [Thu, 29 Apr 2021 14:29:55 +0000 (17:29 +0300)]
Merge pull request #8110 from rgirada/rmap_nb

lib: Routemap is not getting applied upon changing the routemap action

4 years agolib: Routemap is not getting applied upon changing the routemap action 8110/head
rgirada [Fri, 19 Feb 2021 04:15:40 +0000 (20:15 -0800)]
lib: Routemap is not getting applied upon changing the routemap action

Description:
This looks broken after NB changes in routemap. When routemap
action modified from permit to deny, it is expected to apply
the new action on the filtered routes before the action in the
routemap data structure has been changed. But currently this is
not handled by the corresponding northbound API.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
4 years agoMerge pull request #8559 from idryzhov/fix-printfrr-test-build
Mark Stapp [Thu, 29 Apr 2021 14:12:44 +0000 (10:12 -0400)]
Merge pull request #8559 from idryzhov/fix-printfrr-test-build

tests: fix build warning

4 years agoisisd: move ldp-sync checks from cli to nb callbacks 8588/head
Igor Ryzhov [Mon, 26 Apr 2021 19:01:43 +0000 (22:01 +0300)]
isisd: move ldp-sync checks from cli to nb callbacks

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoisisd: don't use operational data in "no isis circuit-type"
Igor Ryzhov [Mon, 26 Apr 2021 18:34:39 +0000 (21:34 +0300)]
isisd: don't use operational data in "no isis circuit-type"

Use the config data instead.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoisisd, yang: remove vrf leaf from isis interface node
Igor Ryzhov [Mon, 26 Apr 2021 18:13:08 +0000 (21:13 +0300)]
isisd, yang: remove vrf leaf from isis interface node

This is very confusing and incorrect. We can and should use vrf leaf of
the interface itself instead.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoisisd: don't use operational data in "ip/ipv6 router isis"
Igor Ryzhov [Mon, 26 Apr 2021 15:30:53 +0000 (18:30 +0300)]
isisd: don't use operational data in "ip/ipv6 router isis"

Currently the operational data is used for two things:
- to inherit the is-type from the isis instance
- to set passive flag for loopback interfaces

This commit implements the first one using only the config data.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoisisd: don't create instances directly from cli
Igor Ryzhov [Mon, 26 Apr 2021 15:09:19 +0000 (18:09 +0300)]
isisd: don't create instances directly from cli

This must be done only through NB code. The necessary change is enqueued
right on the next two lines.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoisisd: don't use operational data in "no router isis"
Igor Ryzhov [Mon, 26 Apr 2021 14:47:19 +0000 (17:47 +0300)]
isisd: don't use operational data in "no router isis"

We need to delete isis config from interfaces when we delete the isis
router instance. This should be done using only config data.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoisisd: remove useless checks from cli
Igor Ryzhov [Mon, 26 Apr 2021 13:48:11 +0000 (16:48 +0300)]
isisd: remove useless checks from cli

is-type defaults to level-1-2 for more than a year already.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoisisd: fix ldp-sync configuration
Igor Ryzhov [Wed, 28 Apr 2021 22:59:56 +0000 (01:59 +0300)]
isisd: fix ldp-sync configuration

YANG model and CLI commands allow user to configure LDP-sync per area.
But the actual implementation is incorrect - all commands are changing
the config for the whole VRF instead of a single area. This commit fixes
this issue by actually implementing per area configuration.

Fixes #8578.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoisisd: allow arbitrary order of area/interface configuration
Igor Ryzhov [Tue, 27 Apr 2021 22:57:21 +0000 (01:57 +0300)]
isisd: allow arbitrary order of area/interface configuration

Currently we don't allow to configure the interface before the area is
configured. This approach has the following issues:

1. The area config can be deleted even when we have an interface config
   relying on it. The code is not ready for that - we'll have a whole
   bunch of stale pointers if user does that.
2. The code doesn't correctly process the event of changing the VRF for
   an interface. There is no mechanism to ensure that the area exists
   in the new VRF so currently the circuit still stays in the old VRF.

This commit allows an arbitrary order of area/interface configuration.
There is no more need to configure the area before configuring the
interface.

This change fixes both the issues.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoisisd: update link params after circuit is up
Igor Ryzhov [Tue, 27 Apr 2021 12:06:37 +0000 (15:06 +0300)]
isisd: update link params after circuit is up

Call from isis_circuit_create works only if we enable isis on an already
existing interface. If we configure isis on a pseudo interface and then
actually create it - this call doesn't work.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoisisd: fix incorrect snmp-id gen/free
Igor Ryzhov [Tue, 27 Apr 2021 14:28:44 +0000 (17:28 +0300)]
isisd: fix incorrect snmp-id gen/free

Necessary structures for snmp-id generation are currently stored in
`struct isis`. When we generate the new circuit ID, we always use the
instance from the default VRF. When we free the circuit ID, we use the
instance from the circuit VRF. This causes the following problems:

1. If there is no instance in the default VRF, this code doesn't work.
2. When circuit in non-default VRF is deleted, the ID is not actually
   freed.

This is fixed by using global structures instead. The code itself is
moved to isis_snmp.c and linked to the main code using hooks. We should
not call SNMP-related code when the SNMP module is not loaded at all.

More than that, we don't allow to activate the circuit if we failed to
generate the SNMP ID. Even if SNMP support is completely disabled! This
check is removed.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agozebra: msgdump debug strangeness cleanup 8592/head
Donald Sharp [Thu, 29 Apr 2021 12:16:22 +0000 (08:16 -0400)]
zebra: msgdump debug strangeness cleanup

a) `debug zebra kernel` turns off `debug zebra kernel msgdump....`
this is odd and bad

b) `debug zebra kernel msgdump send` turns off receive and vice versa
this is counter intuitive as well

c) `no zebra kernel msgdump ...` turns off all kernel level debugging
we should only turn off msgdump specific debugs

d) `no debug zebra kernel` turns off all kernel level debugging
we should leave msgdump on.

e) Fix `show run` and show debug output

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agosharpd: use correct list of redist protocols in remove lsp 8591/head
Mark Stapp [Thu, 29 Apr 2021 12:15:08 +0000 (08:15 -0400)]
sharpd: use correct list of redist protocols in remove lsp

The remove lsp command was using the wrong list of route
protocols - use the ZEBRA list, same as the other clis.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoospfd: show ip ospf interface only shows BDR info, Added DR info. 7789/head
rgirada [Wed, 23 Dec 2020 09:13:17 +0000 (01:13 -0800)]
ospfd: show ip ospf interface only shows BDR info, Added DR info.

Description:
DR information is missing under "show ip ospf interface [json]".
Added DR infomation to display in "show ip ospf interface".

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
4 years agoospf6d: Change structure of "show ipv6 ospf6 route json" command 8506/head
Yash Ranjan [Mon, 19 Apr 2021 06:40:51 +0000 (23:40 -0700)]
ospf6d: Change structure of "show ipv6 ospf6 route json" command

The output of "show ipv6 ospf6 route json" was not in the same
format as "show ip ospf route json". Currently ipv6 and ipv4 route
tables as well as ospfv2 have prefix as the key, but the same
is not true for ospfv3.

The structure of the json objects needs to be changed.

Currently the structure present is
frr(config-ospf6)# do show ipv6 ospf6 route json
{
  "routes":[
    {
      "destination":"66:ff::\/64",
      "isBestRoute":true,
      "destinationType":"N",
      "pathType":"IA",
      "duration":"00:00:06",
      "nextHops":[
        {
          "nextHop":"::",
          "interfaceName":"ens256"
        }
      ]
    }
  ]
}
It is changed to:
frr(config-ospf6)# do show ipv6 ospf6 route json
{
  "routes":{
    "12::2\/128":{
      "isBestRoute":true,
      "destinationType":"N",
      "pathType":"IA",
      "duration":"00:01:22",
      "nextHops":[
        {
          "nextHop":"::",
          "interfaceName":"ens192"
        }
      ]
    }
}

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
4 years agotests: fix build warning 8559/head
Igor Ryzhov [Mon, 26 Apr 2021 08:23:47 +0000 (11:23 +0300)]
tests: fix build warning

FMT_NSTD_BEGIN should be before the first use of "expr".

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #8586 from volta-networks/fix_openbsd_doc
Quentin Young [Wed, 28 Apr 2021 23:33:58 +0000 (23:33 +0000)]
Merge pull request #8586 from volta-networks/fix_openbsd_doc

4 years agoMerge pull request #8546 from ton31337/fix/add_markers_for_recent_bgpd
Quentin Young [Wed, 28 Apr 2021 19:51:28 +0000 (19:51 +0000)]
Merge pull request #8546 from ton31337/fix/add_markers_for_recent_bgpd

4 years agodoc: clang in openbsd is the default and update compiler. 8586/head
Javier Garcia [Wed, 28 Apr 2021 15:30:39 +0000 (17:30 +0200)]
doc: clang in openbsd is the default and update compiler.

Also
 - update info about new packages needed as libcares.
 - create proper links to libyang so ld can find the lib.

Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
4 years agozebra: use safe stream decodes for evpn zapi msg 7165/head
Quentin Young [Wed, 23 Sep 2020 19:40:28 +0000 (15:40 -0400)]
zebra: use safe stream decodes for evpn zapi msg

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agopimd, zebra: explicit cast int netlink val to uint
Quentin Young [Wed, 23 Sep 2020 19:37:48 +0000 (15:37 -0400)]
pimd, zebra: explicit cast int netlink val to uint

encoding signed int as unsigned is bad practice; since we want to do
it here lets at least be explicit about it

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agolib, bgpd, zebra: RA interval is unsigned
Quentin Young [Wed, 23 Sep 2020 19:35:51 +0000 (15:35 -0400)]
lib, bgpd, zebra: RA interval is unsigned

Use unsigned value for all RA requests to Zebra

- encoding signed int as unsigned is bad practice
- RA interval is never, and should never be, negative

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agobgpd, zebra: encode ip addr len as uint16
Quentin Young [Wed, 23 Sep 2020 19:31:52 +0000 (15:31 -0400)]
bgpd, zebra: encode ip addr len as uint16

This is always a 16 bit unsigned value.

- signed int is the wrong type to use
- encoding a signed int as a uint32 is bad practice
- decoding a signed int encoded as a uint32 into a uint16 is bad
  practice

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoMerge pull request #8322 from qlyoung/topotests
Jafar Al-Gharaibeh [Wed, 28 Apr 2021 15:40:25 +0000 (10:40 -0500)]
Merge pull request #8322 from qlyoung/topotests

Assorted topotests cleanup

4 years agoospfd: Fixed some ASAN errors 8585/head
Erik Kooistra [Wed, 28 Apr 2021 13:28:28 +0000 (15:28 +0200)]
ospfd: Fixed some ASAN errors

This fixes 2 asan errors:
If we only have a TLV_ROUTER_ADDR don't continue after we skipped it.
Fixed length when parsing EXT_TLV_LINK_SIZE.

Signed-off-by: Erik Kooistra <me@erikkooistra.nl>
4 years agoMerge pull request #8583 from idryzhov/fix-topotest
Rafael Zalamena [Wed, 28 Apr 2021 10:16:43 +0000 (07:16 -0300)]
Merge pull request #8583 from idryzhov/fix-topotest

tests: fix topotest polling log

4 years agoMerge pull request #8471 from idryzhov/cleanup-num-named-lists
Donatas Abraitis [Wed, 28 Apr 2021 05:33:24 +0000 (08:33 +0300)]
Merge pull request #8471 from idryzhov/cleanup-num-named-lists

*: cleanup number-named access-lists and prefix-lists

4 years agotests: fix topotest polling log 8583/head
Igor Ryzhov [Tue, 27 Apr 2021 23:52:58 +0000 (02:52 +0300)]
tests: fix topotest polling log

The current log prints maximum wait time which is not actually correct,
because it doesn't include the command execution time. We usually have
"failed after X seconds" log with X being far longer than this maximum.

Let's print the maximum number of tries instead.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #8531 from mjstapp/fix_backups_misc
Russ White [Tue, 27 Apr 2021 20:04:24 +0000 (16:04 -0400)]
Merge pull request #8531 from mjstapp/fix_backups_misc

zebra: Misc fixups for backup nexthops

4 years agoMerge pull request #8527 from opensourcerouting/fixes-20210421
Russ White [Tue, 27 Apr 2021 19:14:12 +0000 (15:14 -0400)]
Merge pull request #8527 from opensourcerouting/fixes-20210421

lib: fix zlog assert() & CLI node_exit

4 years agoMerge pull request #8487 from pguibert6WIND/ospf6_vrfs
Russ White [Tue, 27 Apr 2021 19:06:11 +0000 (15:06 -0400)]
Merge pull request #8487 from pguibert6WIND/ospf6_vrfs

ospf6d: add 'show ipv6 ospf6 vrfs' command

4 years agoMerge pull request #8572 from opensourcerouting/pthread-autoconf
Mark Stapp [Tue, 27 Apr 2021 17:50:18 +0000 (13:50 -0400)]
Merge pull request #8572 from opensourcerouting/pthread-autoconf

build: fix pthread CFLAGS for function checks

4 years agoMerge pull request #8488 from mjstapp/more_workqueue
Stephen Worley [Tue, 27 Apr 2021 15:59:33 +0000 (11:59 -0400)]
Merge pull request #8488 from mjstapp/more_workqueue

lib, zebra: use zebra workqueue for NHG updates

4 years agobuild: fix pthread CFLAGS for function checks 8572/head
David Lamparter [Tue, 27 Apr 2021 13:11:33 +0000 (15:11 +0200)]
build: fix pthread CFLAGS for function checks

The pthread_* checks for extra pthread features really need
PTHREAD_CFLAGS...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>