Commit Graph

26797 Commits

Author SHA1 Message Date
David Lamparter
495a3307f8
Merge pull request #9516 from qlyoung/fix-alpine-docker-images
docker: build libyang2 along with FRR
2021-09-02 13:21:43 +02:00
David Lamparter
2554d1265c build: make sed calls portable
The `-i` option on sed isn't standard, and e.g. FreeBSD sed behaves
different regarding the parameter.  Avoid it.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-09-02 13:00:35 +02:00
David Lamparter
e5af0fc869 doc/developer: add warning pointers
These two warnings are easy to get confused by, note down some pointers
on what they actually mean.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-09-02 13:00:35 +02:00
David Lamparter
09e33fbe6b build: enable -Wstrict-prototypes
All fixed up, so we can enable this now.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-09-02 13:00:35 +02:00
David Lamparter
9c1490843a build: ignore prototype warnings from readline
Readline contains some truly ancient cruft.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-09-02 13:00:35 +02:00
David Lamparter
9fb83ab17d *: fix for -Wstrict-prototypes
Just some "void" missing between empty braces.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-09-02 13:00:35 +02:00
David Lamparter
c17662db53 pceplib: fix for -Wstrict-prototypes
Just some "void" missing between empty braces.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-09-02 13:00:35 +02:00
David Lamparter
14040553bc lib: fix hook defs for -Wstrict-prototypes
Without this, the hook code creates functions with empty parameter lists
like "void hook_something()", which is not a proper C prototype.  It
needs to be "void hook_something(void)".  Add some macro shenanigans to
handle that.

... and make the plumbing functions "inline" too.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-09-02 13:00:35 +02:00
Mobashshera Rasool
8fb693a4cd ospfd: Summary LSA is not originated when process is reset
Problem Statement:
==================
Summary LSA is not originated when router-id is modified or process is reset

Root Cause Analysis:
====================
When router-id is modified or process is cleared, all the external LSAs are
 flushed then LSA is re-originated using ospf_external_lsa_rid_change
When the LSAs are flushed, the aggregate flags are not reset.

Fix:
===============
Reset the aggregation flag when the LSAs
 are flushed.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-09-01 23:39:00 -07:00
Donatas Abraitis
7ab294ea05 bgpd: Replace Enable to Disable for floating-point bw encoding CLI
At the begining there was a command to enable floating-point encoding,
but now it's default and can be disabled. Documentation was updated, but
CLI - missed, sorry, fixing.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-09-02 09:16:14 +03:00
Donald Sharp
f94825578a
Merge pull request #9443 from opensourcerouting/topo-multiview-fix
tests: Make bgp_multiview_topo1 predictable
2021-09-01 18:27:06 -04:00
Russ White
8811ce0beb
Merge pull request #9469 from ton31337/fix/extcommunity_bandwidth_floating_to_hex
bgpd: Use IEEE-754 Floating Point for storing extcommunity bandwidth
2021-09-01 12:56:45 -04:00
Russ White
ce4f3813f0
Merge pull request #9439 from ton31337/feature/set_ext_community_to_none
bgpd: Route-map `set extcommunity none`
2021-09-01 12:55:45 -04:00
Igor Ryzhov
c316fa2505
Merge pull request #9534 from donaldsharp/ospf6_crashes
ospf6d: Prevent crash of show ipv6 ospf data adv-router 0.0.0.0 links…
2021-09-01 18:29:32 +03:00
Donald Sharp
819a0202ae ospf6d: Prevent crash of show ipv6 ospf data adv-router 0.0.0.0 linkstate-id 0.0.0.0
With this sequence of events:
eva# conf
eva(config)# router ospf6
eva(config-ospf6)# end
eva# show ipv6 ospf data adv-router 0.0.0.0 linkstate-id 0.0.0.0
OSPF6: Received signal 11 at 1630442431 (si_addr 0x0, PC 0x559dcfa3a656); aborting...
OSPF6: zlog_signal+0x18c                  7fd2cc8229f7     7fff606775d0 /lib/libfrr.so.0 (mapped at 0x7fd2cc770000)
OSPF6: core_handler+0xe3                  7fd2cc8616ad     7fff606776f0 /lib/libfrr.so.0 (mapped at 0x7fd2cc770000)
OSPF6: funlockfile+0x50                   7fd2cc74f140     7fff60677840 /lib/x86_64-linux-gnu/libpthread.so.0 (mapped at 0x7fd2cc73b000)
OSPF6:     ---- signal ----
OSPF6: ospf6_lsdb_type_show_wrapper+0x5d     559dcfa3a656     7fff60677dd0 /usr/lib/frr/ospf6d (mapped at 0x559dcf9a5000)
OSPF6: show_ipv6_ospf6_database_adv_router_linkstate_id+0x1f9     559dcfa3c24a     7fff60677e50 /usr/lib/frr/ospf6d (mapped at 0x559dcf9a5000)

