]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
5 years agobgpd: Invalid NH's should send an apropriate reason code 5028/head
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>
5 years agoMerge pull request #4961 from ton31337/fix/check_if_rmap_exists_before_warning_7.0
Donald Sharp [Wed, 11 Sep 2019 13:46:41 +0000 (09:46 -0400)]
Merge pull request #4961 from ton31337/fix/check_if_rmap_exists_before_warning_7.0

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

5 years agobgpd: `neighbor X:X::X default-originate` complains about (null) 4961/head
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>
5 years agoMerge pull request #4555 from pavel-shirshov/pavelsh/port_nexthop
Donatas Abraitis [Tue, 3 Sep 2019 14:48:07 +0000 (17:48 +0300)]
Merge pull request #4555 from pavel-shirshov/pavelsh/port_nexthop

bgpd: [7.0] IPv6 session flapping with MP_REACH_NLRI and 0.0.0.0 in NEXT_HOP attribute

5 years agoMerge pull request #4900 from ton31337/fix/no_aspath_prepend_last_7.0
Donald Sharp [Thu, 29 Aug 2019 15:56:17 +0000 (11:56 -0400)]
Merge pull request #4900 from ton31337/fix/no_aspath_prepend_last_7.0

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

5 years agobgpd: Update doc for some as-path route-map commands 4900/head
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>
5 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>
5 years agoMerge pull request #4860 from srimohans/exit_vrf
Donald Sharp [Tue, 20 Aug 2019 19:22:43 +0000 (15:22 -0400)]
Merge pull request #4860 from srimohans/exit_vrf

vtysh: [7.0] exit-vrf cli is broken

5 years agovtysh: [7.0] exit-vrf cli is broken 4860/head
Sri Mohana Singamsetty [Tue, 20 Aug 2019 17:52:01 +0000 (10:52 -0700)]
vtysh: [7.0] exit-vrf cli is broken

exit-vrf is not working any more, so anything configured after executing this command are still configured under that VRF context.
For example: Below configuration

vrf VRF_A
ip route 11.11.11.11/32 Null0
exit-vrf
ip route 21.21.21.21/32 Null0

results in ...

vrf VRF_A
 ip route 11.11.11.11/32 Null0
 ip route 21.21.21.21/32 Null0
 exit-vrf
!

It should have been

!
ip route 21.21.21.21/32 Null0
!
vrf VRF_A
 ip route 11.11.11.11/32 Null0
 exit-vrf
!

Porting https://github.com/FRRouting/frr/pull/4725 from FRR master.

Signed-off-by: Sri Mohana Singamsetty <msingamsetty@vmware.com>
5 years agoMerge pull request #4854 from rtrlib/2019-08-16-bugfix-7-0
Donald Sharp [Tue, 20 Aug 2019 13:53:14 +0000 (09:53 -0400)]
Merge pull request #4854 from rtrlib/2019-08-16-bugfix-7-0

bgpd: rpki fixes (stable/7.0)

5 years agobgpd: fix bgp_table range lookup 4854/head
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>
5 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>
5 years agoMerge pull request #4744 from opensourcerouting/7.0/ospfd-default-originate
Russ White [Tue, 6 Aug 2019 12:29:47 +0000 (08:29 -0400)]
Merge pull request #4744 from opensourcerouting/7.0/ospfd-default-originate

[7.0] ospfd: fix default originate always

5 years agoMerge pull request #4768 from ton31337/fix/set_comm-list_args_delete_7.0
David Lamparter [Tue, 6 Aug 2019 08:44:25 +0000 (10:44 +0200)]
Merge pull request #4768 from ton31337/fix/set_comm-list_args_delete_7.0

bgpd: [7.0] set comm-list <arg> delete stuff

5 years agotopotests: Check if set-comm-list is working under route-map scope 4768/head
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>
5 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>
5 years agoMerge pull request #4748 from ton31337/fix/next-hop-self_force_alias_for_ipv6_7.0
Donald Sharp [Tue, 30 Jul 2019 14:01:14 +0000 (10:01 -0400)]
Merge pull request #4748 from ton31337/fix/next-hop-self_force_alias_for_ipv6_7.0

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

