]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years ago*: 6.0.3 release frr-6.0.3
Quentin Young [Tue, 7 May 2019 20:14:44 +0000 (20:14 +0000)]
*: 6.0.3 release

* bgpd: Fix 'show bgp ipv4/ipv6 neighbors' to show only v4 or v6 neighbors
* bgpd: Fix display issue when showing labeled-unicast routes
* bgpd: Fix incorrect # peers in 'show bgp ipv6 summary' output
* bgpd: Fix issue with remote-private-as in combination with local-as
* bgpd: Fix memory error when prepending to AS-path
* bgpd: Improve error handling when using maximum-prefix
* ldpd: Fix startup permissions error on OpenBSD
* ldpd: add support for FreeBSD IP_BINDANY
* ospfd: Fix incorrect display of millisecond time values
* tools: Fix incorrect systemd dependencies causing failure to start on boot
* vtysh: Fix unnecessary reconnection under multi-instance OSPF
* watchfrr: Fix multi-instance support when using new init script
* zebra: Fix a display bug in 'show ip route ... json'
* zebra: Fix compilation issue on OpenBSD
* zebra: Fix issue with missed selection of system-sourced routes
* zebra: Fix race condition in label manager
* zebra: Reliability improvements to pseudowire route recovery
* zebra: Tweak metric values for macvlan devices

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
4 years agoMerge pull request #4254 from opensourcerouting/fixes-for-6.0
Donald Sharp [Fri, 3 May 2019 23:34:30 +0000 (19:34 -0400)]
Merge pull request #4254 from opensourcerouting/fixes-for-6.0

 [6.0] ldpd: *BSD fixes

4 years agoldpd: add support for FreeBSD IP_BINDANY
Rafael Zalamena [Fri, 21 Dec 2018 14:27:44 +0000 (12:27 -0200)]
ldpd: add support for FreeBSD IP_BINDANY

Add yet another way to setsockopt a socket to listen to a foreign
address.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agozebra: fix compilation on OpenBSD
Rafael Zalamena [Fri, 21 Dec 2018 19:03:05 +0000 (17:03 -0200)]
zebra: fix compilation on OpenBSD

OpenBSD doesn't define RTM_LOCK anymore:
https://marc.info/?l=openbsd-tech&m=153018811429193&w=2

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoldpd: fix startup on OpenBSD
Rafael Zalamena [Fri, 21 Dec 2018 22:59:18 +0000 (20:59 -0200)]
ldpd: fix startup on OpenBSD

We must open the PF_KEY socket before dropping privileges, otherwise the
socket creation will fail with permission problems.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #4224 from ton31337/stable/6.0
Donald Sharp [Tue, 30 Apr 2019 00:09:07 +0000 (20:09 -0400)]
Merge pull request #4224 from ton31337/stable/6.0

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

5 years agobgpd: Do not send UPDATE message with maximum-prefix
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>
5 years agoMerge pull request #4211 from ton31337/feature/all_alias_for_force_next_self_host_6.0
Quentin Young [Mon, 29 Apr 2019 16:56:03 +0000 (12:56 -0400)]
Merge pull request #4211 from ton31337/feature/all_alias_for_force_next_self_host_6.0

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

5 years agobgpd: Make sure `next-hop-self all` backward compatible with force
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>
5 years agoMerge pull request #3811 from AkhileshSamineni/show_bgp_ipv6_summary_fix
Quentin Young [Sun, 21 Apr 2019 22:11:36 +0000 (18:11 -0400)]
Merge pull request #3811 from AkhileshSamineni/show_bgp_ipv6_summary_fix

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

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

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

5 years agozebra: pseudowire event recovery (DoS fix)
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>
5 years agoMerge pull request #4108 from pacovn/201904_6.0__lm_aliasing_fixes
Donald Sharp [Tue, 9 Apr 2019 17:52:34 +0000 (13:52 -0400)]
Merge pull request #4108 from pacovn/201904_6.0__lm_aliasing_fixes

zebra: label manager race condition fix (6.0 branch)

5 years agozebra: label manager race condition fix
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>
5 years agoMerge pull request #4090 from ton31337/stable/6.0
Donald Sharp [Fri, 5 Apr 2019 12:14:27 +0000 (08:14 -0400)]
Merge pull request #4090 from ton31337/stable/6.0

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

