]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoMerge pull request #3800 from chiragshah6/evpn_dev
Sri Mohana Singamsetty [Wed, 27 Feb 2019 21:38:03 +0000 (13:38 -0800)]
Merge pull request #3800 from chiragshah6/evpn_dev

zebra: advertise evpn route upon l3vni svi mac chg

5 years agoMerge pull request #3885 from qlyoung/capabilty
Sri Mohana Singamsetty [Wed, 27 Feb 2019 21:37:31 +0000 (13:37 -0800)]
Merge pull request #3885 from qlyoung/capabilty

bgpd: capabilty

5 years agobgpd: capabilty
Quentin Young [Wed, 27 Feb 2019 18:09:08 +0000 (18:09 +0000)]
bgpd: capabilty

capabilty

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #3880 from vivek-cumulus/evpn_advertise_rmap_fix
Sri Mohana Singamsetty [Wed, 27 Feb 2019 17:59:51 +0000 (09:59 -0800)]
Merge pull request #3880 from vivek-cumulus/evpn_advertise_rmap_fix

bgpd: Fix EVPN advertise route-map application

5 years agoMerge pull request #3872 from dslicenc/frr-reload-vrf-context
Russ White [Wed, 27 Feb 2019 16:16:38 +0000 (11:16 -0500)]
Merge pull request #3872 from dslicenc/frr-reload-vrf-context

tools: keep exit-vrf to change context correctly between vrfs

5 years agobgpd: Fix EVPN advertise route-map application
vivek [Wed, 27 Feb 2019 08:19:06 +0000 (08:19 +0000)]
bgpd: Fix EVPN advertise route-map application

When a IPv4 or IPv6 route that was formerly allowed by the route-map
to be injected into EVPN gets an updated set of attributes that now
causes it to be filtered, the route needs to be pulled out of EVPN.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3844 from opensourcerouting/rpm-new-libyang
Donald Sharp [Tue, 26 Feb 2019 18:40:57 +0000 (13:40 -0500)]
Merge pull request #3844 from opensourcerouting/rpm-new-libyang

redhat: Require newer libyang (> 0.16.74) for embedded extensions

5 years agoMerge pull request #3865 from qlyoung/fix-zebra-vxlan-smelly-strings
Russ White [Tue, 26 Feb 2019 16:08:18 +0000 (11:08 -0500)]
Merge pull request #3865 from qlyoung/fix-zebra-vxlan-smelly-strings

zebra: replace strncpy with strlcpy

5 years agoMerge pull request #3866 from donaldsharp/ospf_allow_vrf_starup
Russ White [Tue, 26 Feb 2019 16:03:50 +0000 (11:03 -0500)]
Merge pull request #3866 from donaldsharp/ospf_allow_vrf_starup

ospfd: Allow pre-existing vrf's to work

5 years agoMerge pull request #3868 from ton31337/fix/v6_only_flag
Russ White [Tue, 26 Feb 2019 16:03:14 +0000 (11:03 -0500)]
Merge pull request #3868 from ton31337/fix/v6_only_flag

bgpd: Add peer action for PEER_FLAG_IFPEER_V6ONLY flag

5 years agoMerge pull request #3871 from dslicenc/frr-reload-blackhole
Russ White [Tue, 26 Feb 2019 15:59:31 +0000 (10:59 -0500)]
Merge pull request #3871 from dslicenc/frr-reload-blackhole

tools: fix blackhole static changes in frr-reload.py

5 years agotools: keep exit-vrf to change context correctly between vrfs
Don Slice [Mon, 11 Feb 2019 19:17:40 +0000 (14:17 -0500)]
tools: keep exit-vrf to change context correctly between vrfs

Discovered in testing that if a static route in the default table
was entered immediately after a vrf static block, the static route
intended for the default table was put in the vrf instead.  This
fix retains the "exit-vrf" statement which causes the following
static routes to appear in the default table correctly.