5 years agobgpd: Add hidden `next-hop-self all` for all address families 4748/head
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>
5 years agoospfd: re-fix default origination check 4744/head
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>
5 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>
5 years agoMerge pull request #4666 from ton31337/fix/show_delete_suboption_for_set_comm-list_7.0
Renato Westphal [Fri, 12 Jul 2019 21:57:05 +0000 (18:57 -0300)]
Merge pull request #4666 from ton31337/fix/show_delete_suboption_for_set_comm-list_7.0

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

5 years agobgpd: Show `delete` sub-option for `set [l]comm-list <list> delete` 4666/head
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>
5 years agoMerge pull request #4647 from ton31337/feature/validate_lcommunity_7.0
Donald Sharp [Tue, 9 Jul 2019 01:48:12 +0000 (21:48 -0400)]
Merge pull request #4647 from ton31337/feature/validate_lcommunity_7.0

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

5 years agobgpd: Validate large-community-list against UINT_MAX 4647/head
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>
5 years agoMerge pull request #4612 from donaldsharp/7_0_igmp_connected_source
Jafar Al-Gharaibeh [Thu, 27 Jun 2019 18:50:40 +0000 (21:50 +0300)]
Merge pull request #4612 from donaldsharp/7_0_igmp_connected_source

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

5 years agopimd: Dissallow query to be received from a non-connected source 4612/head
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>
5 years agoMerge pull request #4592 from ton31337/fix/match_ip_nexthop_type_blackhole_7.0
Donald Sharp [Sat, 22 Jun 2019 14:09:23 +0000 (10:09 -0400)]
Merge pull request #4592 from ton31337/fix/match_ip_nexthop_type_blackhole_7.0

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

5 years agormap: Minor changes in comments regarding match ip[v6] next-hop type 4592/head
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>
5 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>
5 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>
5 years agoMerge pull request #4590 from ton31337/fix/documentation_as_path_validation_7.0
Donald Sharp [Sat, 22 Jun 2019 11:26:02 +0000 (07:26 -0400)]
Merge pull request #4590 from ton31337/fix/documentation_as_path_validation_7.0

doc: [7.0] Specify allowed chars in bgp regular expressions

5 years agodoc: Specify allowed chars in bgp regular expressions 4590/head
Donatas Abraitis [Tue, 23 Apr 2019 08:38:59 +0000 (11:38 +0300)]
doc: Specify allowed chars in bgp regular expressions

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: IPv6 session flapping with MP_REACH_NLRI and 0.0.0.0 in NEXT_HOP attribute 4555/head
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>
5 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
5 years agoMerge pull request #4547 from ton31337/feature/autocomplete_peer_groups
Sri Mohana Singamsetty [Wed, 19 Jun 2019 05:10:31 +0000 (22:10 -0700)]
Merge pull request #4547 from ton31337/feature/autocomplete_peer_groups

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

5 years agobgpd: List all groups dynamically for commands with peer-group 4547/head
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>
5 years agoMerge pull request #4540 from opensourcerouting/7.0/watchfrr-sd-timeout
Donald Sharp [Tue, 18 Jun 2019 00:47:06 +0000 (20:47 -0400)]
Merge pull request #4540 from opensourcerouting/7.0/watchfrr-sd-timeout

[7.0] tools: retain sanity when reloading under systemd

5 years agotools: retain sanity when reloading under systemd 4540/head
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)

5 years agoMerge pull request #4507 from opensourcerouting/fix-outdated-candidate-7.0
Donald Sharp [Thu, 13 Jun 2019 10:01:41 +0000 (06:01 -0400)]
Merge pull request #4507 from opensourcerouting/fix-outdated-candidate-7.0

[7.0] lib: fix outdated candidate configuration issue