5 years agobgpd: Remove private AS numbers if local-as is defined
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>
5 years agoMerge pull request #4050 from donaldsharp/interface_deletion_6.0
Renato Westphal [Sat, 30 Mar 2019 03:19:46 +0000 (00:19 -0300)]
Merge pull request #4050 from donaldsharp/interface_deletion_6.0

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

5 years agobfdd, nhrpd, pimd: When deleting an interface clean up
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>
5 years agoMerge pull request #4036 from manuhalo/fix-lu-bgp-6.0
Donald Sharp [Fri, 29 Mar 2019 00:17:56 +0000 (20:17 -0400)]
Merge pull request #4036 from manuhalo/fix-lu-bgp-6.0

[6.0] bgpd: fix show bgp labeled_unicast

5 years agobgpd: fix show bgp labeled_unicast
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>
5 years agoMerge pull request #3991 from opensourcerouting/6.0/redhat-new-init
Donald Sharp [Tue, 26 Mar 2019 15:43:37 +0000 (11:43 -0400)]
Merge pull request #3991 from opensourcerouting/6.0/redhat-new-init

[6.0] redhat: switch to new init script

5 years agotools/frrcommon.sh: ignore 'declare' failures
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>
5 years agoMerge pull request #3884 from ton31337/stable/6.0
Donald Sharp [Fri, 22 Mar 2019 06:26:28 +0000 (02:26 -0400)]
Merge pull request #3884 from ton31337/stable/6.0

bgpd: [6.0] Add peer action for PEER_FLAG_IFPEER_V6ONLY flag

5 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>
5 years agoMerge pull request #3959 from donaldsharp/connected_6.0
Jafar Al-Gharaibeh [Tue, 19 Mar 2019 05:11:37 +0000 (00:11 -0500)]
Merge pull request #3959 from donaldsharp/connected_6.0

Connected 6.0

5 years agoMerge pull request #3957 from mjstapp/fix_ospf_json_60
Donald Sharp [Fri, 15 Mar 2019 16:15:38 +0000 (12:15 -0400)]
Merge pull request #3957 from mjstapp/fix_ospf_json_60

ospfd: [6.0] fix some json timer output