Ticket: CM-23985
Signed-off-by: Don Slice <dslice@cumulusnetwork.com>
5 years agotools: fix blackhole static changes in frr-reload.py
Don Slice [Fri, 25 Jan 2019 18:37:03 +0000 (13:37 -0500)]
tools: fix blackhole static changes in frr-reload.py

Problem caused when nclu is used to create "ip route 1.1.1.0/24
blackhole" because frr-reload.py changed the line to Null0 instead
of blackhole.  If nclu tries to delete it using the same line as
entered, the commit fails since it doesn't match.

Ticket: CM-23986
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #3864 from qlyoung/fix-ospf-mtu-warning-style
Olivier Dugeon [Tue, 26 Feb 2019 08:48:31 +0000 (09:48 +0100)]
Merge pull request #3864 from qlyoung/fix-ospf-mtu-warning-style

ospfd: fix link MTU warning style

5 years agoMerge pull request #3832 from kooky/rename_backet
Martin Winter [Tue, 26 Feb 2019 01:19:49 +0000 (08:19 +0700)]
Merge pull request #3832 from kooky/rename_backet

Rename backet to bucket

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 agoospfd: Allow pre-existing vrf's to work
Donald Sharp [Mon, 25 Feb 2019 19:10:10 +0000 (14:10 -0500)]
ospfd: Allow pre-existing vrf's to work

When creating a ospf vrf based instance allow it to work
if the vrf has been created *before* we create the ospf
instance.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: remove all instances of strncpy
Quentin Young [Mon, 25 Feb 2019 17:37:34 +0000 (17:37 +0000)]
zebra: remove all instances of strncpy

We have strlcpy.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: add compatibility #define for hash_backet
Quentin Young [Mon, 25 Feb 2019 16:26:56 +0000 (16:26 +0000)]
lib: add compatibility #define for hash_backet

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoospfd: fix link MTU warning style
Quentin Young [Mon, 25 Feb 2019 16:57:13 +0000 (16:57 +0000)]
ospfd: fix link MTU warning style

Kernel style dictates that we do not break log messages across lines

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years ago*: Rename backet to bucket
Tim Bray [Tue, 19 Feb 2019 15:46:52 +0000 (15:46 +0000)]
*: Rename backet to bucket

Presume typo from original author

Signed-off-by: Tim Bray <tim@kooky.org>
5 years agoMerge pull request #3856 from donaldsharp/dplane_use_after_free
Russ White [Sun, 24 Feb 2019 01:09:31 +0000 (20:09 -0500)]
Merge pull request #3856 from donaldsharp/dplane_use_after_free

zebra: Fix use after free in rib_process_result

5 years agozebra: Fix use after free in rib_process_result
Donald Sharp [Sun, 24 Feb 2019 00:58:20 +0000 (19:58 -0500)]
zebra: Fix use after free in rib_process_result

Running zebra after commit 888756b208edc7935705d95b83f9513acc21e78a
in valgrind produces this item:

==17102== Invalid read of size 8
==17102==    at 0x44D84C: rib_dest_from_rnode (rib.h:375)
==17102==    by 0x4546ED: rib_process_result (zebra_rib.c:1904)
==17102==    by 0x45436D: rib_process_dplane_results (zebra_rib.c:3295)
==17102==    by 0x4D0902B: thread_call (thread.c:1607)
==17102==    by 0x4CC3983: frr_run (libfrr.c:1011)
==17102==    by 0x4266F6: main (main.c:473)
==17102==  Address 0x83bd468 is 88 bytes inside a block of size 96 free'd
==17102==    at 0x4A35F54: free (vg_replace_malloc.c:530)
==17102==    by 0x4CCAC00: qfree (memory.c:129)
==17102==    by 0x4D03DC6: route_node_destroy (table.c:501)
==17102==    by 0x4D039EE: route_node_free (table.c:90)
==17102==    by 0x4D03971: route_node_delete (table.c:382)
==17102==    by 0x44D82A: route_unlock_node (table.h:256)
==17102==    by 0x454617: rib_process_result (zebra_rib.c:1882)
==17102==    by 0x45436D: rib_process_dplane_results (zebra_rib.c:3295)
==17102==    by 0x4D0902B: thread_call (thread.c:1607)
==17102==    by 0x4CC3983: frr_run (libfrr.c:1011)
==17102==    by 0x4266F6: main (main.c:473)
==17102==  Block was alloc'd at
==17102==    at 0x4A36FF6: calloc (vg_replace_malloc.c:752)
==17102==    by 0x4CCAA2D: qcalloc (memory.c:110)
==17102==    by 0x4D03D88: route_node_create (table.c:489)
==17102==    by 0x4D0360F: route_node_new (table.c:65)
==17102==    by 0x4D034F8: route_node_set (table.c:74)
==17102==    by 0x4D03486: route_node_get (table.c:327)
==17102==    by 0x4CFB700: srcdest_rnode_get (srcdest_table.c:243)
==17102==    by 0x4545C1: rib_process_result (zebra_rib.c:1872)
==17102==    by 0x45436D: rib_process_dplane_results (zebra_rib.c:3295)
==17102==    by 0x4D0902B: thread_call (thread.c:1607)
==17102==    by 0x4CC3983: frr_run (libfrr.c:1011)
==17102==    by 0x4266F6: main (main.c:473)
==17102==

This is happening because of this order of events:

1) Route is deleted in the main thread and scheduled for rib processing.
2) Rib garbage collection is run and we remove the route node since it
is no longer needed.
3) Data plane returns from the deletion in the kernel and we call
the srcdest_rnode_get function to get the prefix that was deleted.
This recreates a new route node.  This creates a route_node with
a lock count of 1, which we freed via the route_unlock_node call.
Then we continued to use the rn pointer.  Which leaves us with use
after frees.

The solution is, of course, to just move the unlock the node at the
end of the function if we have a route_node.

Fixes: #3854
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3836 from opensourcerouting/debian/master-kill-backports
Donald Sharp [Sat, 23 Feb 2019 23:23:21 +0000 (18:23 -0500)]
Merge pull request #3836 from opensourcerouting/debian/master-kill-backports

[master] debian packaging

5 years agoMerge pull request #3843 from opensourcerouting/cli-fuzzer-fixes
Donald Sharp [Fri, 22 Feb 2019 19:46:54 +0000 (14:46 -0500)]
Merge pull request #3843 from opensourcerouting/cli-fuzzer-fixes

More cli fuzzer fizes

5 years agoMerge pull request #3847 from mjstapp/fix_rnode_unlock
Donald Sharp [Fri, 22 Feb 2019 18:11:32 +0000 (13:11 -0500)]
Merge pull request #3847 from mjstapp/fix_rnode_unlock

zebra: unlock route-node in dplane results handler

5 years agoMerge pull request #3851 from donaldsharp/bgp_routemap_fix
Mark Stapp [Fri, 22 Feb 2019 17:22:16 +0000 (12:22 -0500)]
Merge pull request #3851 from donaldsharp/bgp_routemap_fix

bgpd: Fix compile warning -> error

5 years agobgpd: Fix compile warning -> error
Donald Sharp [Fri, 22 Feb 2019 15:50:14 +0000 (10:50 -0500)]
bgpd: Fix compile warning -> error

The struct prefix *prefix is really a const struct prefix *
This was causing compile warns->errors on some compilers

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3827 from chiragshah6/evpn_dev1
Sri Mohana Singamsetty [Thu, 21 Feb 2019 23:39:43 +0000 (15:39 -0800)]
Merge pull request #3827 from chiragshah6/evpn_dev1

bgpd: vrl source-vrf route map filter

5 years agozebra: advertise evpn route upon l3vni svi mac chg
Chirag Shah [Thu, 14 Feb 2019 02:22:14 +0000 (18:22 -0800)]
zebra: advertise evpn route upon l3vni svi mac chg