5 years agolib: fix outdated candidate configuration issue 4507/head
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>
5 years ago7.0 isisd: The RFC states that v6 addresses are limited to 16 in a hello … (#4476)
David Lamparter [Thu, 6 Jun 2019 17:44:20 +0000 (19:44 +0200)]
7.0 isisd: The RFC states that v6 addresses are limited to 16 in a hello … (#4476)

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

5 years agoisisd: The RFC states that v6 addresses are limited to 16 in a hello packet 4476/head
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>
5 years agoMerge pull request #4463 from donaldsharp/7.0_bfd_access_list
Rafael Zalamena [Wed, 5 Jun 2019 14:38:11 +0000 (11:38 -0300)]
Merge pull request #4463 from donaldsharp/7.0_bfd_access_list

7.0 bfdd: Modify bfdd to quietly accept access-lists

5 years agobfdd: Modify bfdd to quietly accept access-lists 4463/head
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>
5 years agoMerge pull request #4424 from ton31337/feature/show_fqdn_in_show_ip_bgp_7.0
Donald Sharp [Thu, 30 May 2019 15:21:35 +0000 (11:21 -0400)]
Merge pull request #4424 from ton31337/feature/show_fqdn_in_show_ip_bgp_7.0

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

5 years agobgpd: Show FQDN in `show [ip] bgp` output 4424/head
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>
5 years agoMerge pull request #4419 from ton31337/stable/7.0
Donald Sharp [Thu, 30 May 2019 11:42:55 +0000 (07:42 -0400)]
Merge pull request #4419 from ton31337/stable/7.0

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

5 years agoplist: Delete prefix-list by sequence number 4419/head
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>
5 years agoMerge pull request #4405 from opensourcerouting/snap-fix-7.0
Donald Sharp [Wed, 29 May 2019 01:05:44 +0000 (21:05 -0400)]
Merge pull request #4405 from opensourcerouting/snap-fix-7.0

[7.0] snapcraft: Add libdb5.3 dependency

5 years agosnapcraft: Add libdb5.3 dependency 4405/head
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>
5 years agoMerge pull request #4334 from mjstapp/fix_vrf_lsps_7_0
Donald Sharp [Tue, 14 May 2019 17:36:11 +0000 (13:36 -0400)]
Merge pull request #4334 from mjstapp/fix_vrf_lsps_7_0

zebra: [7.0] remove vrf LSPs when vrf is deleted

5 years agozebra: [7.0] remove vrf LSPs when vrf is deleted 4334/head
Mark Stapp [Tue, 14 May 2019 15:28:30 +0000 (11:28 -0400)]
zebra: [7.0] remove vrf LSPs when vrf is deleted

Try to remove any LSPs associated with a vrf when the vrf is
deleted. The vrf code was calling a helpful zebra_mpls api,
but that api was basically a no-op for vrfs other than
the default.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoFRRouting Releast 7.0.1 frr-7.0.1
Martin Winter [Mon, 13 May 2019 11:49:49 +0000 (04:49 -0700)]
FRRouting Releast 7.0.1

Changes since 7.0:
- bgp:
-   Don't send Updates with BGP Max-Prefix Overflow
-   Make sure `next-hop-self all` backward compatible with force
-   Fix as-path validation in "show bgp regexp"
-   Fix interface-based peers to override peergroups
-   Fix removing private AS numbers if local-as is used
-   Fix show bgp labeled_unicast
-   Add command to lookup prefixes in rpki table
-   Fix peer count in "show bgp ipv6 summary"
-   Add missing ipv6 only peer flag action
-   Fix address family output in "show bgp [ipv4|ipv6] neighbors"
-   Add missing checks for vpnv6 nexthops
-   Fix nexthop for ipv6 vpn case
- rip: Fix removal of passive interfaces
- ospf:
-   Fix json timer output
-   Fix milliseconds in json output
- bfd:
-   Fix source port according RFC 5881, Sec 4
-   Fix IPv6 link-local peer removal
-   Fix interface clean up when deleting interface
- pim: Fix interface clean up when deleting interface
- nhrp: Fix interface clean up when deleting interface
- lib:
-   Workaround to get FRR building with libyang 0.x and 1.x
-   Fix in priv handling
-   Make priv elevation thread-safe
- zebra:
-   Pseudowire event recovery
-   Fix race condition in label manager
-   Fix system routes selection and next-hop tracking
-   Set connected route metric based on devaddr metric
-   Display metric for connected routes
-   Add selected fib details to json output
-   Always use replace if installing new route
- watchfrr: Silently ignore declare failures (for backward compatibility)
- RPM packages: Switch to new init script

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agoMerge pull request #4271 from opensourcerouting/libyang-compat-7.0
Lou Berger [Tue, 7 May 2019 15:07:56 +0000 (11:07 -0400)]
Merge pull request #4271 from opensourcerouting/libyang-compat-7.0

[7.0] lib, yang: disable libyang custom user types temporarily

5 years agolib, yang: disable libyang custom user types temporarily 4271/head
Renato Westphal [Mon, 6 May 2019 18:57:02 +0000 (15:57 -0300)]
lib, yang: disable libyang custom user types temporarily

libyang 1.0 introduced a few changes in the user types API, and
these changes made FRR incompatible with libyang 1.x. In order to
ease our migration from libyang 0.x to libyang 1.x, let's disable
our libyang custom user types temporarily so that FRR can work
with both libyang 0.x and libyang 1.x. This should be especially
helpful to the CI systems during the transition. Once the migration
to libyang 1.x is complete, this commit will be reverted.

Disabling our libyang custom user types should have only
minimal performance implications when processing configuration
transactions. The user types infrastructure should be more important
in the future to perform canonization of YANG data values when
necessary.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoMerge pull request #4210 from ton31337/feature/do_not_send_update_with_prefix_overflo...
Quentin Young [Mon, 29 Apr 2019 17:01:04 +0000 (13:01 -0400)]
Merge pull request #4210 from ton31337/feature/do_not_send_update_with_prefix_overflow_7.0

bgpd: [7.0] Do not send UPDATE message with maximum-prefix

6 years agoMerge pull request #4212 from ton31337/feature/all_alias_for_force_next_self_host_7.0
Quentin Young [Mon, 29 Apr 2019 16:56:50 +0000 (12:56 -0400)]
Merge pull request #4212 from ton31337/feature/all_alias_for_force_next_self_host_7.0

bgpd: [7.0] Make sure `next-hop-self all` backward compatible with force

6 years agobgpd: Make sure `next-hop-self all` backward compatible with force 4212/head
Donatas Abraitis [Thu, 25 Apr 2019 13:39:49 +0000 (16:39 +0300)]
bgpd: Make sure `next-hop-self all` backward compatible with force

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
6 years agobgpd: Do not send UPDATE message with maximum-prefix 4210/head
Donatas Abraitis [Mon, 15 Apr 2019 20:53:20 +0000 (23:53 +0300)]
bgpd: Do not send UPDATE message with maximum-prefix

When using maximum-prefix and count is overflow BGP
sends UPDATE message:

Apr 15 20:45:06 exit1-debian-9 bgpd[9818]: 192.168.0.2 [Error] Error parsing NLRI
Apr 15 20:45:06 exit1-debian-9 bgpd[9818]: %NOTIFICATION: sent to neighbor 192.168.0.2 3/10 (UPDATE Message Error/Invalid Network Field) 0 bytes

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
6 years agoMerge pull request #4206 from opensourcerouting/70-bfd-fix-source-port
Mark Stapp [Thu, 25 Apr 2019 21:08:48 +0000 (17:08 -0400)]
Merge pull request #4206 from opensourcerouting/70-bfd-fix-source-port

7.0: bfdd: fix UDP source port range

6 years agobfdd: fix UDP source port range 4206/head
Rafael Zalamena [Thu, 25 Apr 2019 17:41:44 +0000 (14:41 -0300)]
bfdd: fix UDP source port range

RFC 5881 Section 4 tells us that the BFD source port must be between
49152 and 65535 inclusive.

Spotted by Lucian Cristian.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
(cherry picked from commit 545d3f704699ac8a7f6600f0ecb031c68c2c13e8)

6 years agoMerge pull request #4195 from mjstapp/fix_privs_even_more_7_0
Quentin Young [Thu, 25 Apr 2019 18:40:05 +0000 (14:40 -0400)]
Merge pull request #4195 from mjstapp/fix_privs_even_more_7_0

[7.0] lib: control privs changes with refcount

6 years agoMerge pull request #4196 from mjstapp/fix_privs_uninit_7_0
Quentin Young [Wed, 24 Apr 2019 20:59:44 +0000 (16:59 -0400)]
Merge pull request #4196 from mjstapp/fix_privs_uninit_7_0

[7.0] lib: fix uninit and incorrect array-size in privs.c

6 years agolib: fix uninit and incorrect array-size in privs.c 4196/head
Mark Stapp [Wed, 24 Apr 2019 19:25:48 +0000 (15:25 -0400)]
lib: fix uninit and incorrect array-size in privs.c

Double commit of PR 3805 to 7.0.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agolib: control privs changes with refcount 4195/head
Mark Stapp [Wed, 24 Apr 2019 19:20:02 +0000 (15:20 -0400)]
lib: control privs changes with refcount

Use a refcount to control privs changes. Support process-wide
privs apis, as well as per-pthread apis. Double-commit of
PR 4057.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agoMerge pull request #4188 from ton31337/feature/validate_regexp_in_show_bgp
Quentin Young [Wed, 24 Apr 2019 17:15:03 +0000 (13:15 -0400)]
Merge pull request #4188 from ton31337/feature/validate_regexp_in_show_bgp

bgpd: [7.0] Validate as-path in `show bgp regexp`

6 years agobgpd: Validate as-path in `show bgp regexp` 4188/head
Donatas Abraitis [Thu, 18 Apr 2019 07:17:57 +0000 (10:17 +0300)]
bgpd: Validate as-path in `show bgp regexp`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
6 years agoMerge pull request #4182 from ton31337/fix/backslash_backport_for_as-path_filter_7.0
Donald Sharp [Tue, 23 Apr 2019 14:26:55 +0000 (10:26 -0400)]
Merge pull request #4182 from ton31337/fix/backslash_backport_for_as-path_filter_7.0

bgpd: [7.0] Allow backslash in as-path filter lists

6 years agobgpd: Allow backslash in as-path filter lists 4182/head
Donatas Abraitis [Thu, 18 Apr 2019 06:59:51 +0000 (09:59 +0300)]
bgpd: Allow backslash in as-path filter lists

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
6 years agoMerge pull request #4098 from donaldsharp/override_intf_7.0
Russ White [Thu, 11 Apr 2019 21:46:52 +0000 (17:46 -0400)]
Merge pull request #4098 from donaldsharp/override_intf_7.0

[7.0]bgpd: interface based peers should automatically override it's peer g…

6 years agoMerge pull request #4120 from pacovn/201904_7.0__pw_fixes
Donald Sharp [Thu, 11 Apr 2019 12:20:17 +0000 (08:20 -0400)]
Merge pull request #4120 from pacovn/201904_7.0__pw_fixes

zebra: pseudowire event recovery (DoS fix) [7.0]

6 years agozebra: pseudowire event recovery (DoS fix) 4120/head
F. Aragon [Wed, 10 Apr 2019 17:08:50 +0000 (19:08 +0200)]
zebra: pseudowire event recovery (DoS fix)

When having a route recovery, because of the route installation
cycling and the next hop label check, it could happen that the PW
never gets recovered. The original code shows the intention of retrying,
but the code was missing. The fix includes the call to the timer programming
the recovery attempt.

Example for reproducing the issue:

      |P1|  <->  |P2|  <->  |P3|

- Being P1, P2, P3 nodes, using IS-IS as IGP, and having a pseudowire
betwen P1 and P3 (P1, P2, P3 having configured LDP daemons).
- After 60 seconds, kill the IS-IS daemon in P2.
- Wait 30 seconds
- Launch again the IS-IS daemon in P2
- The bug/issue is that after P1 <-> P3 recovering connectivity sometimes
  the PW is not recovered because the reason explained in the first paragraph.

Signed-off-by: F. Aragon <paco@voltanet.io>
6 years agoMerge pull request #4109 from pacovn/201904_7.0__lm_aliasing_fixes
Donald Sharp [Tue, 9 Apr 2019 17:52:44 +0000 (13:52 -0400)]
Merge pull request #4109 from pacovn/201904_7.0__lm_aliasing_fixes

zebra: label manager race condition fix  (7.0 branch)

6 years agozebra: label manager race condition fix 4109/head
F. Aragon [Fri, 5 Apr 2019 13:26:14 +0000 (15:26 +0200)]
zebra: label manager race condition fix

This fix covers the case where two or more events are processed but only one
becoming effective. E.g. when mixing a synchronous label request from a LDP
deamon and an asynchronous request from a BGP daemon it could happen to the
BGP having the label chunk, but the LDP stuck waiting for the response.

Given e.g.

  ldpd     <-------->
  (sync label request)
                       Zebra (label proxy)  <-->  Zebra (shared label manager)
  bgpd     <-------->
  (async label request)

Sequence:

   LDP label request ----->
                               Zebra (label proxy FW) ----> Zebra (LM)
   BGP label request ----->
                               Zebra (label proxy FW) ----> Zebra (LM)
                                                      <---- Zebra (LM) RP LDP
                                                      <---- Zebra (LM) RP BGP

Signed-off-by: F. Aragon <paco@voltanet.io>
6 years agobgpd: interface based peers should automatically override it's peer group 4098/head
Donald Sharp [Wed, 28 Nov 2018 23:46:36 +0000 (18:46 -0500)]
bgpd: interface based peers should automatically override it's peer group

When a interface based peer is setup and if it is part of a peer
group we should ignore this and just use the PEER_FLAG_CAPABILITY_ENHE
no matter what.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #4089 from ton31337/stable/7.0
Donald Sharp [Fri, 5 Apr 2019 12:14:17 +0000 (08:14 -0400)]
Merge pull request #4089 from ton31337/stable/7.0

bgpd: [7.0] Remove private AS numbers if local-as is defined

6 years agobgpd: Remove private AS numbers if local-as is defined 4089/head
Donatas Abraitis [Sat, 2 Mar 2019 20:36:31 +0000 (22:36 +0200)]
bgpd: Remove private AS numbers if local-as is defined

When using remove-private-AS together with local-as
aspath_remove_private_asns() is called before bgp_packet_attribute().

In this case, private AS will always appear in front of change_local_as.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
6 years agoMerge pull request #4049 from donaldsharp/interface_deletion_7.0
Renato Westphal [Sat, 30 Mar 2019 03:23:22 +0000 (00:23 -0300)]
Merge pull request #4049 from donaldsharp/interface_deletion_7.0

bfdd, nhrpd, pimd: When deleting an interface clean up

6 years agobfdd, nhrpd, pimd: When deleting an interface clean up 4049/head
Donald Sharp [Fri, 29 Mar 2019 02:08:37 +0000 (22:08 -0400)]
bfdd, nhrpd, pimd: When deleting an interface clean up

When we delete an interface, we need to set the interface
ifindex to an internal value so that we don't end up in
a state where the re-addition of the same ifindex, due to
a rename operation, causes an infinite loop.

Fixes:#4007
Fix-Suggested-by: Saravanan K
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #4039 from manuhalo/fix-lu-bgp-7.0
Donald Sharp [Fri, 29 Mar 2019 00:18:15 +0000 (20:18 -0400)]
Merge pull request #4039 from manuhalo/fix-lu-bgp-7.0

[7.0] bgpd: fix show bgp labeled_unicast

6 years agobgpd: fix show bgp labeled_unicast 4039/head
Emanuele Di Pascale [Thu, 28 Mar 2019 16:02:33 +0000 (17:02 +0100)]
bgpd: fix show bgp labeled_unicast

while labeled_unicast routes should be fetched in the
unicast table, we cannot set the safi to SAFI_UNICAST
else the peer afc checks and subgroup retrieval will fail

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
6 years agoMerge pull request #3961 from donaldsharp/connected_7.0
Mark Stapp [Thu, 28 Mar 2019 14:18:01 +0000 (10:18 -0400)]
Merge pull request #3961 from donaldsharp/connected_7.0

Connected 7.0

6 years agozebra: System routes sometimes can not be properly selected 3961/head
Donald Sharp [Mon, 11 Mar 2019 13:39:19 +0000 (09:39 -0400)]
zebra: System routes sometimes can not be properly selected

System Routes if received over the netlink bus in a
specific pattern that causes an update operation for that
route in zebra can leave the dest->selected_fib pointer NULL,
while having the ZEBRA_FLAG_SELECTED flag set. Specifically
one way to achieve this is to do this:

`ip addr del 4.5.6.7/32 dev swp1 ; ip addr add 4.5.6.7/32 dev swp1 metric 9`

Why is this a big deal?
Because nexthop tracking is looking at ZEBRA_FLAG_SELECTED to
know if we can use a route, while nexthop active checking uses
dest->selected_fib.

So imagine we have bgp registering a nexthop. nexthop tracking in
the above case will be able to choose the 4.5.6.7/32 route
if that is what the nexthop is, due to the ZEBRA_FLAG_SELECTED being
properly set. BGP then allows the peers connection to come up and we
install routes with a 4.5.6.7 nexthop. The rib processing for route
installation will then look at the 4.5.6.7 route see no
dest->selected_fib and then start walking up the tree to resolve
the route. In our case we could easily hit the default route and be
unable to resolve the route. Which then becomes inactive in the
rib so we never attempt to install it.

This commit fixes this problem because when the rib_process decides
that we need to update the fib( ie replace old w/ new ), the
replacement with new was not setting the `dest->selected_fib` pointer
to the new route_entry, when the route was a system route.

Ticket: CM-24203
Signed-off-by: Donald Sharp <sharpd@cumulusnetworkscom>
6 years agozebra: set connected route metric based on the devaddr metric
Anuradha Karuppiah [Mon, 14 Jan 2019 23:45:33 +0000 (15:45 -0800)]
zebra: set connected route metric based on the devaddr metric

MACVLAN devices are typically used for applications such as VRR/VRRP that
require a second MAC address (virtual). These devices have a corresponding
SVI/VLAN device -
root@TORC11:~# ip addr show vlan1002
39: vlan1002@bridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9152 qdisc noqueue master vrf1 state UP group default
    link/ether 00:02:00:00:00:2e brd ff:ff:ff:ff:ff:ff
    inet6 2001:aa:1::2/64 scope global
       valid_lft forever preferred_lft forever
root@TORC11:~# ip addr show vlan1002-v0
40: vlan1002-v0@vlan1002: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9152 qdisc noqueue master vrf1 state UP group default
    link/ether 00:00:5e:00:01:01 brd ff:ff:ff:ff:ff:ff
    inet6 2001:aa:1::a/64 metric 1024 scope global
       valid_lft forever preferred_lft forever
root@TORC11:~#

The macvlan device is used primarily for RX (VR-IP/VR-MAC). And TX is via
the SVI. To acheive that functionality the macvlan network's metric
is set to a higher value.

Zebra currently ignores the devaddr metric sent by the kernel and hardcodes
it to 0. This commit eliminates that hardcoding. If the devaddr metric
is available (METRIC_MAX) it is used for setting up the connected route
otherwise we fallback to the dev/interface metric.

Setting the macvlan metric to a higher value ensures that zebra will always
select the connected route on the SVI (and subsequently use it for next hop
resolution etc.) -
root@TORC11:~# vtysh -c "show ip route vrf vrf1 2001:aa:1::/64"
Routing entry for 2001:aa:1::/64
  Known via "connected", distance 0, metric 1024, vrf vrf1
  Last update 11:30:56 ago
  * directly connected, vlan1002-v0

Routing entry for 2001:aa:1::/64
  Known via "connected", distance 0, metric 0, vrf vrf1, best
  Last update 11:30:56 ago
  * directly connected, vlan1002

root@TORC11:~#

Ticket: CM-23511
Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
6 years agozebra: display metric for connected routes
Anuradha Karuppiah [Mon, 14 Jan 2019 23:56:30 +0000 (15:56 -0800)]
zebra: display metric for connected routes

In a VRR/VRRP setup we can have connected routes with different costs.
So this change eliminates suppressing metric display for connected routes.

Sample output -
root@TORC11:~# vtysh -c "show ipv6 route vrf vrf1"
Codes: K - kernel route, C - connected, S - static, R - RIPng,
       O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table,
       v - VNC, V - VNC-Direct, A - Babel, D - SHARP, F - PBR,
       > - selected route, * - FIB route

VRF vrf1:
K * ::/0 [255/8192] unreachable (ICMP unreachable), 00:00:36
C * 2001:aa:1::/64 [0/100] is directly connected, vlan1002-v0, 00:00:36
C>* 2001:aa:1::/64 [0/90] is directly connected, vlan1002, 00:00:36

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
6 years agoMerge pull request #4016 from rtrlib/rpki_prefix_lookup_stable_7_0
David Lamparter [Tue, 26 Mar 2019 15:59:27 +0000 (16:59 +0100)]
Merge pull request #4016 from rtrlib/rpki_prefix_lookup_stable_7_0

bgpd: add command to lookup prefixes in the rpki table (stable/7.0)

6 years agobgpd: add command to lookup prefixes in the rpki table 4016/head
Marcel Röthke [Sat, 23 Mar 2019 10:57:09 +0000 (11:57 +0100)]
bgpd: add command to lookup prefixes in the rpki table

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
6 years agoMerge pull request #3990 from opensourcerouting/7.0/redhat-new-init
Donald Sharp [Mon, 25 Mar 2019 11:45:20 +0000 (07:45 -0400)]
Merge pull request #3990 from opensourcerouting/7.0/redhat-new-init

[7.0] redhat: switch to new init script

6 years agotools/frrcommon.sh: ignore 'declare' failures 3990/head
David Lamparter [Sun, 24 Mar 2019 14:52:02 +0000 (15:52 +0100)]
tools/frrcommon.sh: ignore 'declare' failures

The "declare -p watchfrr_options" call is just to support backwards
compatibility.  If it fails, silently ignore that.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agoredhat: switch to new init script
David Lamparter [Mon, 18 Feb 2019 23:44:01 +0000 (00:44 +0100)]
redhat: switch to new init script

Drop the special versions of frr.init/frr.service/daemons from redhat/
and use the generic versions instead.

Tested-by: Liam McBirnie <liam.mcbirnie@boeing.com>
Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agoMerge pull request #3955 from donaldsharp/dest_selected_7.0
Sri Mohana Singamsetty [Sun, 17 Mar 2019 17:41:38 +0000 (10:41 -0700)]
Merge pull request #3955 from donaldsharp/dest_selected_7.0

zebra: Allow json output to give a bit more data

6 years agoMerge pull request #3956 from mjstapp/fix_ospf_json_70
Donald Sharp [Fri, 15 Mar 2019 16:15:21 +0000 (12:15 -0400)]
Merge pull request #3956 from mjstapp/fix_ospf_json_70

ospfd: [7.0] fix some json timer output

6 years agoMerge pull request #3917 from AkhileshSamineni/show_bgp_ipv6_summary_fix_7.0
Donald Sharp [Fri, 15 Mar 2019 14:00:07 +0000 (10:00 -0400)]
Merge pull request #3917 from AkhileshSamineni/show_bgp_ipv6_summary_fix_7.0

[7.0] bgpd: Incorrect number of peers count in "show bgp ipv6 summary output

6 years agoospfd: fix some json timer output 3956/head
Mark Stapp [Fri, 15 Mar 2019 13:40:38 +0000 (09:40 -0400)]
ospfd: fix some json timer output

Fix a few json output values: a few are in seconds, not msecs,
and one is a number-per-second, not a duration [7.0 version].

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: Allow json output to give a bit more data 3955/head
Donald Sharp [Sun, 10 Mar 2019 01:28:49 +0000 (20:28 -0500)]
zebra: Allow json output to give a bit more data

The dest->selected_fib should be reported in json output
so that we can debug subtle conditions a bit better in the
future.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #3901 from opensourcerouting/7.0-ripd-fix-no-passive-iface
Donald Sharp [Fri, 15 Mar 2019 12:39:26 +0000 (08:39 -0400)]
Merge pull request #3901 from opensourcerouting/7.0-ripd-fix-no-passive-iface

[7.0] ripd: fix removal of configured passive interfaces

6 years agoMerge pull request #3934 from ton31337/fix/add_missing_ipv6_only_peer_flag_action
Donald Sharp [Fri, 15 Mar 2019 12:35:54 +0000 (08:35 -0400)]
Merge pull request #3934 from ton31337/fix/add_missing_ipv6_only_peer_flag_action

bgpd: [7.0] Add peer action for PEER_FLAG_IFPEER_V6ONLY flag

6 years agoMerge pull request #3948 from opensourcerouting/70-bfd-fix-linklocal-cli
Donald Sharp [Fri, 15 Mar 2019 12:33:11 +0000 (08:33 -0400)]
Merge pull request #3948 from opensourcerouting/70-bfd-fix-linklocal-cli

7.0: bfdd: fix IPv6 link-local peer removal

6 years agobfdd: remove scope-id from the session key 3948/head
Rafael Zalamena [Thu, 14 Mar 2019 15:28:07 +0000 (12:28 -0300)]
bfdd: remove scope-id from the session key

Unbreaks CLI ability to remove IPv6 sessions using link-local
addresses. This moves the scope-id logic to the packet sending
functions.

6 years agoMerge pull request #3939 from donaldsharp/ospf_1000_club_7.0
Olivier Dugeon [Wed, 13 Mar 2019 16:57:53 +0000 (17:57 +0100)]
Merge pull request #3939 from donaldsharp/ospf_1000_club_7.0

[7.0] ospfd: When converting to ms divide by 1000