OSPF6 crashes.  Fix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-09-01 08:07:53 -04:00
Donald Sharp
1fc8c09464
Merge pull request #9531 from LabNConsulting/chopps/bgp-fast-reconnect
tests: add global BGP json config for [re]connect timer
2021-09-01 07:52:20 -04:00
Christian Hopps
e99b4bd6ba tests: add global BGP json config for [re]connect timer
- Fix the syntax.

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-09-01 03:49:53 -04:00
Donatas Abraitis
e5fbfe01ae
Merge pull request #9318 from Prerana-GB/ibgp_knob
bgp: BGP knob for faster convergence of bgp sessions
2021-09-01 10:45:27 +03:00
Christian Hopps
c096d64860
Merge pull request #9530 from ton31337/fix/doc_connect_timers_bgp
doc: Add missing `timers` for connect timer in BGP
2021-09-01 03:41:21 -04:00
Donatas Abraitis
d7cd3d091c doc: Add missing timers for connect timer in BGP
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-09-01 10:38:10 +03:00
Donatas Abraitis
419db184af
Merge pull request #9397 from tkms1122/master
bgpd: minimum-holdtime knob to prevent session establishment with BGP peer with low holdtime.
2021-09-01 10:33:59 +03:00
Donatas Abraitis
c7941cdd26
Merge pull request #9526 from LabNConsulting/chopps/bgp-test-defaults
tests: log bgp nbr changes, and allow config of connect timer
2021-09-01 10:25:51 +03:00
Renato Westphal
cbf4f6f144
Merge pull request #9525 from idryzhov/ospfd-crash
ospfd: correctly cleanup spf data
2021-08-31 17:54:25 -03:00
Igor Ryzhov
094a3e1e03
Merge pull request #9522 from mobash-rasool/ospfv3-bug-fixes
ospfd: add dead-interval 40 if configured in show running
2021-08-31 20:03:37 +03:00
Igor Ryzhov
6cc73dad91 staticd: output config using NB callbacks instead of operational data
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-08-31 17:59:44 +03:00
Igor Ryzhov
9ccaa12da6 staticd: convert typedef to enum
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-08-31 17:58:30 +03:00
Christian Hopps
f5136f6397 tests: log bgp nbr changes, and allow config of connect timer
- Allow tests to also change the connect timer as they can for the
keep-alive and holddown timers.

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-08-31 09:45:11 -04:00
Igor Ryzhov
57e4c21583 ospfd: correctly cleanup spf data
ospf_spf_cleanup frees the data so we need to reset the stale pointers.

Fixes #9523.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-08-31 13:41:40 +03:00
Igor Ryzhov
7a41218be4
Merge pull request #9518 from ton31337/fix/redundand_interface_name_for_peer
bgpd: Drop redundand `WORD` for no_neighbor_interface_cmd
2021-08-31 12:00:48 +03:00
Donatas Abraitis
589e9f8fb7 tests: Test if IEEE floating-point encoding for bw works with older format
Just check if backward-compatibility works fine between uint32 / IEEE encodings.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-08-31 11:10:06 +03:00
Mobashshera Rasool
2c1f2d2ad9 ospfd: add dead-interval 40 if configured in show running
Problem Statement:
==================
When hello-interval is configured as 5, automatically dead interval becomes
4 times of hello i.e 20 seconds. But user wants the dead interval as
40 seconds and hello as 5 seconds. Therefore user configures it.
Now "ip ospf dead-interval 40" is not shown in "show running-config"
Therefore when user restarts the daemon, the dead interval goes back to
20 seconds and the neighbors are down.

Fix:
==================
If user configures dead-interval as 40, show it in show running config.