L3VNI keeps reference to svi interface (ifp).

When a netlink change received there is no flag
that mac has changed. Currently simply overwrite
interface's (ifp) hw_addr (MAC) field.

For originating EVPN type-2 and type-5 routes due to VNI
MAC change, comparison is required to check existing MAC
vs. netlink change MAC field.

Ticket:CM-23850
Reviewed By:CCR-8283
Testing Done:

Validate EVPN type-5 routes originated upon changing MAC address
of L3VNI's SVI inteface via ip link set cmd.

checked show bgp l2vpn evpn route and Rmac field contains new
MAC address.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agozebra: unlock route-node in dplane results handler
Mark Stapp [Thu, 21 Feb 2019 21:15:14 +0000 (16:15 -0500)]
zebra: unlock route-node in dplane results handler

Unlock the route-node struct we look up while processing
async dataplane results.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #3841 from donaldsharp/pim_test
Jafar Al-Gharaibeh [Thu, 21 Feb 2019 16:41:53 +0000 (10:41 -0600)]
Merge pull request #3841 from donaldsharp/pim_test

Add `test pim keepalive-reset A.B.C.D A.B.C.D` command to pim

5 years agoMerge pull request #3830 from opensourcerouting/cherrypicks
Donald Sharp [Thu, 21 Feb 2019 12:58:34 +0000 (07:58 -0500)]
Merge pull request #3830 from opensourcerouting/cherrypicks

[master] cherrypick backlog

5 years agobgpd: fix the add-path code to understand the mpls-vpn safi
Renato Westphal [Wed, 20 Feb 2019 18:54:32 +0000 (15:54 -0300)]
bgpd: fix the add-path code to understand the mpls-vpn safi

In order to iterate over MPLS VPN routes, it's necessary to use
two nested loops (the outer loop iterates over the MPLS VPN RDs,
and the inner loop iterates over the VPN routes from that RD).

The add-path code wasn't doing this, which was leading to lots of
crashes when add-path was enabled for the MPLS VPN SAFI. This patch
fixes the problem.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: fix null pointer dereference bug
Renato Westphal [Wed, 20 Feb 2019 18:37:29 +0000 (15:37 -0300)]
bgpd: fix null pointer dereference bug

If path->net is NULL in the bgp_path_info_free() function, then
bgpd would crash in bgp_addpath_free_info_data() with the following
backtrace:

 (gdb) bt
 #0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
 #1  0x00007ff7b267a42a in __GI_abort () at abort.c:89
 #2  0x00007ff7b39c1ca0 in core_handler (signo=11, siginfo=0x7ffff66414f0, context=<optimized out>) at lib/sigevent.c:249
 #3  <signal handler called>
 #4  idalloc_free_to_pool (pool_ptr=pool_ptr@entry=0x0, id=3) at lib/id_alloc.c:368
 #5  0x0000560096246688 in bgp_addpath_free_info_data (d=d@entry=0x560098665468, nd=0x0) at bgpd/bgp_addpath.c:100
 #6  0x00005600961bb522 in bgp_path_info_free (path=0x560098665400) at bgpd/bgp_route.c:252
 #7  bgp_path_info_unlock (path=0x560098665400) at bgpd/bgp_route.c:276
 #8  0x00005600961bb719 in bgp_path_info_reap (rn=rn@entry=0x5600986b2110, pi=pi@entry=0x560098665400) at bgpd/bgp_route.c:320
 #9  0x00005600961bf4db in bgp_process_main_one (safi=SAFI_MPLS_VPN, afi=AFI_IP, rn=0x5600986b2110, bgp=0x560098587320) at bgpd/bgp_route.c:2476
 #10 bgp_process_wq (wq=<optimized out>, data=0x56009869b8f0) at bgpd/bgp_route.c:2503
 #11 0x00007ff7b39d5fcc in work_queue_run (thread=0x7ffff6641e10) at lib/workqueue.c:294
 #12 0x00007ff7b39ce3b1 in thread_call (thread=thread@entry=0x7ffff6641e10) at lib/thread.c:1606
 #13 0x00007ff7b39a3538 in frr_run (master=0x5600980795b0) at lib/libfrr.c:1011
 #14 0x000056009618a5a3 in main (argc=3, argv=0x7ffff6642078) at bgpd/bgp_main.c:481

