]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agoMerge pull request #5393 from ton31337/fix/update_rib_on_bgp_distance_changes_7.1 upstream/stable/7.1
Sri Mohana Singamsetty [Mon, 25 Nov 2019 18:26:35 +0000 (10:26 -0800)]
Merge pull request #5393 from ton31337/fix/update_rib_on_bgp_distance_changes_7.1

bgpd: [7.1] Reflect the distance in RIB when it is changed for an arbitrary afi/safi

4 years agotests: Test if `distance bgp (1-255) (1-255) (1-255)` works
Donatas Abraitis [Thu, 31 Oct 2019 09:17:45 +0000 (11:17 +0200)]
tests: Test if `distance bgp (1-255) (1-255) (1-255)` works

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5396 from ton31337/fix/send_BGP_NOTIFY_CEASE_PEER_UNCONFIG_after_...
Donald Sharp [Thu, 21 Nov 2019 14:58:06 +0000 (09:58 -0500)]
Merge pull request #5396 from ton31337/fix/send_BGP_NOTIFY_CEASE_PEER_UNCONFIG_after_no_neighbor_7.1

bgpd: [7.1] Notify "Peer De-configured" after entering 'no neighbor <neighbor> cmd'

4 years agobgpd: Notify "Peer De-configured" after entering 'no neighbor <neighbor> cmd'
Donatas Abraitis [Tue, 5 Nov 2019 12:33:31 +0000 (14:33 +0200)]
bgpd: Notify "Peer De-configured" after entering 'no neighbor <neighbor> cmd'

Before changes:

~# vtysh -c 'show ip bgp neighbors 192.168.0.2 json' | \
jq '."192.168.0.2".lastNotificationReason'
null

After changes:

~# vtysh -c 'show ip bgp neighbors 192.168.0.2 json' | \
jq '."192.168.0.2".lastNotificationReason'
"Cease/Peer Unconfigured"

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Reflect the distance in RIB when it is changed for an arbitrary afi/safi
Donatas Abraitis [Thu, 31 Oct 2019 07:53:18 +0000 (09:53 +0200)]
bgpd: Reflect the distance in RIB when it is changed for an arbitrary afi/safi

debian-9# show ip route 192.168.255.2/32 longer-prefixes
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 route, r - rejected route

B>* 192.168.255.2/32 [20/0] via 192.168.0.1, eth1, 00:15:22
debian-9# conf
debian-9(config)# router bgp 100
debian-9(config-router)# address-family ipv4
debian-9(config-router-af)# distance bgp 123 123 123
debian-9(config-router-af)# do show ip route 192.168.255.2/32 longer-prefixes
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 route, r - rejected route

B>* 192.168.255.2/32 [123/0] via 192.168.0.1, eth1, 00:00:09
debian-9(config-router-af)# no distance bgp
debian-9(config-router-af)# do show ip route 192.168.255.2/32 longer-prefixes
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 route, r - rejected route

B>* 192.168.255.2/32 [20/0] via 192.168.0.1, eth1, 00:00:02
debian-9(config-router-af)#

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5388 from donaldsharp/7.1_cherrys
Donatas Abraitis [Wed, 20 Nov 2019 18:36:36 +0000 (20:36 +0200)]
Merge pull request #5388 from donaldsharp/7.1_cherrys

[7.1] cherrys

4 years agopimd: Various buffer overflow reads and crashes
Donald Sharp [Wed, 20 Nov 2019 00:36:19 +0000 (19:36 -0500)]
pimd: Various buffer overflow reads and crashes

A variety of buffer overflow reads and crashes
that could occur if you fed bad info into pim.

1) When type is setup incorrectly we were printing the first 8 bytes
of the pim_parse_addr_source, but the min encoding length is
4 bytes.  As such we will read beyond end of buffer.

2) The RP(pim, grp) macro can return a NULL value
Do not automatically assume that we can deref
the data.

3) BSM parsing was not properly sanitizing data input from wire
and we could enter into situations where we would read beyond
the end of the buffer.  Prevent this from happening, we are
probably left in a bad way.

4) The received bit length cannot be greater than 32 bits,
refuse to allow it to happen.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agopimd: Fix possible read beyond end of data received
Donald Sharp [Tue, 19 Nov 2019 13:22:50 +0000 (08:22 -0500)]
pimd: Fix possible read beyond end of data received

If a register packet is received that is less than the PIM_MSG_REGISTER_LEN
in size we can have a possible situation where the data being
checksummed is just random data from the buffer we read into.

2019/11/18 21:45:46 warnings: PIM: int pim_if_add_vif(struct interface *, _Bool, _Bool): could not get address for interface fuzziface ifindex=0
==27636== Invalid read of size 4
==27636==    at 0x4E6EB0D: in_cksum (checksum.c:28)
==27636==    by 0x4463CC: pim_pim_packet (pim_pim.c:194)
==27636==    by 0x40E2B4: main (pim_main.c:117)
==27636==  Address 0x771f818 is 0 bytes after a block of size 24 alloc'd
==27636==    at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==27636==    by 0x40E261: main (pim_main.c:112)
==27636==

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5366 from ton31337/fix/addpath_total_peer_update_7.1
Donald Sharp [Tue, 19 Nov 2019 12:41:32 +0000 (07:41 -0500)]
Merge pull request #5366 from ton31337/fix/addpath_total_peer_update_7.1

bgpd: [7.1] Fix per afi/safi addpath peer counting