5 years agozebra: System routes sometimes can not be properly selected
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>
5 years agoospfd: fix some json timer output
Mark Stapp [Fri, 15 Mar 2019 13:46:40 +0000 (09:46 -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. [6.0 version]

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agozebra: `show ip route A.B.C.D json` would only show last route entry
Donald Sharp [Wed, 5 Dec 2018 20:12:50 +0000 (15:12 -0500)]
zebra: `show ip route A.B.C.D json` would only show last route entry

The `show ip route A.B.C.D json` command was only displaying
the last route entry looked at and we would drop the data
associated with other route entries.  This fixes the issue:

robot# show ip route
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

K>* 0.0.0.0/0 [0/100] via 192.168.201.1, enp3s0, 00:13:31
C>* 4.50.50.50/32 is directly connected, lo, 00:13:31
D   10.0.0.1/32 [150/0] via 192.168.201.1, enp3s0, 00:09:46
S>* 10.0.0.1/32 [1/0] via 192.168.201.1, enp3s0, 00:10:04
C>* 192.168.201.0/24 is directly connected, enp3s0, 00:13:31
robot# show ip route 10.0.0.1 json
{
  "10.0.0.1\/32":[
    {
      "prefix":"10.0.0.1\/32",
      "protocol":"sharp",
      "distance":150,
      "metric":0,
      "internalStatus":0,
      "internalFlags":1,
      "uptime":"00:09:50",
      "nexthops":[
        {
          "flags":1,
          "ip":"192.168.201.1",
          "afi":"ipv4",
          "interfaceIndex":2,
          "interfaceName":"enp3s0",
          "active":true
        }
      ]
    },
    {
      "prefix":"10.0.0.1\/32",
      "protocol":"static",
      "selected":true,
      "distance":1,
      "metric":0,
      "internalStatus":0,
      "internalFlags":2064,
      "uptime":"00:10:08",
      "nexthops":[
        {
          "flags":3,
          "fib":true,
          "ip":"192.168.201.1",
          "afi":"ipv4",
          "interfaceIndex":2,
          "interfaceName":"enp3s0",
          "active":true
        }
      ]
    }
  ]
}
robot#

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Allow json output to give a bit more data
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>
5 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>
5 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>
5 years agoMerge pull request #3938 from donaldsharp/ospf_1000_club_6.0
Olivier Dugeon [Wed, 13 Mar 2019 16:56:51 +0000 (17:56 +0100)]
Merge pull request #3938 from donaldsharp/ospf_1000_club_6.0

ospfd: When converting to ms divide by 1000

5 years agoospfd: When converting to ms divide by 1000
Donald Sharp [Wed, 13 Mar 2019 00:44:31 +0000 (20:44 -0400)]
ospfd: When converting to ms divide by 1000

When converting to miliseconds divide by 1000 not
the other way around.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3755 from kirankella/show_bgp_neigh_af_fix
David Lamparter [Mon, 11 Mar 2019 18:44:14 +0000 (19:44 +0100)]
Merge pull request #3755 from kirankella/show_bgp_neigh_af_fix

[6.0] bgpd: 'show bgp [ipv4|ipv6] neighbors' displays all address family neighbors

5 years agobgpd: Add peer action for PEER_FLAG_IFPEER_V6ONLY flag
Donatas Abraitis [Mon, 25 Feb 2019 19:16:02 +0000 (21:16 +0200)]
bgpd: Add peer action for PEER_FLAG_IFPEER_V6ONLY flag

peer_flag_modify() will always return BGP_ERR_INVALID_FLAG because
the action was not defined for PEER_FLAG_IFPEER_V6ONLY flag.

```
global PEER_FLAG_IFPEER_V6ONLY = 16384;
global BGP_ERR_INVALID_FLAG = -2;

probe process("/usr/lib/frr/bgpd").statement("peer_flag_modify@/root/frr/bgpd/bgpd.c:3975")
{
if ($flag == PEER_FLAG_IFPEER_V6ONLY && $action->type == 0)
printf("action not found for the flag PEER_FLAG_IFPEER_V6ONLY\n");
}

probe process("/usr/lib/frr/bgpd").function("peer_flag_modify").return
{
if ($return == BGP_ERR_INVALID_FLAG)
printf("return BGP_ERR_INVALID_FLAG\n");
}
```
produces:
action not found for the flag PEER_FLAG_IFPEER_V6ONLY
return BGP_ERR_INVALID_FLAG

$ vtysh -c 'conf t' -c 'router bgp 20' -c 'neighbor eth1 interface v6only remote-as external'

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: 'show bgp [ipv4|ipv6] neighbors' displays all af neighbors
Kiran Kella [Fri, 8 Feb 2019 07:25:25 +0000 (12:55 +0530)]
bgpd: 'show bgp [ipv4|ipv6] neighbors' displays all af neighbors

- Display only ipv4 neighbors when 'show bgp ipv4 neighbors' command is
  issued.
- Display only ipv6 neighbors when 'show bgp ipv6 neighbors'
  command is issued.
- Take the address family of the peer address into account, while
  displaying the neighbors.

Signed-off-by: Kiran Kella <kiran.kella@broadcom.com>
5 years agoMerge pull request #3814 from opensourcerouting/6.0/doc-pager-theme
Donald Sharp [Tue, 19 Feb 2019 17:41:41 +0000 (12:41 -0500)]
Merge pull request #3814 from opensourcerouting/6.0/doc-pager-theme

[6.0] doc: VTYSH_PAGER docs + new FRR theme

5 years agoMerge pull request #3826 from opensourcerouting/6.0/init-multi-instance
Donald Sharp [Tue, 19 Feb 2019 00:48:59 +0000 (19:48 -0500)]
Merge pull request #3826 from opensourcerouting/6.0/init-multi-instance

[6.0] tools: fix new init script wrt. multi-instance

5 years agotools: fix new init script wrt. multi-instance
David Lamparter [Mon, 18 Feb 2019 23:27:45 +0000 (00:27 +0100)]
tools: fix new init script wrt. multi-instance

TBH when I looked at watchfrr I didn't see any MI support and hence
assumed this just didn't work to begin with.  However, it actually does
(transparently to watchfrr, by just using "ospfd-1" as daemon name.)

So, fix this up and make it work again.

(Also remove 2 extraneous \n in messages.)

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodoc: document VTYSH_PAGER and "terminal paginate"
David Lamparter [Mon, 18 Feb 2019 13:23:03 +0000 (14:23 +0100)]
doc: document VTYSH_PAGER and "terminal paginate"

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodoc: orange FRR theme
David Lamparter [Mon, 18 Feb 2019 12:57:43 +0000 (13:57 +0100)]
doc: orange FRR theme

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3807 from donaldsharp/vtysh_ospf_6.0
David Lamparter [Mon, 18 Feb 2019 12:06:39 +0000 (13:06 +0100)]
Merge pull request #3807 from donaldsharp/vtysh_ospf_6.0

[6.0] vtysh: Don't attempt to reconnect the non-instanced ospf process

5 years agoMerge branch 'show_bgp_ipv6_summary_fix' of https://github.com/AkhileshSamineni/frr...
Akhilesh Samineni [Sun, 17 Feb 2019 07:12:07 +0000 (12:42 +0530)]
Merge branch 'show_bgp_ipv6_summary_fix' of https://github.com/AkhileshSamineni/frr into show_bgp_ipv6_summary_fix

5 years agobgpd: Incorrect number of peers count in "show bgp ipv6 summary" output
Akhilesh Samineni [Fri, 15 Feb 2019 16:50:51 +0000 (22:20 +0530)]
bgpd: Incorrect number of peers count in "show bgp ipv6 summary" output

Fix : Now the peers count displays the number of neighbors activated per afi/safi.

Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
5 years agobgpd: Incorrect number of peers count in "show bgp ipv6 summary" output
Akhilesh Samineni [Fri, 15 Feb 2019 16:50:51 +0000 (22:20 +0530)]
bgpd: Incorrect number of peers count in "show bgp ipv6 summary" output

Fix : Now the peers count displays the number of neighbors activated per afi/safi.

Signed-off-by: Akhilesh Samineni <akhilesh.samineni@broadcom.com>
5 years agovtysh: Don't attempt to reconnect the non-instanced ospf process
Donald Sharp [Wed, 21 Nov 2018 21:13:25 +0000 (16:13 -0500)]
vtysh: Don't attempt to reconnect the non-instanced ospf process

When running ospf instances we should not attempt to reconnect
the default ospf instance on running a command.

This commit should be targeted enough because in the case
of normal operation we connect to everything we should
and only set the VTYSH_WAS_ACTIVE flag for those we
truly have lost connection too.

Before:

donna.cumulusnetworks.com# config t
donna.cumulusnetworks.com(config)# router ospf 100
Warning: connecting to ospfd...failed!
donna.cumulusnetworks.com(config-router)#

After:
donna.cumulusnetworks.com# conf t
donna.cumulusnetworks.com(config)# router ospf 100
donna.cumulusnetworks.com(config-router)# end
donna.cumulusnetworks.com#

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3785 from qlyoung/fix-aspath-prepend-heap-uaf-6.0.3
Renato Westphal [Wed, 13 Feb 2019 14:09:30 +0000 (12:09 -0200)]
Merge pull request #3785 from qlyoung/fix-aspath-prepend-heap-uaf-6.0.3

[6.0] bgpd: fix as-path prepend heap uaf

5 years agobgpd: fix as-path prepend heap uaf
Quentin Young [Tue, 29 Jan 2019 16:13:39 +0000 (16:13 +0000)]
bgpd: fix as-path prepend heap uaf

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #3717 from qlyoung/fix-systemd-deps-6.0.3
David Lamparter [Mon, 11 Feb 2019 06:50:31 +0000 (07:50 +0100)]
Merge pull request #3717 from qlyoung/fix-systemd-deps-6.0.3

[6.0.3] tools: fix systemd dependency graph

5 years agoMerge pull request #3742 from manuhalo/log_hook_6.0
Renato Westphal [Sat, 9 Feb 2019 01:54:38 +0000 (23:54 -0200)]
Merge pull request #3742 from manuhalo/log_hook_6.0

[6.0.3] lib: add hooks for external logging function

5 years agoMerge pull request #3751 from opensourcerouting/6.0/rpki-fixes
Donald Sharp [Thu, 7 Feb 2019 22:25:36 +0000 (17:25 -0500)]
Merge pull request #3751 from opensourcerouting/6.0/rpki-fixes

[6.0] RPKI fixes

5 years agobgpd: fix crash when trying to remove non-existing rpki cache
Marcel Röthke [Thu, 7 Feb 2019 16:16:19 +0000 (17:16 +0100)]
bgpd: fix crash when trying to remove non-existing rpki cache

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
5 years agobgpd: fix "show rpki cache-server" for ssh caches
Marcel Röthke [Thu, 7 Feb 2019 16:12:16 +0000 (17:12 +0100)]
bgpd: fix "show rpki cache-server" for ssh caches

Fix #3662

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
5 years agotools: fix systemd dependency graph
Quentin Young [Wed, 6 Feb 2019 19:40:55 +0000 (19:40 +0000)]
tools: fix systemd dependency graph

Currently our systemd dependencies look something like this (example
from vanilla Debian 9):

$ systemctl list-dependencies frr
frr.service
● ├─system.slice
● └─sysinit.target
  ...

$ systemctl list-dependencies --reverse frr
frr.service
● └─network-online.target
●   └─apt-daily.service

Note that sysinit.target does not depend on any network* service or
target.

In other words, unless there is a service that requires
network-online.service, even if FRR is enabled it will not be started.
Therefore network-online.target is the wrong unit to have in WantedBy=,
as it is not always started.

This patch updates our service file so that it is properly started by
the system when enabled, delayed until networking is up, and if possible
delayed until after NetworkManager, systemd-networkd or any other
networking configuration manager has finished performing its tasks -
i.e. after network-online.target.

After these changes our new dependency graph looks like this:

$ systemctl list-dependencies frr
frr.service
● ├─system.slice
● │ └─networking.service
● ├─network.target
● └─sysinit.target
  ...

$ systemctl list-dependencies --reverse frr
frr.service
● └─multi-user.target
●   └─graphical.target

This way, FRR will be started by multi-user.target (just like most
applications), but delayed until after networking has been configured.

In the same stroke, this should also fix issues on systems that do not
provide "networking.service" (such as CentOS 7).

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobgpd: Fix format specifier for 4-byte asn print
Kiran Kella [Mon, 4 Feb 2019 07:05:59 +0000 (12:35 +0530)]
bgpd: Fix format specifier for 4-byte asn print

In show ip bgp peer-group, the 4-byte ASN is printed as signed int.
Corrected the format specifier in such places in bgp_vty.c

Signed-off-by: Kiran Kella <kiran.kella@broadcom.com>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: add hooks for external logging function
Emanuele Di Pascale [Fri, 25 Jan 2019 13:40:27 +0000 (14:40 +0100)]
lib: add hooks for external logging function

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agoMerge pull request #3665 from opensourcerouting/6.0/watchfrr-options
Donald Sharp [Thu, 31 Jan 2019 01:12:41 +0000 (20:12 -0500)]
Merge pull request #3665 from opensourcerouting/6.0/watchfrr-options

[6.0] fix watchfrr options

5 years agoMerge pull request #3695 from opensourcerouting/ospfd-fix-argv-index-6.0
Quentin Young [Tue, 29 Jan 2019 18:43:49 +0000 (13:43 -0500)]
Merge pull request #3695 from opensourcerouting/ospfd-fix-argv-index-6.0

[6.0] ospfd: fix wrong argv index in the "show ip ospf neighbor" command

5 years agoospfd: fix wrong argv index in the "show ip ospf neighbor" command
Renato Westphal [Mon, 31 Dec 2018 13:02:49 +0000 (11:02 -0200)]
ospfd: fix wrong argv index in the "show ip ospf neighbor" command

Fixes Issue #3661 (#3544 was fixed on master already).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #3673 from opensourcerouting/60-bfd-24-hour
Quentin Young [Fri, 25 Jan 2019 17:28:18 +0000 (12:28 -0500)]
Merge pull request #3673 from opensourcerouting/60-bfd-24-hour

6.0: bfdd: Fix timer print-out function

5 years agobfdd: Fix timer print-out function
Donald Sharp [Sat, 12 Jan 2019 21:22:32 +0000 (16:22 -0500)]
bfdd: Fix timer print-out function

The timer2str function thought 24 minutes was an hour and had a
couple of other issues that needed to be corrected.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 23586b0552ee08e24d4c1f54bb4913c48c1e14aa)

5 years agoMerge pull request #3666 from opensourcerouting/6.0/fix-file-and-syslog
Quentin Young [Thu, 24 Jan 2019 22:10:24 +0000 (17:10 -0500)]
Merge pull request #3666 from opensourcerouting/6.0/fix-file-and-syslog

[6.0] fix "log file" + "log syslog"

5 years agolib: don't disable "log file" on "log syslog"
David Lamparter [Thu, 24 Jan 2019 17:59:03 +0000 (18:59 +0100)]
lib: don't disable "log file" on "log syslog"

FRR log targets are independent, so "log syslog" must not disable
"log file" output.

Fixes: #3551
Fixes: 0204baa87630b210c71d9ae0e2569cff0fb0539b
Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodoc: update for new daemons settings
David Lamparter [Thu, 24 Jan 2019 17:20:56 +0000 (18:20 +0100)]
doc: update for new daemons settings

watchfrr_enable is ignored, watchfrr_options is unneeded and the
valgrind options have been replaced with daemon_wrap/all_wrap.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agowatchfrr: build in defaults for -r/-s/-k
David Lamparter [Thu, 24 Jan 2019 17:17:40 +0000 (18:17 +0100)]
watchfrr: build in defaults for -r/-s/-k

There's no good reason to not have these options default to the
installation path of tools/watchfrr.sh.  Doing so allows us to ditch
watchfrr_options from daemons/daemons.conf completely.

Fixes: #3652
Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3654 from opensourcerouting/6.0/fixing
Donald Sharp [Wed, 23 Jan 2019 15:14:28 +0000 (10:14 -0500)]
Merge pull request #3654 from opensourcerouting/6.0/fixing

[6.0] fix vtysh pager issues & tarsource submodule support

5 years agovtysh: fix pager compatibility handling
David Lamparter [Wed, 23 Jan 2019 13:15:52 +0000 (14:15 +0100)]
vtysh: fix pager compatibility handling

I just straight up forgot checking VTYSH_PAGER at startup, and the
"terminal paginate" command is only installed to VIEW_NODE so it can't
be processed from vtysh.conf in CONFIG_NODE...

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3647 from opensourcerouting/ldpd-pdu-length-fix-6.0
Donald Sharp [Wed, 23 Jan 2019 00:50:36 +0000 (19:50 -0500)]
Merge pull request #3647 from opensourcerouting/ldpd-pdu-length-fix-6.0

[6.0] ldpd: fix corner case in which we wouldn't respect the max pdu length

5 years agoldpd: fix corner case in which we wouldn't respect the max pdu length
Renato Westphal [Tue, 22 Jan 2019 19:50:33 +0000 (17:50 -0200)]
ldpd: fix corner case in which we wouldn't respect the max pdu length

The calculation to know when an LDP PDU went past the maximum
negotiated PDU length was wrong because it wasn't taking the
"Version" and "PDU Length" fields into account (total of four
bytes). Fix this.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #3626 from manuhalo/fix_ospf_vl_del
Donald Sharp [Tue, 22 Jan 2019 14:08:21 +0000 (09:08 -0500)]
Merge pull request #3626 from manuhalo/fix_ospf_vl_del

[6.0] ospfd: fix no virtual-link cmd

5 years agotools/tarsource.sh: support FRR as a git submodule
David Lamparter [Fri, 18 Jan 2019 14:14:46 +0000 (15:14 +0100)]
tools/tarsource.sh: support FRR as a git submodule

a git submodule will have .git as a file instead of a directory... which
breaks tarsource.sh.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoospfd: fix no virtual-link cmd
Emanuele Di Pascale [Fri, 18 Jan 2019 11:39:28 +0000 (12:39 +0100)]
ospfd: fix no virtual-link cmd

the  command was not checking
correctly in all cases whether the virtual link existed. This caused
bugs in some corner cases, e.g. when two virtual links were created,
one of them was deleted, and the second one was reset with no
authentication - this would instead create a new virtual link with
the area in decimal format.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agoMerge pull request #3592 from manuhalo/ospf-vl-6.0
Donald Sharp [Fri, 11 Jan 2019 00:17:51 +0000 (19:17 -0500)]
Merge pull request #3592 from manuhalo/ospf-vl-6.0

6.0: ospfd: do not remove area structure, while vls are configured

5 years agoospfd: do not remove area structure, while vls are configured
Philippe Guibert [Thu, 25 Oct 2018 07:02:24 +0000 (09:02 +0200)]
ospfd: do not remove area structure, while vls are configured

when adding/removing virtual links per interface, sometimes, the ospf
virtual link can not be removed, whereas the associated area is already
removed. Do not remove the area while a virtual link is yet configured.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoMerge pull request #3586 from pguibert6WIND/fix_vrf_netns_broken_60
Donald Sharp [Tue, 8 Jan 2019 18:27:58 +0000 (13:27 -0500)]
Merge pull request #3586 from pguibert6WIND/fix_vrf_netns_broken_60

zebra: update local ns_id field

5 years agozebra: update local ns_id field
Philippe Guibert [Mon, 7 Jan 2019 08:55:10 +0000 (09:55 +0100)]
zebra: update local ns_id field

ns_id field must be synced with ns_id from netns service.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoFRRouting Release 6.0.2
Martin Winter [Tue, 8 Jan 2019 08:29:22 +0000 (00:29 -0800)]
FRRouting Release 6.0.2

This is a maintenance release for a security (Denial of Service) issue
found with the expermimental BGP VNC Attribute (255).
Other experiments using the same attribute may bring down BGP peers
if they are malformed for the VNC parsing. (As required by RFC).
The update disables the parsing of the VNC attribute by default
to avoid this.

Beside this change, this release is similar to 6.0.1

Major Changes since 6.0 (already in 6.0.1)
 - New Debian Package structure without backports
 - Fix Memory Leak on FreeBSD
 - Fix BGP unnumbered peer setup
 - Various fixes for label manager
 - Various other fixes

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agoMerge pull request #3577 from LabNConsulting/working/6.0/no-bgp-attr-255
Donald Sharp [Mon, 7 Jan 2019 22:31:25 +0000 (17:31 -0500)]
Merge pull request #3577 from LabNConsulting/working/6.0/no-bgp-attr-255

6.0: bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined

5 years agobgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined
Lou Berger [Mon, 7 Jan 2019 16:32:54 +0000 (11:32 -0500)]
bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agoMerge pull request #3524 from manuhalo/fix_autoreconf
Donald Sharp [Sat, 5 Jan 2019 01:10:59 +0000 (20:10 -0500)]
Merge pull request #3524 from manuhalo/fix_autoreconf

/: add -f to autoreconf in bootstrap

5 years agoFRRouting Release 6.0.1 frr-6.0.1
Martin Winter [Sat, 29 Dec 2018 12:27:16 +0000 (04:27 -0800)]
FRRouting Release 6.0.1

This is a maintenance release. Main change is the Debian Package format
which is cleaned up as part of getting into the official Debian Packages

Major Changes since 6.0:
- New Debian Package structure without backports
- Fix Memory Leak on FreeBSD
- Fix BGP unnumbered peer setup
- Various fixes for label manager
- Various other fixes

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agoMerge pull request #3536 from opensourcerouting/6.0-kill-backports
Donald Sharp [Thu, 27 Dec 2018 19:02:33 +0000 (14:02 -0500)]
Merge pull request #3536 from opensourcerouting/6.0-kill-backports

6.0 fixes from package testing

5 years agodebian: Don't create homdirectory for frr user
Martin Winter [Fri, 21 Dec 2018 19:06:25 +0000 (11:06 -0800)]
debian: Don't create homdirectory for frr user

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agodoc: Fix path and order in debian package build doc
Martin Winter [Fri, 21 Dec 2018 16:30:48 +0000 (08:30 -0800)]
doc: Fix path and order in debian package build doc

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agodebian/control: add python3-dev dependency
David Lamparter [Fri, 21 Dec 2018 16:02:54 +0000 (17:02 +0100)]
debian/control: add python3-dev dependency

Just forgot to list this one.  libpython3 is not enough.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotools: don't watch nonexistent daemons
David Lamparter [Fri, 21 Dec 2018 16:00:42 +0000 (17:00 +0100)]
tools: don't watch nonexistent daemons

If we try to monitor a nonexisting daemon in watchfrr, it will
(currently) forever wait at startup since the vty connection will never
come up.  Just drop the daemon from the daemon list in such a case.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agowatchfrr: don't wait forever at startup
David Lamparter [Fri, 21 Dec 2018 16:26:25 +0000 (17:26 +0100)]
watchfrr: don't wait forever at startup

If we wait forever for all daemons to come up, we can hang the entire
boot process, especially on init.d based systems.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years ago/: add -f to autoreconf in bootstrap
Emanuele Di Pascale [Fri, 21 Dec 2018 10:23:03 +0000 (11:23 +0100)]
/: add -f to autoreconf in bootstrap

Depending on tool versions used, "autoreconf -i" may not update all
Autoconf-generated files, which in turn may result in build errors.
Make autogen.sh call autoreconf with the "-f" command line argument to
ensure all Autoconf-generated files are updated when autogen.sh is run.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
5 years agoMerge pull request #3461 from opensourcerouting/6.0-kill-backports
Donald Sharp [Wed, 19 Dec 2018 18:38:22 +0000 (13:38 -0500)]
Merge pull request #3461 from opensourcerouting/6.0-kill-backports

[6.0] new debian package

5 years agoMerge pull request #3506 from opensourcerouting/6.0-init-fixes
Donald Sharp [Wed, 19 Dec 2018 00:21:57 +0000 (19:21 -0500)]
Merge pull request #3506 from opensourcerouting/6.0-init-fixes

[6.0] minor tools/ fixes

5 years agoMerge pull request #3504 from qlyoung/fix-bgpd-show-ip-neigh-json-double-free-6.0
David Lamparter [Tue, 18 Dec 2018 17:02:10 +0000 (18:02 +0100)]
Merge pull request #3504 from qlyoung/fix-bgpd-show-ip-neigh-json-double-free-6.0

bgpd: fix json double free when showing neighbors [6.0]

5 years agodebian: fix dropping daemons.conf
David Lamparter [Tue, 18 Dec 2018 01:21:18 +0000 (02:21 +0100)]
debian: fix dropping daemons.conf

Need to apply some manual control here, so remove it from frr.install
and just do it in rules.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: rework autopkgtests
David Lamparter [Mon, 17 Dec 2018 17:55:31 +0000 (18:55 +0100)]
debian: rework autopkgtests

Ditch the old non-working one and add 3 new ones to check:
- that zebra can talk to the kernel at least somewhat
- that SNMP and RPKI modules can be loaded
- that frr-reload.py works

This should catch most build environment SNAFUs.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotools/tarsource.sh: keep version info on non-git
David Lamparter [Mon, 17 Dec 2018 00:02:51 +0000 (01:02 +0100)]
tools/tarsource.sh: keep version info on non-git

extraver won't have any useful value on a non-git run.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotools: update build-debian-package.sh
David Lamparter [Fri, 14 Dec 2018 21:51:37 +0000 (22:51 +0100)]
tools: update build-debian-package.sh

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: keep working nicely with split config
David Lamparter [Fri, 14 Dec 2018 21:43:39 +0000 (22:43 +0100)]
debian: keep working nicely with split config

Drop our configs that say integrated config when there is some
pre-existing split config.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: chop down & rework maintainer scripts
David Lamparter [Tue, 11 Dec 2018 16:02:20 +0000 (17:02 +0100)]
debian: chop down & rework maintainer scripts

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: add python3-pytest build dependency
David Lamparter [Fri, 14 Dec 2018 16:09:15 +0000 (17:09 +0100)]
debian: add python3-pytest build dependency

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotools/tarsource.sh: fix GZIP_ENV
David Lamparter [Fri, 14 Dec 2018 15:59:51 +0000 (16:59 +0100)]
tools/tarsource.sh: fix GZIP_ENV

Some older versions of Automake don't escape this properly.

Signed-off-by: David Lamparter <equinox@diac24.net>