Add a null-check protection to fix this problem.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoisisd: fix crash when entering "no ip[v6] router isis" twice
Renato Westphal [Wed, 20 Feb 2019 18:36:50 +0000 (15:36 -0300)]
isisd: fix crash when entering "no ip[v6] router isis" twice

isisd CLI has some housekeeping code that removes the
"frr-isisd:isis" container from the interface configuration when
IS-IS is disabled for both IPv4 and IPv6 in the corresponding
interface.

The problem is that the code was checking the values of the
"ipv4-routing" and "ipv6-routing" leafs without checking if the
parent "frr-isisd:isis" container was present. So, entering "no
ip[v6] router isis" twice would cause isisd to crash since the
"frr-isisd:isis" container wouldn't be present the second time the
command is processed. Fix this.

isisd aborted: vtysh -c "configure terminal" -c "interface eth99" -c "no ip router isis WORD"
isisd aborted: vtysh -c "configure terminal" -c "interface eth99" -c "no ipv6 router isis"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agopbrd: add missing newline at the end of warning message
Renato Westphal [Wed, 20 Feb 2019 18:34:17 +0000 (15:34 -0300)]
pbrd: add missing newline at the end of warning message

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agopbrd: fix removal of ipv6 nexthops
Renato Westphal [Wed, 20 Feb 2019 18:32:55 +0000 (15:32 -0300)]
pbrd: fix removal of ipv6 nexthops

Fix bug in the code that compares IPv6 addresses. If memcmp()
returns 0 then the two addresses are equal.

Because of this problem, hash_release() could return NULL in a few
places, leading to the following crashes (found by the CLI fuzzer):
pbrd aborted: vtysh -c "configure terminal" -c "pbr-map WORD seq 100" -c "no set nexthop 2001:db8::1"
pbrd aborted: vtysh -c "configure terminal" -c "nexthop-group NHGROUP" -c "no nexthop 2001:db8::1"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agolib: Allow DEFPY_HIDDEN to exist in vtysh
Donald Sharp [Thu, 21 Feb 2019 00:02:02 +0000 (19:02 -0500)]
lib: Allow DEFPY_HIDDEN to exist in vtysh

The DEFPY_HIDDEN commands were not being picked up
into vtysh.  Fix this issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Add 'test pim keepalive-reset A.B.C.D A.B.C.D' command
Donald Sharp [Wed, 20 Feb 2019 22:21:39 +0000 (17:21 -0500)]
pimd: Add 'test pim keepalive-reset A.B.C.D A.B.C.D' command

Add a test command to pim that allows you to reset the keepalive timer
for an upstream to it's max value.  This is to allow purposeful testing
of cleanup code in pim, by forcing the keeaplive timer to expire later.

robot# show ip pim upstream
Iif       Source          Group           State       Uptime   JoinTimer RSTimer   KATimer   RefCnt
enp3s0    192.168.201.136 225.1.0.0       NotJ,RegP   00:00:10 00:00:52  00:00:25  00:02:54       1
robot# show ip pim upstream
Iif       Source          Group           State       Uptime   JoinTimer RSTimer   KATimer   RefCnt
enp3s0    192.168.201.136 225.1.0.0       NotJ,RegP   00:00:11 00:00:51  00:00:24  00:02:53       1
robot# test pim keep 192.168.201.136 225.1.0.0
Setting (192.168.201.136,225.1.0.0) to current keep alive time: 210
robot# show ip pim upstream
Iif       Source          Group           State       Uptime   JoinTimer RSTimer   KATimer   RefCnt
enp3s0    192.168.201.136 225.1.0.0       NotJ,RegP   00:00:27 00:00:35  00:00:08  00:03:27       1
robot#

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3835 from qlyoung/build-update-libyang-doc-link
Renato Westphal [Wed, 20 Feb 2019 18:14:03 +0000 (15:14 -0300)]
Merge pull request #3835 from qlyoung/build-update-libyang-doc-link