4 years agobgpd: Fix per afi/safi addpath peer counting
Mitch Skiba [Thu, 14 Nov 2019 19:28:23 +0000 (19:28 +0000)]
bgpd: Fix per afi/safi addpath peer counting

The total_peercount table was created as a short cut for queries about
if addpath was enabled at all on a particular afi/safi. However, the
values weren't updated, so BGP would act as if addpath wasn't enabled
when determining if updates should be sent out. The error in behavior
was much more noticeable in tx-all than best-per-as, since changes in
what is sent by best-per-as would often trigger updates even if addpath
wasn't enabled.

Signed-off-by: Mitchell Skiba <mskiba@amazon.com>
4 years agoMerge pull request #5363 from donaldsharp/71_pim_crash_rp
Jafar Al-Gharaibeh [Tue, 19 Nov 2019 04:18:31 +0000 (22:18 -0600)]
Merge pull request #5363 from donaldsharp/71_pim_crash_rp

[7.1]pimd: Create pimreg interface when we start any interface config

4 years agopimd: Create pimreg interface when we start any interface config
Donald Sharp [Mon, 18 Nov 2019 16:43:52 +0000 (11:43 -0500)]
pimd: Create pimreg interface when we start any interface config

When you configure interface configuration without explicitly
configuring pim on that interface, we were not creating the pimreg
interface and as such we would crash in an attempted register
since the pimreg device is non-existent.

The crash is this:
==8823== Invalid read of size 8
==8823==    at 0x468614: pim_channel_add_oif (pim_oil.c:392)
==8823==    by 0x46D0F1: pim_register_join (pim_register.c:61)
==8823==    by 0x449AB3: pim_mroute_msg_nocache (pim_mroute.c:242)
==8823==    by 0x449AB3: pim_mroute_msg (pim_mroute.c:661)
==8823==    by 0x449AB3: mroute_read (pim_mroute.c:707)
==8823==    by 0x4FC0676: thread_call (thread.c:1549)
==8823==    by 0x4EF3A2F: frr_run (libfrr.c:1064)
==8823==    by 0x40DCB5: main (pim_main.c:162)
==8823==  Address 0xc8 is not stack'd, malloc'd or (recently) free'd

pim_register_join calls pim_channel_add_oif with:

pim_channel_add_oif(up->channel_oil, pim->regiface,
    PIM_OIF_FLAG_PROTO_PIM);

We just need to make srue pim->regiface exists once we start configuring
pim.

Fixes: #5358
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #5337 from opensourcerouting/ldpd-buffer-overflow-7.1
Sri Mohana Singamsetty [Fri, 15 Nov 2019 23:38:45 +0000 (15:38 -0800)]
Merge pull request #5337 from opensourcerouting/ldpd-buffer-overflow-7.1

[7.1] ldpd: add missing sanity check in the parsing of label messages

4 years agoMerge pull request #5348 from ton31337/fix/bgp_dampening_per_afi_safi_7.1
Donald Sharp [Fri, 15 Nov 2019 12:36:40 +0000 (07:36 -0500)]
Merge pull request #5348 from ton31337/fix/bgp_dampening_per_afi_safi_7.1

bgpd: [7.1] Rework BGP dampening to be per AFI/SAFI

4 years agobgpd: Rework BGP dampening to be per AFI/SAFI
Donatas Abraitis [Sun, 10 Nov 2019 18:13:20 +0000 (20:13 +0200)]
bgpd: Rework BGP dampening to be per AFI/SAFI

Before we had:

!
router bgp 65031
 bgp dampening 1 2 3 4
!

exit2-debian-9(config)# router bgp 65031
exit2-debian-9(config-router)# address-family ipv4 multicast
exit2-debian-9(config-router-af)# bgp dampening 5 6 7 8
exit2-debian-9(config-router-af)# end
exit2-debian-9# show running-config

!
router bgp 65031
 bgp dampening 1 2 3 4
!

After fix:

!
router bgp 65031
 neighbor 192.168.1.2 remote-as 100
 !
 address-family ipv4 unicast
  bgp dampening 1 2 3 4
 exit-address-family
 !
 address-family ipv4 multicast
  bgp dampening 5 6 7 8
 exit-address-family
!

exit2-debian-9# show ip bgp ipv4 unicast dampening parameters
Half-life time: 1 min
Reuse penalty: 2
Suppress penalty: 3
Max suppress time: 4 min
Max suppress penalty: 32

exit2-debian-9# show ip bgp ipv4 multicast dampening parameters
Half-life time: 5 min
Reuse penalty: 6
Suppress penalty: 7
Max suppress time: 8 min
Max suppress penalty: 18

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agodoc: Append documentation for `bgp dampening` command
Donatas Abraitis [Tue, 12 Nov 2019 11:23:24 +0000 (13:23 +0200)]
doc: Append documentation for `bgp dampening` command

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoldpd: add missing sanity check in the parsing of label messages
Renato Westphal [Thu, 14 Nov 2019 00:51:06 +0000 (21:51 -0300)]
ldpd: add missing sanity check in the parsing of label messages

Validate that the FEC prefix length is within the allowed limit
(depending on the FEC address family) in order to prevent possible
buffer overflows.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoMerge pull request #5255 from ton31337/fix/doc_bgp_redistribute_vpn_7.1
Donald Sharp [Thu, 31 Oct 2019 14:25:29 +0000 (10:25 -0400)]
Merge pull request #5255 from ton31337/fix/doc_bgp_redistribute_vpn_7.1

doc: [7.1] Add redistribute vnc-direct command and fix typo in redistribute vnc