Fixes: #9401

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-08-30 23:02:39 -07:00
Renato Westphal
3ebc5e4be9 ospf6d: fix display of debug command in the running configuration
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-08-31 01:48:22 -03:00
Renato Westphal
950b49f80c ospf6d: fix unguarded GR debug message
The message about ignoring a one-way hello should only be logged
when the router is acting a helper for another one.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-08-31 01:45:50 -03:00
Russ White
3c65c73ffa
Merge pull request #9502 from idryzhov/cmd-vtysh-cleanup
lib, vtysh: make node-processing code more generic
2021-08-30 15:58:06 -04:00
Quentin Young
66432be76b alpine: fix path for daemons file install
The install statement was putting the daemons file at "/etc/frr" instead
of making a new directory "/etc/frr" and putting it inside there.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-08-30 15:21:59 -04:00
Quentin Young
6793327f48 docker: add expected log functions to alpine docker-start
Some basic functions are required by frrcommon.sh

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-08-30 15:21:32 -04:00
Donatas Abraitis
294d842565 bgpd: Drop redundand WORD for no_neighbor_interface_cmd
Just to be consistent with neighbor_interface_cmd.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-08-30 19:07:47 +03:00
Quentin Young
661d41c183 docker: build libyang2 along with FRR
Alpine images have been broken for some time because libyang2 is not
available in Alpine. This patch updates our Dockerfile to build a
libyang2 APK and install it into the image to satisfy FRR's libyang2
dependency.

Unfortunately, libyang2 erroneously includes an internal header from
glibc, making it dependent on glibc to build. FRR's official Docker
images are based on Alpine, which only offers musl libc. Until libyang2
fixes this problem, the libyang2 source that is installed in this image
is a patched version that is compatible with musl libc and not an
official version.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-08-30 11:38:01 -04:00
Mark Stapp
032d1a65ff
Merge pull request #8964 from LabNConsulting/chopps/config-faster
tests: configure/reset routers in parallel
2021-08-30 08:56:43 -04:00
Donatas Abraitis
27aa23a43b bgpd: Add neighbor PEER link-bw-encoding-ieee
This is to avoid breaking changes between existing deployments of
extended community for bandwidth encoding. By default FRR uses uint32
to encode bandwidth, which is not as the draft requires (IEEE floating-point).

This switch enables the required encoding per-peer.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-08-30 14:21:49 +03:00
Donatas Abraitis
8dbe921458 doc: Add neighbor PEER link-bw-encoding-ieee
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-08-30 09:51:22 +03:00
Quentin Young
48dc73a9a3
Merge pull request #9484 from anlancs/fix-doc-bgp-desc
doc: add a missing field for bgp summary's display
2021-08-29 23:04:31 -04:00
Quentin Young
180100985d
Merge pull request #9511 from LabNConsulting/chopps/ospf-asbr-test-fix
tests: fix ospf ASBR summary test
2021-08-29 22:54:49 -04:00
anlan_cs
b8f950d2c6 doc: add a missing field for bgp summary's display
Signed-off-by: anlan_cs <anlan_cs@tom.com>
2021-08-29 21:15:33 -04:00
Donatas Abraitis
8bcaad3ded bgpd: Use IEEE-754 Floating Point for storing extcommunity bandwidth
https://datatracker.ietf.org/doc/html/draft-ietf-idr-link-bandwidth-07 says:

The bandwidth of the link is expressed as 4
   octets in IEEE floating point format, units being bytes (not bits!)
   per second.  It is carried in the Local Administrator subfield of the
   Value Field.

Before:

```
	  Extended Community (16), length: 8, Flags [OT]:
	    unknown extd community typecode (0x0004), Flags [none]
	      0x0000:  0004 fdeb 0001 e848
	    0x0000:  0004 fdeb 0001 e848
	  Updated routes:
	    172.16.16.1/32
```

0001 e848 - means 125000 (1Mbps), which is encoded incorrect.

After:

```
	  Extended Community (16), length: 8, Flags [OT]:
	    unknown extd community typecode (0x0004), Flags [none]
	      0x0000:  0004 fdeb 47f4 2400
	    0x0000:  0004 fdeb 47f4 2400
	  Updated routes:
	    172.16.16.1/32
```

47f4 2400 - means the same, but in floating point format.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-08-29 21:10:27 +03:00
Russ White
26bf593efb
Merge pull request #9503 from opensourcerouting/ospf6d-redistribute-metrics
ospf6d: extend the "redistribute" command with more options
2021-08-28 09:20:44 -04:00
David Lamparter
3816ea6bb6 lib/clippy: fix forgotten conditional
This fixes some spurious warnings on *BSD, where `elffile_add_dynreloc`
isn't used since `elf_getdata_rawchunk` is not available.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-08-28 14:27:17 +02:00
Jafar Al-Gharaibeh
d6a6eae8b3
Merge pull request #9509 from LabNConsulting/chopps/dirlocals
tests: Update dir-locals
2021-08-27 18:30:42 -05:00
Russ White
57740d8134
Merge pull request #9499 from gsol10/bogus_lsp
isisd: Fix sending of LSP with null seqno
2021-08-27 19:04:29 -04:00
Russ White
648c73647d
Merge pull request #9488 from pguibert6WIND/fix_nhrp_neigh_state
Fix nhrp neigh state
2021-08-27 19:00:45 -04:00