build: update doc link for libyang warning

5 years agoredhat: Require newer libyang (> 0.16.74) for embedded extensions
Martin Winter [Wed, 20 Feb 2019 13:09:03 +0000 (05:09 -0800)]
redhat: Require newer libyang (> 0.16.74) for embedded extensions

The support of embedded extensions doesn't allow to build the
RPM with and without (for older version). Require new version of
Lbyang with embedded extensions supported

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
5 years agobgpd: make valgrind suppression more generic
David Lamparter [Thu, 7 Feb 2019 15:25:33 +0000 (16:25 +0100)]
bgpd: make valgrind suppression more generic

No point in restriction the suppression that far down the call stack.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: yang: use common yang_ctx_new_setup()
David Lamparter [Mon, 4 Feb 2019 21:56:50 +0000 (22:56 +0100)]
lib: yang: use common yang_ctx_new_setup()

After creating a libyang context, we need to hook up our callback to use
embedded built-in modules.  I hadn't added this to the yang translator
code.

Also, ly_ctx_new fails if the search directory doesn't exist.  Since
that's not a hard error for us, work around that and ignore inaccessible
YANG_MODELS_DIR.  (This is needed for snap packages.)

Signed-off-by: David Lamparter <equinox@diac24.net>
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: 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 agodebian: remove superseded systemd lintian override
David Lamparter [Tue, 19 Feb 2019 13:32:08 +0000 (14:32 +0100)]
debian: remove superseded systemd lintian override

This was fixed in f351f5f971e2a37c74e1c966532376177ba920ec.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: update libyang dependency to >= 0.16.74
David Lamparter [Tue, 19 Feb 2019 13:24:25 +0000 (14:24 +0100)]
debian: update libyang dependency to >= 0.16.74

We're using builtin extension loading, so we need libyang 0.16.74.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: fix autopkgtest
David Lamparter [Tue, 19 Feb 2019 13:15:19 +0000 (14:15 +0100)]
debian: fix autopkgtest

pgrep is in procps, which is an essential package.  killall is in
psmisc, which isn't.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: add missing Conflicts:
David Lamparter [Mon, 4 Feb 2019 19:16:34 +0000 (20:16 +0100)]
debian: add missing Conflicts:

We were missing several Conflicts: (or Breaks:) lines.  Specifically,
- the .png diagrams in frr-doc conflict with quagga-doc
- the quagga package was split up and we conflict on each on the
  daemon's man pages
- pimd also conflicts on the man page.

This is a "conservative" fix for the time being, putting everything into
Conflicts:.  Some of these might have other options to fix them (e.g.
renaming the diagrams or man pages) but that needs more thought and
isn't appropriate for a simple fix.

There is also the "layer 9" consideration of whether to add "Replaces:
quagga" lines.  For the time being I'd say it's a bit early to have that
discussion.

Reported-by: Andreas Beckmann <anbe@debian.org>
References: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921376
Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: remove bogus libjson0 dependency
David Lamparter [Mon, 4 Feb 2019 03:52:16 +0000 (04:52 +0100)]
debian: remove bogus libjson0 dependency

Dependencies for the actual library packages are autogenerated by shlib
handling.  Removing the bogus line should hopefully get this to build
on Debian buildd...

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: extend comments on pre/postinst hooks
David Lamparter [Sun, 27 Jan 2019 16:24:36 +0000 (17:24 +0100)]
debian: extend comments on pre/postinst hooks