4 years agodoc: Add redistribute vnc-direct command
Donatas Abraitis [Mon, 28 Oct 2019 14:53:40 +0000 (16:53 +0200)]
doc: Add redistribute vnc-direct command

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agodoc: redistribute vpn --> redistribute vnc
Donatas Abraitis [Mon, 28 Oct 2019 14:53:11 +0000 (16:53 +0200)]
doc: redistribute vpn --> redistribute vnc

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5244 from ton31337/fix/do_not_include_nexthop_dash_dash_7.1
Donald Sharp [Tue, 29 Oct 2019 17:02:56 +0000 (13:02 -0400)]
Merge pull request #5244 from ton31337/fix/do_not_include_nexthop_dash_dash_7.1

bgpd: [7.1] Do not send next-hop as :: in MP_REACH_NLRI if no link-local ex…

4 years agobgpd: Do not send next-hop as :: in MP_REACH_NLRI if no link-local exists
Donatas Abraitis [Fri, 6 Sep 2019 09:12:23 +0000 (12:12 +0300)]
bgpd: Do not send next-hop as :: in MP_REACH_NLRI if no link-local exists

This is the unusual case when you have global IPv6 address and no link-local
on interface attached. Like here:

eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP
 link/ether 08:00:27:65:c6:82 brd ff:ff:ff:ff:ff:ff
 inet6 2a02:4780:face::1/64 scope global
    valid_lft forever preferred_lft forever

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5231 from ton31337/fix/noip_nhrp_map_7.1
Donald Sharp [Sat, 26 Oct 2019 02:25:47 +0000 (22:25 -0400)]
Merge pull request #5231 from ton31337/fix/noip_nhrp_map_7.1

nhrp: [7.1] Make sure `no ip nhrp map <something>` works as expected

4 years agoMerge pull request #5228 from ton31337/fix/override_peers_ttl_if_peer_group_configure...
Donald Sharp [Sat, 26 Oct 2019 02:25:15 +0000 (22:25 -0400)]
Merge pull request #5228 from ton31337/fix/override_peers_ttl_if_peer_group_configured_7.1

bgpd: [7.1] Override peer's TTL only if peer-group is configured with TTL

4 years agonhrp: Make sure `no ip nhrp map <something>` works as expected
Donatas Abraitis [Fri, 25 Oct 2019 10:01:02 +0000 (13:01 +0300)]
nhrp: Make sure `no ip nhrp map <something>` works as expected

We passed peer as NULL and nothing happened.

exit2-debian-9# conf
exit2-debian-9(config)# int gre1
exit2-debian-9(config-if)# ip nhrp map 1.1.1.1 local
exit2-debian-9(config-if)# ip nhrp map 2.2.2.2 3.3.3.3
exit2-debian-9(config-if)# do sh run
...
!
interface gre1
 ip nhrp map 1.1.1.1 local
 ip nhrp map 2.2.2.2 3.3.3.3
!
...
exit2-debian-9(config-if)# no ip nhrp map 1.1.1.1
exit2-debian-9(config-if)# do sh run
...
!
interface gre1
 ip nhrp map 2.2.2.2 3.3.3.3
!

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Override peer's TTL only if peer-group is configured with TTL
Donatas Abraitis [Wed, 23 Oct 2019 14:56:23 +0000 (17:56 +0300)]
bgpd: Override peer's TTL only if peer-group is configured with TTL

When a peer-group is configured for an already configured eBGP neighbor,
ebgp-multihop command is removed for that peer.

This fix remains configured peer's ebgp-multihop value if peer-group does
not have ebgp-multihop configured.

!
router bgp 100
 neighbor A8 peer-group
 neighbor A9 peer-group
 neighbor A9 ebgp-multihop 12
 neighbor 3.3.3.3 remote-as 123
 neighbor 3.3.3.3 ebgp-multihop 255
 neighbor 4.4.4.4 remote-as 123
 !

spine1-debian-9#
spine1-debian-9# conf
spine1-debian-9(config)# router bgp 100
spine1-debian-9(config-router)# neighbor 3.3.3.3 peer-group A8
spine1-debian-9(config-router)# do sh run

!
router bgp 100
 neighbor A8 peer-group
 neighbor A9 peer-group
 neighbor A9 ebgp-multihop 12
 neighbor 3.3.3.3 remote-as 123
 neighbor 3.3.3.3 peer-group A8
 neighbor 3.3.3.3 ebgp-multihop 255
 neighbor 4.4.4.4 remote-as 123
!

spine1-debian-9(config-router)# neighbor 4.4.4.4 peer-group A9
spine1-debian-9(config-router)# do sh run

!
router bgp 100
 neighbor A8 peer-group
 neighbor A9 peer-group
 neighbor A9 ebgp-multihop 12
 neighbor 3.3.3.3 remote-as 123
 neighbor 3.3.3.3 peer-group A8
 neighbor 3.3.3.3 ebgp-multihop 255
 neighbor 4.4.4.4 remote-as 123
 neighbor 4.4.4.4 peer-group A9
!

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5163 from ton31337/fix/do_not_reconnect_if_prefix_overflow_7.1
Donald Sharp [Wed, 16 Oct 2019 11:07:04 +0000 (07:07 -0400)]
Merge pull request #5163 from ton31337/fix/do_not_reconnect_if_prefix_overflow_7.1

bgpd: [7.1] Keep the session down if maximum-prefix is reached

4 years agobgpd: Keep the session down if maximum-prefix is reached
Donatas Abraitis [Wed, 2 Oct 2019 15:06:37 +0000 (18:06 +0300)]
bgpd: Keep the session down if maximum-prefix is reached