While originally created to support upgrading within non-official
previous FRR packages, the same logic makes upgrading from Quagga
configs more straightforward.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotools/tarsource.sh: deal with AC_INIT []
David Lamparter [Fri, 18 Jan 2019 14:41:30 +0000 (15:41 +0100)]
tools/tarsource.sh: deal with AC_INIT []

configure.ac got cleaned up, now there's [] around the version number.

Signed-off-by: David Lamparter <equinox@diac24.net>
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 agodebian: add libyang-dev dependency
David Lamparter [Fri, 18 Jan 2019 14:37:19 +0000 (15:37 +0100)]
debian: add libyang-dev dependency

Signed-off-by: David Lamparter <equinox@diac24.net>
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 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>
5 years agodebian: drop unused lintian overrides
David Lamparter [Fri, 14 Dec 2018 15:40:30 +0000 (16:40 +0100)]
debian: drop unused lintian overrides

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: full & proper copyright file
David Lamparter [Fri, 14 Dec 2018 13:58:10 +0000 (14:58 +0100)]
debian: full & proper copyright file

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: flag as "no stop on upgrade"
David Lamparter [Thu, 13 Dec 2018 17:50:15 +0000 (18:50 +0100)]
debian: flag as "no stop on upgrade"

We don't want to break some user's internet routing that they're using
for their ssh login while upgrading...

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodoc/developer: document new Debian packaging
David Lamparter [Thu, 25 Oct 2018 20:28:49 +0000 (22:28 +0200)]
doc/developer: document new Debian packaging

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: don't install ssd & daemons.conf
David Lamparter [Wed, 12 Dec 2018 21:50:56 +0000 (22:50 +0100)]
debian: don't install ssd & daemons.conf

ssd is unused and duplicates a system tool.  daemons.conf is deprecated.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: cleanly split off from dist tarball
David Lamparter [Fri, 14 Dec 2018 15:08:25 +0000 (16:08 +0100)]
debian: cleanly split off from dist tarball

The debian/ directory is distributed separately for tarballs in 3.0
(quilt) format.  Including it in the dist tarball causes problems with
automake when the separately distributed debian directory is unpacked on
top of the dist tarball;  the clean and correct thing to do here is to
not include the debian/ directory in dist tarballs.

Users have two choices for building FRR Debian packages:
- build straight off git
- build from a "frr.tar" + "frr-debian.tar"

The tarsource.sh tool does the right thing when invoked with the -D
("Debian") option.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotools/tarsource.sh: create debian changelog
David Lamparter [Mon, 10 Dec 2018 23:18:12 +0000 (00:18 +0100)]
tools/tarsource.sh: create debian changelog

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: fix up for new initscripts
David Lamparter [Mon, 10 Dec 2018 23:03:17 +0000 (00:03 +0100)]
debian: fix up for new initscripts

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: clean up debian/ directory for git build
David Lamparter [Mon, 10 Dec 2018 21:46:55 +0000 (22:46 +0100)]
debian: clean up debian/ directory for git build

Running `dpkg-buildpackage` with source-format "git" complains about
newly created files under debian/.  Remove the build-created frr.init &
frr.service to avoid the build erroring out due to this.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodoc: drop deprecated Ubuntu 12.04 docs
David Lamparter [Wed, 12 Dec 2018 00:32:17 +0000 (01:32 +0100)]
doc: drop deprecated Ubuntu 12.04 docs

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: make package "official"
David Lamparter [Mon, 10 Dec 2018 21:34:49 +0000 (22:34 +0100)]
debian: make package "official"

Move us into place in debian/

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian: move changelog out of the way
David Lamparter [Fri, 7 Dec 2018 21:33:57 +0000 (22:33 +0100)]
debian: move changelog out of the way