Under high load instances with hundreds of thousands of prefixes this
could result in very unstable systems.

When maximum-prefix is set, but restart timer is not set then the session
flaps between Idle(Pfx) -> Established -> Idle(Pfx) states.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agotests: Remove sleep from test_bgp_maximum_prefix_invalid_update
Donatas Abraitis [Thu, 3 Oct 2019 11:08:51 +0000 (14:08 +0300)]
tests: Remove sleep from test_bgp_maximum_prefix_invalid_update

Sleep is not needed here while we fail instantly if maximum is reached.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: honor max prefix timer on inbound sessions
Matthew Smith [Tue, 9 Jul 2019 17:59:44 +0000 (12:59 -0500)]
bgpd: honor max prefix timer on inbound sessions

When using the maximum-prefix restart option with a BGP peer,
if the peer exceeds the limit of prefixes, bgpd causes the
connection to be closed and sets a timer. It will not attempt
to connect to that peer until the timer expires. But if the
peer attempts to connect to it before the timer expires, it
accepts the connection and starts exchanging routes again.

When accepting a connection from a peer, reject the connection
if the max prefix restart timer is set.

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
4 years agoMerge pull request #5116 from ton31337/feature/maximum-prefix_uint64_to_uint32_7.1
Quentin Young [Wed, 9 Oct 2019 19:33:13 +0000 (15:33 -0400)]
Merge pull request #5116 from ton31337/feature/maximum-prefix_uint64_to_uint32_7.1

bgpd: [7.1] Use uint32_t for maximum-prefix

4 years agobgpd: Use uint32_t for maximum-prefix
Donatas Abraitis [Thu, 3 Oct 2019 21:30:28 +0000 (00:30 +0300)]
bgpd: Use uint32_t for maximum-prefix

Currently we have unsigned long which is not what we defined
in CLI (1-4294967295).

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #5092 from sworleys/Fix-Vrf_ID-Decode_7.1
Russ White [Wed, 2 Oct 2019 14:23:28 +0000 (10:23 -0400)]
Merge pull request #5092 from sworleys/Fix-Vrf_ID-Decode_7.1

[7.1] lib: Decode vrf_id update appropriately from zapi

4 years agolib: Decode vrf_id update appropriately from zapi
Stephen Worley [Tue, 1 Oct 2019 23:02:33 +0000 (19:02 -0400)]
lib: Decode vrf_id update appropriately from zapi

The vrf_id in `zsend_interface_vrf_update()` is encoded as
a long via `stream_putl()`, we should decode it as such
as well.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
4 years agoMerge pull request #5030 from donaldsharp/7.1_send_that_error_bgp
Donatas Abraitis [Sun, 22 Sep 2019 08:21:52 +0000 (11:21 +0300)]
Merge pull request #5030 from donaldsharp/7.1_send_that_error_bgp

7.1 send that error bgp

4 years agobgpd: Invalid NH's should send an apropriate reason code
Donald Sharp [Fri, 20 Sep 2019 10:41:02 +0000 (06:41 -0400)]
bgpd: Invalid NH's should send an apropriate reason code

RFC 4271 sec 6.3 p33, In the case of a BGP_NEXTHOP attribute with an
incorrect value, FRR is supposed to send a notification
and include 'Corresponding type, length and value of the NEXT_HOP
attribute in the notification data.

Fixes: #4997
Signed-off-by: Nikos <ntriantafillis@gmail.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: IPv6 session flapping with MP_REACH_NLRI and 0.0.0.0 in NEXT_HOP attribute
nikos [Thu, 9 May 2019 07:02:16 +0000 (00:02 -0700)]
bgpd: IPv6 session flapping with MP_REACH_NLRI and 0.0.0.0 in NEXT_HOP attribute

This is causing interop issues with vendors. According to the RFC,
receiver should ignore the NEXT_HOP attribute with MP_REACH_NLRI
present.

Signed-off-by: nikos <ntriantafillis@gmail.com>
4 years agobgpd: IPv6 session flapping with MP_REACH_NLRI and 0.0.0.0 in NEXT_HOP attribute
nikos [Sat, 4 May 2019 06:22:30 +0000 (23:22 -0700)]
bgpd: IPv6 session flapping with MP_REACH_NLRI and 0.0.0.0 in NEXT_HOP attribute

This is causing interop issues with vendors. According to the RFC,
receiver should ignore the NEXT_HOP attribute with MP_REACH_NLRI
present.

Signed-off-by: nikos ntriantafillis@gmail.com
4 years agoMerge pull request #4960 from ton31337/fix/check_if_rmap_exists_before_warning
Donald Sharp [Wed, 11 Sep 2019 13:46:32 +0000 (09:46 -0400)]
Merge pull request #4960 from ton31337/fix/check_if_rmap_exists_before_warning

bgpd: [7.1] `neighbor X:X::X default-originate` complains about (null)

4 years agobgpd: `neighbor X:X::X default-originate` complains about (null)
Donald Sharp [Thu, 20 Jun 2019 15:12:35 +0000 (11:12 -0400)]
bgpd: `neighbor X:X::X default-originate` complains about (null)