The official Debian package will have a manually maintained changelog in
place of the symlink.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: fill in changelog proper
David Lamparter [Thu, 25 Oct 2018 14:56:09 +0000 (16:56 +0200)]
debianpkg: fill in changelog proper

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: restrict to linux-any
David Lamparter [Mon, 10 Dec 2018 20:53:23 +0000 (21:53 +0100)]
debianpkg: restrict to linux-any

We don't support GNU/Hurd, and we haven't tested Debian kFreeBSD.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: enable FPM (w/o protobuf)
David Lamparter [Mon, 10 Dec 2018 21:17:01 +0000 (22:17 +0100)]
debianpkg: enable FPM (w/o protobuf)

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: enable rtrlib by default
David Lamparter [Mon, 10 Dec 2018 21:15:22 +0000 (22:15 +0100)]
debianpkg: enable rtrlib by default

librtr is in Debian unstable now, so this should default on.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: cut down unneeded bits
David Lamparter [Mon, 29 Oct 2018 17:56:30 +0000 (18:56 +0100)]
debianpkg: cut down unneeded bits

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: install libraries to /usr/lib64/frr
David Lamparter [Sun, 28 Oct 2018 17:54:14 +0000 (18:54 +0100)]
debianpkg: install libraries to /usr/lib64/frr

This makes them "private libraries" (which they are, since we don't
maintain a proper versioned ABI on libfrr.)  This also properly fixes
another few lintian warnings.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: fix remaining lintian warnings
David Lamparter [Sun, 28 Oct 2018 16:53:36 +0000 (17:53 +0100)]
debianpkg: fix remaining lintian warnings

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: include docs and register with doc-base
David Lamparter [Sun, 28 Oct 2018 15:58:24 +0000 (16:58 +0100)]
debianpkg: include docs and register with doc-base

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: rewrite description texts
David Lamparter [Sun, 28 Oct 2018 16:42:28 +0000 (17:42 +0100)]
debianpkg: rewrite description texts

...to actually document what is in each of the subpackages.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: update copyright file
David Lamparter [Sun, 28 Oct 2018 01:14:10 +0000 (02:14 +0100)]
debianpkg: update copyright file

Extracted from git history with a bit of polish applied.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: update debhelper dependency
David Lamparter [Fri, 26 Oct 2018 12:30:54 +0000 (14:30 +0200)]
debianpkg: update debhelper dependency

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: add & document lintian overrides
David Lamparter [Thu, 25 Oct 2018 18:44:42 +0000 (20:44 +0200)]
debianpkg: add & document lintian overrides

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: make URLs https
David Lamparter [Thu, 25 Oct 2018 18:33:51 +0000 (20:33 +0200)]
debianpkg: make URLs https

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: fix whitespace
David Lamparter [Thu, 25 Oct 2018 17:44:00 +0000 (19:44 +0200)]
debianpkg: fix whitespace

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: drop superfluous control entries
David Lamparter [Thu, 25 Oct 2018 17:41:21 +0000 (19:41 +0200)]
debianpkg: drop superfluous control entries

Some header lines are duplicate and unneccessary, and the entire frr-dbg
package doesn't need an entry in control (it's autogenerated.)

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: update maintainer
David Lamparter [Thu, 25 Oct 2018 17:39:32 +0000 (19:39 +0200)]
debianpkg: update maintainer

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: use set -e in maintscripts
David Lamparter [Thu, 25 Oct 2018 17:34:05 +0000 (19:34 +0200)]
debianpkg: use set -e in maintscripts

Fixes maintainer-script-without-set-e Lintian warning.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: add -0 to version
David Lamparter [Tue, 23 Oct 2018 11:55:36 +0000 (13:55 +0200)]
debianpkg: add -0 to version

We need a -something suffix since otherwise part of our version number
(e.g. -dev or -DATE) will get taken as Debian sub-version.  (Everything
after the last -)

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: add watch file
David Lamparter [Thu, 25 Oct 2018 16:22:14 +0000 (18:22 +0200)]
debianpkg: add watch file

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