The `neighbor X:X::X default-originate command is complaining
that:
The route-map '(null)' does not exist.

Upon inspection of the code we were passing a NULL
string to the lookup.  Testing for null gets us this:

donna.cumulusnetworks.com# conf t
donna.cumulusnetworks.com(config)# router bgp 99
donna.cumulusnetworks.com(config-router)# neighbor 2001:1::1:2 remote-as 99
donna.cumulusnetworks.com(config-router)# neighbor 2001:1::1:2 default-originate
donna.cumulusnetworks.com(config-router)# end
donna.cumulusnetworks.com# show run
Building configuration...

Current configuration:
!
frr version 7.2-dev
frr defaults datacenter
hostname donna.cumulusnetworks.com
log stdout
no ipv6 forwarding
!
ip route 4.5.6.7/32 10.50.11.4
!
router bgp 99
 neighbor 2001:1::1:2 remote-as 99
 !
 address-family ipv4 unicast
  neighbor 2001:1::1:2 default-originate

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4938 from ton31337/feature/documentation_for_rfc8212_7.1
Donald Sharp [Fri, 6 Sep 2019 11:37:05 +0000 (07:37 -0400)]
Merge pull request #4938 from ton31337/feature/documentation_for_rfc8212_7.1

doc: [7.1] Add documentation for `bgp ebgp-requires-policy` command

4 years agodoc: Add documentation for `bgp ebgp-requires-policy` command
Donatas Abraitis [Thu, 5 Sep 2019 16:57:46 +0000 (19:57 +0300)]
doc: Add documentation for `bgp ebgp-requires-policy` command

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #4899 from ton31337/fix/no_aspath_prepend_last_7.1
Donald Sharp [Thu, 29 Aug 2019 15:55:59 +0000 (11:55 -0400)]
Merge pull request #4899 from ton31337/fix/no_aspath_prepend_last_7.1

bgpd: [7.1] Add 'no set as-path prepend last-as X' command

4 years agobgpd: Update doc for some as-path route-map commands
Donald Sharp [Mon, 26 Aug 2019 13:56:53 +0000 (09:56 -0400)]
bgpd: Update doc for some as-path route-map commands

Update the documentation for some as-path route-map commands.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: Add 'no set as-path prepend last-as X' command
Donald Sharp [Mon, 26 Aug 2019 13:49:18 +0000 (09:49 -0400)]
bgpd: Add 'no set as-path prepend last-as X' command

The `set as-path prepend last-as X` command had no, 'no' form
of the command.  Add this into the cli.

Testing:
!
route-map BLARBLE permit 10
 set as-path prepend last-as 3
!
!
router bgp 9999
 neighbor 10.50.12.118 remote-as external
 neighbor 10.50.12.118 ebgp-multihop 30
 !
 address-family ipv4 unicast
  neighbor 10.50.12.118 route-map BLARBLE in
 !
!

eva# show bgp ipv4 uni 4.4.4.4
BGP routing table entry for 4.4.4.4/32
Paths: (1 available, best #1, table default)
  Advertised to non peer-group peers:
  10.50.12.118
  999 999 999 999
    10.50.12.118 from 10.50.12.118 (10.50.12.118)
      Origin incomplete, metric 0, valid, external, best (First path received)
      Last update: Mon Aug 26 09:47:17 2019

eva# conf
eva(config)# route-map BLARBLE permit 10
eva(config-route-map)# no set as-path prepend last-as 3
eva(config-route-map)# end
eva# clear bgp ipv4 uni *
eva# show bgp ipv4 uni 4.4.4.4
BGP routing table entry for 4.4.4.4/32
Paths: (1 available, best #1, table default)
  Advertised to non peer-group peers:
  10.50.12.118
  999
    10.50.12.118 from 10.50.12.118 (10.50.12.118)
      Origin incomplete, metric 0, valid, external, best (First path received)
      Last update: Mon Aug 26 09:48:31 2019

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4853 from rtrlib/2019-08-16-bugfix-7-1
Donald Sharp [Tue, 20 Aug 2019 13:51:53 +0000 (09:51 -0400)]
Merge pull request #4853 from rtrlib/2019-08-16-bugfix-7-1

bgpd: rpki fixes (stable/7.1)

4 years agobgpd: fix bgp_table range lookup
Marcel Röthke [Fri, 16 Aug 2019 14:20:05 +0000 (16:20 +0200)]
bgpd: fix bgp_table range lookup

In case the topmost node has a larger prefix length than the lookup
prefix it never matches even if it was still lower than maxlen

This also alters a test case to check for this bug.

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
4 years agobgpd: remove initial sync timeout in rpki startup code
Marcel Röthke [Fri, 16 Aug 2019 10:52:47 +0000 (12:52 +0200)]
bgpd: remove initial sync timeout in rpki startup code

The initial sync timeout breaks config load and is not necessary anyway.

Fix #4827

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
4 years agoMerge pull request #4743 from opensourcerouting/7.1/ospfd-default-originate
Russ White [Tue, 6 Aug 2019 12:29:08 +0000 (08:29 -0400)]
Merge pull request #4743 from opensourcerouting/7.1/ospfd-default-originate

[7.1] ospfd: fix default originate always

4 years agobgpd: [7.1] Strip `delete` keyword when looking up for communit… (#4769)
David Lamparter [Tue, 6 Aug 2019 08:41:07 +0000 (10:41 +0200)]
bgpd: [7.1] Strip `delete` keyword when looking up for communit… (#4769)

bgpd: [7.1] Strip `delete` keyword when looking up for communities

4 years agobgpd: [7.1] Strip `delete` keyword when looking up for lcommuni… (#4786)
David Lamparter [Tue, 6 Aug 2019 08:40:26 +0000 (10:40 +0200)]
bgpd: [7.1] Strip `delete` keyword when looking up for lcommuni… (#4786)

bgpd: [7.1] Strip `delete` keyword when looking up for lcommunities

4 years agobgpd: Strip `delete` keyword when looking up for lcommunities
Donatas Abraitis [Thu, 18 Jul 2019 12:29:20 +0000 (15:29 +0300)]
bgpd: Strip `delete` keyword when looking up for lcommunities

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agotopotests: Check if set-comm-list is working under route-map scope
Donatas Abraitis [Fri, 26 Jul 2019 06:16:49 +0000 (09:16 +0300)]
topotests: Check if set-comm-list is working under route-map scope

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Convert to network byte order before passing value to `community_del_val`
Donatas Abraitis [Fri, 19 Jul 2019 13:15:52 +0000 (16:15 +0300)]
bgpd: Convert to network byte order before passing value to `community_del_val`

community_val_get() returns ntohl(val) which is used in more places like
community_include(), community_add_val(), but community_del_val() is missing
back conversion htonl().

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Strip `delete` keyword when looking up for communities
Donatas Abraitis [Fri, 19 Jul 2019 12:56:58 +0000 (15:56 +0300)]
bgpd: Strip `delete` keyword when looking up for communities

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #4749 from ton31337/fix/next-hop-self_force_alias_for_ipv6_7.1
Donald Sharp [Tue, 30 Jul 2019 14:01:31 +0000 (10:01 -0400)]
Merge pull request #4749 from ton31337/fix/next-hop-self_force_alias_for_ipv6_7.1

bgpd: [7.1] Add hidden `next-hop-self all` for all address families

4 years agobgpd: Add hidden `next-hop-self all` for all address families
Donatas Abraitis [Wed, 24 Jul 2019 16:05:51 +0000 (19:05 +0300)]
bgpd: Add hidden `next-hop-self all` for all address families

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoospfd: re-fix default origination check
David Lamparter [Mon, 29 Jul 2019 12:44:26 +0000 (14:44 +0200)]
ospfd: re-fix default origination check

ospf->external[DEFAULT_ROUTE] and zclient->default_information don't
line up with each other; the former is only used for "originate always".

Fixes: #4237
Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoRevert "ospfd: default route got flushed after lsa refresh timer."
David Lamparter [Mon, 29 Jul 2019 12:04:06 +0000 (14:04 +0200)]
Revert "ospfd: default route got flushed after lsa refresh timer."

This reverts commit a6b4e1fdedb290e8d86f73b0d7f842f7042b26af.

This fix is wrong too.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoMerge pull request #4662 from opensourcerouting/fix-outdated-candidate-7.1
Russ White [Tue, 16 Jul 2019 13:19:15 +0000 (09:19 -0400)]
Merge pull request #4662 from opensourcerouting/fix-outdated-candidate-7.1

[7.1] lib: fix outdated candidate configuration issue

4 years agoMerge pull request #4665 from ton31337/fix/show_delete_suboption_for_set_comm-list_7.1
Quentin Young [Wed, 10 Jul 2019 16:06:18 +0000 (12:06 -0400)]
Merge pull request #4665 from ton31337/fix/show_delete_suboption_for_set_comm-list_7.1

bgpd: [7.1] Show `delete` sub-option for `set [l]comm-list <list> delete`

4 years agobgpd: Show `delete` sub-option for `set [l]comm-list <list> delete`
Donatas Abraitis [Wed, 26 Jun 2019 12:06:10 +0000 (15:06 +0300)]
bgpd: Show `delete` sub-option for `set [l]comm-list <list> delete`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agolib: fix outdated candidate configuration issue
Renato Westphal [Mon, 27 May 2019 22:48:13 +0000 (19:48 -0300)]
lib: fix outdated candidate configuration issue

Even when using the classic CLI mode (i.e. when --tcli is not
used), the northbound code still uses vty->candidate_config
to perform configuration changes. From the perspective of the
user, the running configuration is being edited directly, but
under the hood the northbound layer does a full configuration
transaction for each command.  When the running configuration is
edited by a northbound client other than the CLI (e.g. kernel,
gRPC), vty->candidate_config might become outdated, and this can
lead to lots of weird problems. To fix this, always regenerate
vty->candidate_config before each configuration command when
using the classic CLI mode. When using the transactional CLI,
the user needs to update the candidate manually using the "update"
command, otherwise the "commit" command will fail with this error:
"% Candidate configuration needs to be updated before commit".

Fixes some problems reported by Don after moving an interface from
one VRF to another one while zebra is running.

Reported-by: Don Slice <dslice@cumulusnetworks.com>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoMerge pull request #4646 from ton31337/feature/validate_lcommunity_7.1
Donald Sharp [Tue, 9 Jul 2019 01:47:58 +0000 (21:47 -0400)]
Merge pull request #4646 from ton31337/feature/validate_lcommunity_7.1

bgpd: [7.1] Validate large-community-list against UINT_MAX

4 years agobgpd: Validate large-community-list against UINT_MAX
Donatas Abraitis [Tue, 2 Jul 2019 12:35:26 +0000 (15:35 +0300)]
bgpd: Validate large-community-list against UINT_MAX

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years ago[7.1] *: s/TRUE/true/, s/FALSE/false/ (#4633)
David Lamparter [Wed, 3 Jul 2019 12:36:16 +0000 (14:36 +0200)]
[7.1] *: s/TRUE/true/, s/FALSE/false/ (#4633)

[7.1] *: s/TRUE/true/, s/FALSE/false/

4 years ago*: s/TRUE/true/, s/FALSE/false/
Quentin Young [Mon, 1 Jul 2019 17:26:05 +0000 (17:26 +0000)]
*: s/TRUE/true/, s/FALSE/false/

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #4611 from donaldsharp/7_1_igmp_connected_source
Jafar Al-Gharaibeh [Thu, 27 Jun 2019 18:50:20 +0000 (21:50 +0300)]
Merge pull request #4611 from donaldsharp/7_1_igmp_connected_source

[7.1]pimd: Dissallow query to be received from a non-connected source

4 years agopimd: Dissallow query to be received from a non-connected source
Donald Sharp [Tue, 25 Jun 2019 04:30:11 +0000 (00:30 -0400)]
pimd: Dissallow query to be received from a non-connected source

When we receive an igmp query on a interface, ensure that the
source address of the packet is connected to the incoming
interface.  This will prevent a meanie from crafting a igmp
packet with a source address less than ours and causing
us to suspend query activities.

Fixes: #1692
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4595 from ton31337/feature/autocomplete/bgp_peer-groups_7.1
Donald Sharp [Sun, 23 Jun 2019 23:01:37 +0000 (19:01 -0400)]
Merge pull request #4595 from ton31337/feature/autocomplete/bgp_peer-groups_7.1

bgpd: [7.1] List all groups dynamically for commands with peer-group

4 years agobgpd: List all groups dynamically for commands with peer-group
Donatas Abraitis [Tue, 11 Jun 2019 20:29:32 +0000 (23:29 +0300)]
bgpd: List all groups dynamically for commands with peer-group

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #4593 from ton31337/fix/match_ip_nexthop_type_blackhole_7.1
Donald Sharp [Sat, 22 Jun 2019 14:09:34 +0000 (10:09 -0400)]
Merge pull request #4593 from ton31337/fix/match_ip_nexthop_type_blackhole_7.1

rmap: [7.1] Backport changes regarding `no match ip next-hop type`

4 years agormap: Minor changes in comments regarding match ip[v6] next-hop type
Donatas Abraitis [Sat, 22 Jun 2019 06:30:44 +0000 (09:30 +0300)]
rmap: Minor changes in comments regarding match ip[v6] next-hop type

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agormap: Modify cli helper text for `match_ipv6_next_hop_type_cmd`
Donatas Abraitis [Sat, 22 Jun 2019 06:29:19 +0000 (09:29 +0300)]
rmap: Modify cli helper text for `match_ipv6_next_hop_type_cmd`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agormap: Add hooks into zebra,ospf,rip for `match ip next-hop type blackhole`
Donatas Abraitis [Fri, 21 Jun 2019 15:51:33 +0000 (18:51 +0300)]
rmap: Add hooks into zebra,ospf,rip for `match ip next-hop type blackhole`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoFRRouting release 7.1 frr-7.1
David Lamparter [Tue, 18 Jun 2019 04:15:21 +0000 (06:15 +0200)]
FRRouting release 7.1

- gRPC northbound plugin
- "table NNN" removed from zebra
- more dataplane MT work
- EVPN in non-default VRFs
- RFC 8212 (default deny policy for eBGP)
- RFC 8106 (IPv6 RA DNS options)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agoMerge pull request #4539 from opensourcerouting/7.1/watchfrr-sd-timeout
Donald Sharp [Mon, 17 Jun 2019 19:18:33 +0000 (15:18 -0400)]
Merge pull request #4539 from opensourcerouting/7.1/watchfrr-sd-timeout

[7.1] tools: retain sanity when reloading under systemd

4 years agotools: retain sanity when reloading under systemd
David Lamparter [Sun, 9 Jun 2019 23:35:04 +0000 (01:35 +0200)]
tools: retain sanity when reloading under systemd

Without this, we end up restarting watchfrr with the systemd watchdog
non-functional & tripped a bit later.  Also, if watchfrr is in the
"control" cgroup, systemd 232 will kill it.  (241 apparently doesn't.
Can't find anything about this in systemd's ChangeLog though.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 9c251d376ad8e604c25767b32c2816e9ae75a738)

4 years ago7.1: isisd: The RFC states that v6 addresses are limited to 16 in a hello … (#4475)
David Lamparter [Thu, 6 Jun 2019 17:44:03 +0000 (19:44 +0200)]
7.1: isisd: The RFC states that v6 addresses are limited to 16 in a hello … (#4475)

7.1: isisd: The RFC states that v6 addresses are limited to 16 in a hello …

4 years agoisisd: The RFC states that v6 addresses are limited to 16 in a hello packet
Donald Sharp [Wed, 5 Jun 2019 01:15:43 +0000 (21:15 -0400)]
isisd: The RFC states that v6 addresses are limited to 16 in a hello packet

The RFC states we can send only up to 16 v6 addresses in a hello packet
and cannot send sub tlv's of that type.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4462 from donaldsharp/7.1_bfd_access_list
Rafael Zalamena [Wed, 5 Jun 2019 14:37:55 +0000 (11:37 -0300)]
Merge pull request #4462 from donaldsharp/7.1_bfd_access_list

7.1: bfdd: Modify bfdd to quietly accept access-lists

4 years agobfdd: Modify bfdd to quietly accept access-lists
Donald Sharp [Wed, 5 Jun 2019 01:38:11 +0000 (21:38 -0400)]
bfdd: Modify bfdd to quietly accept access-lists

The `access-list ...` command was causing bfdd to return
'unknown commands'.  Make bfdd at least cognizant of
access-lists enough to not create strange error messages

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #4425 from ton31337/feature/show_fqdn_in_show_ip_bgp_7.1
Donald Sharp [Thu, 30 May 2019 16:59:16 +0000 (12:59 -0400)]
Merge pull request #4425 from ton31337/feature/show_fqdn_in_show_ip_bgp_7.1

bgpd: [7.1] Show FQDN in `show [ip] bgp` output

4 years agobgpd: Show FQDN in `show [ip] bgp` output
Donatas Abraitis [Mon, 20 May 2019 13:43:01 +0000 (16:43 +0300)]
bgpd: Show FQDN in `show [ip] bgp` output

We already show this information in `show [ip] bgp <prefix`, thus why don't
show it in global output. It's very handy when using at scale and to see
the whole picture instead of resolving neighbor manually.

It will show FQDN only if `bgp default show-hostname` is toggled.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #4423 from ton31337/feature/delete_prefix_list_by_sequence_number_7.1
Donald Sharp [Thu, 30 May 2019 13:01:54 +0000 (09:01 -0400)]
Merge pull request #4423 from ton31337/feature/delete_prefix_list_by_sequence_number_7.1

plist: [7.1] Delete prefix-list by sequence number

4 years agoplist: Delete prefix-list by sequence number
Donatas Abraitis [Fri, 24 May 2019 06:22:09 +0000 (09:22 +0300)]
plist: Delete prefix-list by sequence number

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #4411 from opensourcerouting/feature/fix-isis-route-deletion-7.1
Donald Sharp [Wed, 29 May 2019 13:11:57 +0000 (09:11 -0400)]
Merge pull request #4411 from opensourcerouting/feature/fix-isis-route-deletion-7.1

isisd: del routes when area is unconfigured

4 years agoisisd: del routes when area is unconfigured
Emanuele Di Pascale [Tue, 28 May 2019 14:46:06 +0000 (16:46 +0200)]
isisd: del routes when area is unconfigured

attempt to fix #4399

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoMerge pull request #4406 from opensourcerouting/snap-fix-7.1
Donald Sharp [Wed, 29 May 2019 01:05:08 +0000 (21:05 -0400)]
Merge pull request #4406 from opensourcerouting/snap-fix-7.1

[7.1] Snap fixes for 7.1

4 years agosnapcraft: Add libdb5.3 dependency
Martin Winter [Tue, 28 May 2019 22:56:24 +0000 (00:56 +0200)]
snapcraft: Add libdb5.3 dependency

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
4 years agosnapcraft: Disable libyang CACHE for snap package (Temp workaround)
Martin Winter [Mon, 18 Feb 2019 15:57:24 +0000 (07:57 -0800)]
snapcraft: Disable libyang CACHE for snap package (Temp workaround)

There seems to be a bug in latest libyang running when running in
a snap container which causes a failure of the cache logic. Disable
CACHE for now as it's not yet needed. Will be re-enabled in a later
release

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
4 years agosnapcraft: Add FabricD to Snap package
Martin Winter [Thu, 7 Feb 2019 23:12:14 +0000 (15:12 -0800)]
snapcraft: Add FabricD to Snap package

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
4 years agosnapcraft: Update bgpd to use newer rpki lib
Martin Winter [Thu, 7 Feb 2019 22:44:47 +0000 (14:44 -0800)]
snapcraft: Update bgpd to use newer rpki lib

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
4 years agosnapcraft: Add libyang to snap package
Martin Winter [Thu, 17 Jan 2019 19:02:04 +0000 (11:02 -0800)]
snapcraft: Add libyang to snap package

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
4 years agosnapcraft: Add missing staticd.conf.default
Martin Winter [Thu, 7 Feb 2019 15:07:25 +0000 (07:07 -0800)]
snapcraft: Add missing staticd.conf.default

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
4 years agosnapcraft: Don't stage libc6
Martin Winter [Thu, 17 Jan 2019 19:01:05 +0000 (11:01 -0800)]
snapcraft: Don't stage libc6

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
4 years agosnapcraft: Update RTRLIB to 0.6.3
Martin Winter [Thu, 17 Jan 2019 16:32:47 +0000 (08:32 -0800)]
snapcraft: Update RTRLIB to 0.6.3

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
4 years agoMerge pull request #4381 from opensourcerouting/7.1/dlist
Quentin Young [Fri, 24 May 2019 00:37:26 +0000 (20:37 -0400)]
Merge pull request #4381 from opensourcerouting/7.1/dlist

[7.1] DLIST / BGP adv_fifo deletion fix

4 years agobgpd: use DLIST for adv_fifo
David Lamparter [Mon, 20 May 2019 21:41:16 +0000 (23:41 +0200)]
bgpd: use DLIST for adv_fifo

I mistakenly assumed that something called "FIFO" would primarily be
used by removing items from the front.  This isn't the case for the
adv_fifo... so use a DLIST there to make sure deletions from the middle
of the queue are fast.

Signed-off-by: David Lamparter <equinox@diac24.net>
(cherry picked from commit 5ac8ecbabd9638f726fdff5d49b43e675a47e434)

4 years agolib: add DECLARE_DLIST (double-linked list)
David Lamparter [Sun, 12 May 2019 10:05:44 +0000 (12:05 +0200)]
lib: add DECLARE_DLIST (double-linked list)

Turns out we need one of these.  Same API as DECLARE_LIST, but deleting
random items is much faster.

Signed-off-by: David Lamparter <equinox@diac24.net>
(cherry picked from commit fdad523b547e68a2170a7e5fec4bad98222cb9a0)