]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
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>
5 years agodebianpkg: change frr-pythontools dep to python3
David Lamparter [Thu, 25 Oct 2018 16:17:23 +0000 (18:17 +0200)]
debianpkg: change frr-pythontools dep to python3

The shebang can't be both at the same time;  since python2 is going to
be removed from Debian soon let's just stick with python3.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: fix install for {frr,rfptest,ospfclient}
David Lamparter [Thu, 25 Oct 2018 14:21:35 +0000 (16:21 +0200)]
debianpkg: fix install for {frr,rfptest,ospfclient}

The frr init script is always installed to /usr/lib/frr/frr because
watchfrr setups expect to have it there.

The rfptest and ospfclient binaries are not installed since they are
testing/development tools that don't have an user function.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: install HTML docs, drop tools/
David Lamparter [Thu, 25 Oct 2018 14:09:21 +0000 (16:09 +0200)]
debianpkg: install HTML docs, drop tools/

No reason not to enable HTML docs really.  Also why the f* were we
installing the entire tools/ directory into the doc package?

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: put frr-doc package in 'doc' section
David Lamparter [Thu, 25 Oct 2018 14:05:59 +0000 (16:05 +0200)]
debianpkg: put frr-doc package in 'doc' section

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: always install /etc/init.d/frr
David Lamparter [Thu, 25 Oct 2018 13:37:28 +0000 (15:37 +0200)]
debianpkg: always install /etc/init.d/frr

There is no point in making this conditional, systemd correctly prefers
the service file over the init script when it is present.  Also, people
can install an init system that doesn't match their distribution and
even change init systems on an installation.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: disable zeromq and FPM
David Lamparter [Thu, 25 Oct 2018 13:09:32 +0000 (15:09 +0200)]
debianpkg: disable zeromq and FPM

The ZeroMQ is just straight up useless for now, and the FPM module needs
to be properly encapsulated with protobuf deps.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: modernise dh_missing and use fail mode
David Lamparter [Thu, 25 Oct 2018 13:08:04 +0000 (15:08 +0200)]
debianpkg: modernise dh_missing and use fail mode

Things that aren't installed should be in debianpkg/not-installed.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: ditch development-only files
David Lamparter [Thu, 25 Oct 2018 13:00:55 +0000 (15:00 +0200)]
debianpkg: ditch development-only files

It is currently impossible to build external stuff that links against
installed FRR headers or libraries.  Such projects need to directly
reference an FRR source tree until we revamp the library installation
semantics.

In any case these files would then be in a frr-dev Debian package.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: raise debhelper compat level to 9
David Lamparter [Wed, 24 Oct 2018 18:57:32 +0000 (20:57 +0200)]
debianpkg: raise debhelper compat level to 9

Compat level 7 has long been deprecated.  9 works fine for us, though it
does change the library installation directories to multi-arch.  (Which
is not a problem.)

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: update to Debian Policy version 4.2.1
David Lamparter [Wed, 24 Oct 2018 18:57:16 +0000 (20:57 +0200)]
debianpkg: update to Debian Policy version 4.2.1

This bundles up a few smaller changes prompted by walking through the
upgrade checklist from 3.9.6 to 4.2.1.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: use redistclean target
David Lamparter [Wed, 24 Oct 2018 16:32:11 +0000 (18:32 +0200)]
debianpkg: use redistclean target

Now we can run dpkg-buildpackage from a dirty directory and it properly
cleans up.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: make frr-pythontools a "Recommends:"
David Lamparter [Wed, 24 Oct 2018 15:20:29 +0000 (17:20 +0200)]
debianpkg: make frr-pythontools a "Recommends:"

From the Debian policy:
  Recommends:
    This declares a strong, but not absolute, dependency.
    The Recommends field should list packages that would be found
    together with this one in all but unusual installations.

I'd say, yes, we do want the python-based reload functionality in all
but unusual installations.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: create frr-snmp and frr-rpki-rtrlib
David Lamparter [Wed, 3 Oct 2018 17:14:27 +0000 (19:14 +0200)]
debianpkg: create frr-snmp and frr-rpki-rtrlib

This splits off SNMP and RPKI support so that users can install these
packages (with the appropriate dependencies) independently of main FRR.
It also obsoletes out the weird multi-variant package distribution we've
been doing for RPKI support.

The snmpd dependency is also changed to Recommends: on frr-snmp since
the frr-snmp package is essentially useless without snmpd.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: remove bogus shlib:Depends on frr-dbg
David Lamparter [Tue, 23 Oct 2018 12:31:44 +0000 (14:31 +0200)]
debianpkg: remove bogus shlib:Depends on frr-dbg

The debug package doesn't have shlib dependencies.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: use better dependency for pythontools
David Lamparter [Tue, 23 Oct 2018 11:54:07 +0000 (13:54 +0200)]
debianpkg: use better dependency for pythontools

As described in https://wiki.debian.org/binNMU, arch-indep packages
should have an "almost identical" dependency so "+..." changes can be
made to arch-dep packages without breaking the arch-indep pkgs.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotools: add new tarsource.sh helper
David Lamparter [Wed, 24 Oct 2018 15:01:11 +0000 (17:01 +0200)]
tools: add new tarsource.sh helper

It cleans your house and cooks dinner.  Or maybe it creates a clean dist
tarball for you, plus a Debian .dsc if you have dpkg installed - and
GPG-signs the result appropriately if requested.

In any case the resulting tarball should be distributed for our
releases.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: kill backports
David Lamparter [Mon, 22 Oct 2018 11:37:53 +0000 (13:37 +0200)]
debianpkg: kill backports

The debianpkg/backports system is rather complicated and actually slows
down Debian package building quite a lot since the backports/rules file
is evaluated a zillion times during a normal build.

This just folds up everything into a single Debian package build that
works on all OSes.  The only real difference that the backports stuff
was used for is switching between systemd and init.d, the latter for
Ubuntu 12.04 and 14.04.

With this, that switch is controlled by the pkg.frr.nosystemd
Build-Profile instead.  Package builds for Ubuntu 14.04 need to supply
the -Ppkg.frr.nosystemd option to dpkg-buildpackage.  (12.04 isn't
supported anymore anyway.)

Note that the update-rc.d step that was previously coded into
postinst/postrm is now handled by the dh_installinit magic.

Other than this, there were some minor build dependency differences, all
of which are now just handled as | in the central deps.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: wrap & sort dependency lines in control
David Lamparter [Fri, 26 Oct 2018 12:00:43 +0000 (14:00 +0200)]
debianpkg: wrap & sort dependency lines in control

Muuuuch more readable...

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotools/frrcommon.sh: always start staticd
David Lamparter [Mon, 17 Dec 2018 19:42:51 +0000 (20:42 +0100)]
tools/frrcommon.sh: always start staticd

"derp."

Since zebra is always started, the same should hold for staticd.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotools/frrcommon.sh: actually create /run/frr
David Lamparter [Mon, 17 Dec 2018 18:08:02 +0000 (19:08 +0100)]
tools/frrcommon.sh: actually create /run/frr

tmpfiles.d is nice and all, but we can't rely on it.  Just create
/run/frr if needed.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotools/etc: remove cumulus user from vtysh.conf
David Lamparter [Fri, 14 Dec 2018 20:16:38 +0000 (21:16 +0100)]
tools/etc: remove cumulus user from vtysh.conf

This is a Cumulus-specific default which we shouldn't have in git.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotools: add documentation URL on frr.service
David Lamparter [Sun, 28 Oct 2018 15:34:48 +0000 (16:34 +0100)]
tools: add documentation URL on frr.service

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3498 from opensourcerouting/ripngd-redistribute-fix
Quentin Young [Mon, 17 Dec 2018 19:54:15 +0000 (14:54 -0500)]
Merge pull request #3498 from opensourcerouting/ripngd-redistribute-fix

[6.0] ripngd: fix route redistribution with route-maps

5 years agoMerge pull request #3497 from opensourcerouting/cli-fuzzer-fixes-6.0
Donald Sharp [Mon, 17 Dec 2018 15:33:14 +0000 (10:33 -0500)]
Merge pull request #3497 from opensourcerouting/cli-fuzzer-fixes-6.0

[6.0] Cli fuzzer fixes

5 years agoripngd: fix route redistribution with route-maps
Renato Westphal [Mon, 17 Dec 2018 14:28:21 +0000 (12:28 -0200)]
ripngd: fix route redistribution with route-maps

This fix isn't necessary on master since ripngd is now using only
DEFPY for configuration commands after the northbound conversion.

Reported-by: Christoffer Hansen <netravnen@gmail.com>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoospfd: fix issue with the "no segment-routing prefix A.B.C.D/M" command
Renato Westphal [Fri, 19 Oct 2018 18:55:47 +0000 (15:55 -0300)]
ospfd: fix issue with the "no segment-routing prefix A.B.C.D/M" command

Add a missing check to bail out earlier when SR is not configured. The
same command without the "no" prefix has the same check as it prevents
unexpected things (i.e. crashes) from happening.

Fixes the following segfaults:
ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "no segment-routing prefix 1.1.1.1/32"
ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "no segment-routing prefix 1.1.1.1/32 index 65535 no-php-flag"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoospf6d: fix two "show" commands
Renato Westphal [Fri, 19 Oct 2018 18:55:41 +0000 (15:55 -0300)]
ospf6d: fix two "show" commands

The "show ipv6 ospf6 interface [IFNAME] prefix" command shouldn't accept
the "match" keyword when a prefix is not given, otherwise ospf6d will
crash.

Fixes the following crashes:
ospf6d aborted: vtysh  -c "show ipv6 ospf6 interface eth99 prefix match"
ospf6d aborted: vtysh  -c "show ipv6 ospf6 interface prefix match"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: use the vrf_bitmap_*() helper functions when necessary
Renato Westphal [Fri, 19 Oct 2018 18:55:22 +0000 (15:55 -0300)]
bgpd: use the vrf_bitmap_*() helper functions when necessary

zclient->redist[afi][type] is a hash table and not an integer since a
while ago when VRF support was introduced. As such, zclient->redist[][]
should never be manipulated directly, the vrf_bitmap_*() helper functions
should be used instead. This fixes a few crashes found by the CLI fuzzer.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: fix bug while iterating over VPN table
Renato Westphal [Fri, 19 Oct 2018 18:55:12 +0000 (15:55 -0300)]
bgpd: fix bug while iterating over VPN table

The routing table data structure can create intermediate route nodes
during its normal operation, so we always need to check if the 'info'
pointer of a route node is NULL or not before dereferencing it.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: remove wrong assert
Renato Westphal [Fri, 19 Oct 2018 18:55:08 +0000 (15:55 -0300)]
bgpd: remove wrong assert

The vnc_direct_del_rn_group_rd() function can be called with the 'afi'
parameter set to AFI_L2VPN on some specific cases. Remove the assert to
fix the crash.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: fix NULL pointer dereference bug
Renato Westphal [Fri, 19 Oct 2018 18:55:03 +0000 (15:55 -0300)]
bgpd: fix NULL pointer dereference bug

Other parts of the rfapi code check if the 'rfg->rfapi_import_table'
pointer is NULL or not before using it. Do the same here to fix a crash
detected by the CLI fuzzer.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: add a NULL check to prevent a crash in the rfapi code
Renato Westphal [Fri, 19 Oct 2018 18:54:57 +0000 (15:54 -0300)]
bgpd: add a NULL check to prevent a crash in the rfapi code

The rfapiDeleteRemotePrefixesIt() function checks on several places if
'p' is NULL or not. Introduce an additional NULL check to prevent a
crash from happening.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: fix crashes caused by missing input validation
Renato Westphal [Fri, 19 Oct 2018 18:54:47 +0000 (15:54 -0300)]
bgpd: fix crashes caused by missing input validation

The rfapi code wasn't checking if strtoul() succeeded or not when parsing
the list of labels. Fix the affected commands by not allowing the user
to enter a non-numeric input.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: fix some NULL pointer dereference bugs
Renato Westphal [Fri, 19 Oct 2018 18:54:26 +0000 (15:54 -0300)]
bgpd: fix some NULL pointer dereference bugs

Other parts of the rfapi code also check if these pointers are NULL or
not before using them.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: fix the "no neighbor A.B.C.D maximum-prefix" command
Renato Westphal [Fri, 19 Oct 2018 18:54:05 +0000 (15:54 -0300)]
bgpd: fix the "no neighbor A.B.C.D maximum-prefix" command

The peer->group pointer is set only if the PEER_STATUS_GROUP flag is
set in the peer. Add a protection to prevent a NULL pointer dereference.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: handle NULL pointers in lcommunity_cmp()
Renato Westphal [Fri, 19 Oct 2018 18:53:55 +0000 (15:53 -0300)]
bgpd: handle NULL pointers in lcommunity_cmp()

Like community_cmp() and ecommunity_cmp(), the lcommunity_cmp() function
also needs to handle NULL pointers for correct operation.

Without this fix, bgpd can crash when entering the following commands:
vtysh -c "configure terminal" -c "ip large-community-list standard WORD deny"
vtysh -c "configure terminal" -c "no ip large-community-list expanded WORD"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: fix cleanup of dampening configuration
Renato Westphal [Fri, 19 Oct 2018 18:53:46 +0000 (15:53 -0300)]
bgpd: fix cleanup of dampening configuration

The bgp_damp_config_clean() function was deallocating some arrays without
resetting the variables that represent their sizes. This was leading to
some crashes because other parts of the code iterate over these arrays
by looking at their corresponding sizes, which could be invalid.

Fixes the following segfaults (which only happen under certain
circumstances):
vtysh -c "configure terminal" -c "router bgp 1" -c "bgp dampening"
vtysh -c "configure terminal" -c "router bgp 1" -c "no bgp dampening"
vtysh -c "configure terminal" -c "router bgp 1" -c "no bgp dampening 45"
vtysh -c "" -c "clear ip bgp dampening"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobfdd: do not allow multihop peers without a local-address
Renato Westphal [Fri, 19 Oct 2018 18:53:33 +0000 (15:53 -0300)]
bfdd: do not allow multihop peers without a local-address

The BFD code assumes that multihop peers have a local address
configured. When that doesn't happen, the BFD client daemons fail to
decode some BFD ZAPI messages and abort. To fix this, do not accept the
configuration of multhop peers unless a local-address is configured.

Fixes the following segfaults:
- bgpd aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop"
- bgpd aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop vrf NAME"
- bgpd aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 vrf NAME multihop"
- ospf6d aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop"
- ospf6d aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop vrf NAME"
- ospf6d aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 vrf NAME multihop"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #3490 from donaldsharp/confed_unsigned_6.0
Renato Westphal [Mon, 17 Dec 2018 09:24:31 +0000 (07:24 -0200)]
Merge pull request #3490 from donaldsharp/confed_unsigned_6.0

bgpd: Fix confederation identifier unsigned display

5 years agobgpd: Fix confederation identifier unsigned display
Donald Sharp [Sun, 16 Dec 2018 14:43:40 +0000 (09:43 -0500)]
bgpd: Fix confederation identifier unsigned display

The confederation identifier is a `as_t` type which is a
uint32_t underneath the covers.  Display it using a %u

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3486 from opensourcerouting/6.0-license-foo
Donald Sharp [Fri, 14 Dec 2018 15:23:36 +0000 (10:23 -0500)]
Merge pull request #3486 from opensourcerouting/6.0-license-foo

[6.0] license fixes

5 years agodoc: re-add copyright & license note
David Lamparter [Fri, 14 Dec 2018 15:05:18 +0000 (16:05 +0100)]
doc: re-add copyright & license note

This was mistakenly removed in the texi -> sphinx conversion.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years ago*: remove all MIBs for DFSG compliance
David Lamparter [Fri, 14 Dec 2018 15:01:44 +0000 (16:01 +0100)]
*: remove all MIBs for DFSG compliance

cf. https://wiki.debian.org/NonFreeIETFDocuments

These MIBs were in our git purely for documentation purposes, they are
not installed and not needed for building SNMP support.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: flip to ISC on hook & module code
David Lamparter [Fri, 14 Dec 2018 13:44:51 +0000 (14:44 +0100)]
lib: flip to ISC on hook & module code

I accidentally put MIT headers on these; the intent was ISC.  It doesn't
really make a difference, but let's get it consistent.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3479 from opensourcerouting/6.0-kill-empty-lib
Donald Sharp [Fri, 14 Dec 2018 15:00:16 +0000 (10:00 -0500)]
Merge pull request #3479 from opensourcerouting/6.0-kill-empty-lib

[6.0] kill empty libfrrfpm_pb

5 years agoMerge pull request #3481 from opensourcerouting/6.0-spelchek
Jafar Al-Gharaibeh [Fri, 14 Dec 2018 05:28:42 +0000 (23:28 -0600)]
Merge pull request #3481 from opensourcerouting/6.0-spelchek

[6.0] spelchek

5 years ago*: spelchek
David Lamparter [Thu, 25 Oct 2018 18:06:59 +0000 (20:06 +0200)]
*: spelchek

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3470 from pacovn/label_manager_fixes_6.0_backport
Donald Sharp [Wed, 12 Dec 2018 20:36:07 +0000 (15:36 -0500)]
Merge pull request #3470 from pacovn/label_manager_fixes_6.0_backport

Label manager fixes 6.0 backport

5 years agobuild: disable empty libfrrfpm_pb
David Lamparter [Wed, 12 Dec 2018 18:40:39 +0000 (19:40 +0100)]
build: disable empty libfrrfpm_pb

We were building and installing an _empty_ library (i.e. it literally
didn't contain anything.)

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobgpd: fix test (using bgp instance 0)
F. Aragon [Thu, 13 Sep 2018 12:48:21 +0000 (14:48 +0200)]
bgpd: fix test (using bgp instance 0)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agozebra: filter zebra messages (label manager)
F. Aragon [Tue, 4 Sep 2018 12:37:00 +0000 (14:37 +0200)]
zebra: filter zebra messages (label manager)

This change makes the zebra acting as label manager proxy not to relay non-LM
messages to clients that a zebra acting in non-proxy mode may send to it. Also,
the existing code does not schedule a rcv in case of relay_response_back
returns -1. This patch re-schedules reads on the socket even in case such a
function returns -1 by calling thread_add_read().

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agobgpd, doc, ldpd, lib, tests, zebra: LM fixes
paco [Thu, 7 Jun 2018 13:28:12 +0000 (15:28 +0200)]
bgpd, doc, ldpd, lib, tests, zebra: LM fixes

Corrections so that the BGP daemon can work with the label manager properly
through a label-manager proxy. Details:

- Correction so the BGP daemon behind a proxy label manager gets the range
  correctly (-I added to the BGP daemon, to set the daemon instance id)
- For the BGP case, added an asynchronous label manager connect command so
  the labels get recycled in case of a BGP daemon reconnection. With this,
  BGPd and LDPd would behave similarly.

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #3433 from opensourcerouting/init-6.0
Donald Sharp [Sun, 9 Dec 2018 14:39:00 +0000 (09:39 -0500)]
Merge pull request #3433 from opensourcerouting/init-6.0

[6.0] init script & vtysh pager rework

5 years agoMerge pull request #3451 from opensourcerouting/6.0-build
Donald Sharp [Sun, 9 Dec 2018 14:36:48 +0000 (09:36 -0500)]
Merge pull request #3451 from opensourcerouting/6.0-build

[6.0] build reproducibility

5 years agobuild: fix reproducibility re. -fdebug-prefix-map
David Lamparter [Tue, 30 Oct 2018 01:02:00 +0000 (02:02 +0100)]
build: fix reproducibility re. -fdebug-prefix-map

If CFLAGS contains something like `-fdebug-prefix-map=/build/path=.`, we
need to remove it from CONFIG_ARGS so it doesn't get baked into `show
version`.  Otherwise, build becomes non-reproducible if the build path
changes.  To avoid other things creeping in, let's just remove *FLAGS in
their entirety.  (Not really reliable information anyway.)

With this commit, FRR build should be 100% reproducible.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotests: fix domainname dependency
David Lamparter [Tue, 30 Oct 2018 00:43:31 +0000 (01:43 +0100)]
tests: fix domainname dependency

These are causing random test failures when the host's domainname is
actually set to something (as opposed to empty/unset, which it is 99% of
times.)

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agovtysh: rework/straighten pager handling
David Lamparter [Thu, 8 Nov 2018 05:50:13 +0000 (06:50 +0100)]
vtysh: rework/straighten pager handling

- no longer try to special-case a custom terminal length; the OS has
  procedures for that (SIGWINCH & TIOCGWINSZ)
- only use a pager if requested by CLI command or VTYSH_PAGER.  The
  behaviour with VTYSH_PAGER set should be compatible to previous
  versions.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years ago*: get rid of most daemons.conf references
David Lamparter [Thu, 6 Dec 2018 13:34:13 +0000 (14:34 +0100)]
*: get rid of most daemons.conf references

There's a few left over to get compatibility and not break user
installs, but most is gone.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebian/tools: new init script
David Lamparter [Fri, 30 Nov 2018 20:40:39 +0000 (21:40 +0100)]
debian/tools: new init script

This separates the init script used for the system (and called in the
systemd unit file) from the script that watchfrr uses to control
daemons.  Mixing these two caused the entire thing to become a rather
huge spaghetti mess.

Note that there is a behaviour change in that the new script always
starts zebra regardless of zebra_enable.

Side changes:
- Ubuntu 12.04 removed from backports since it doesn't work anyway
- zebra is always started regardless of zebra_enable.  To disable FRR,
  the entire init script should be disabled through policy.
- no-watchfrr operation is no longer supported by the scripts in the
  Debian packages.  (This is intentional.)

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agowatchfrr: add status command
David Lamparter [Fri, 30 Nov 2018 16:56:42 +0000 (17:56 +0100)]
watchfrr: add status command

Just to see WTF is going on inside watchfrr...

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agowatchfrr: immediately try connecting after start
David Lamparter [Fri, 30 Nov 2018 16:56:04 +0000 (17:56 +0100)]
watchfrr: immediately try connecting after start

When we make a call to (re)start some daemon(s), we can immediately try
connecting to its VTY socket after the script completes.  If the daemon
started correctly, this will always succeed since the start script only
returns after daemon startup is complete.

Among other things, this reduces the delay to "startup complete"
notification at initial watchfrr start.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3430 from donaldsharp/ospf_lsa_6.0
David Lamparter [Thu, 6 Dec 2018 16:47:53 +0000 (17:47 +0100)]
Merge pull request #3430 from donaldsharp/ospf_lsa_6.0

ospfd: default route got flushed after lsa refresh timer.

5 years agoMerge pull request #3432 from opensourcerouting/6.0-backport-bgp-ifp-crash
Donald Sharp [Thu, 6 Dec 2018 16:43:12 +0000 (11:43 -0500)]
Merge pull request #3432 from opensourcerouting/6.0-backport-bgp-ifp-crash

[6.0] bgpd: Prevent possible crash when parsing v6 attributes

5 years agowatchfrr: don't wait around pointlessly at startup
David Lamparter [Fri, 30 Nov 2018 16:55:42 +0000 (17:55 +0100)]
watchfrr: don't wait around pointlessly at startup

We were waiting for timers to expire even when we already know the
status of all daemons.  This delays startup for no good reason.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agowatchfrr, lib: cleanup & delay detaching
David Lamparter [Thu, 27 Sep 2018 02:18:48 +0000 (04:18 +0200)]
watchfrr, lib: cleanup & delay detaching

This cleans up watchfrr to be more "normal" like the other daemons in
terms of what it does in main(), i.e. using the full frr_*() call set.

Also, this changes the startup behaviour on watchfrr to stay attached on
the daemon's parent process until startup is really complete.  This
should allow removing the "watchfrr.started" hack at some point.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agotools/frr: get rid of the bash array and "bB"
David Lamparter [Fri, 26 Oct 2018 19:02:22 +0000 (21:02 +0200)]
tools/frr: get rid of the bash array and "bB"

With a little shell-fu, this can actually be escaped properly.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobgpd: Prevent possible crash when parsing v6 attributes
Donald Sharp [Thu, 6 Sep 2018 14:51:08 +0000 (10:51 -0400)]
bgpd: Prevent possible crash when parsing v6 attributes

The peer->nexthop.ifp pointer must be set when parsing the
attributes in bgp_mp_reach_parse, notice this
and fail gracefully.

Rework bgp_nexthop_set to remove the HAVE_CUMULUS and to
fail the nexthop_set when we have a zebra connection and
no ifp pointer, as that not havinga zebra connection and
no ifp pointer is legal.

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

5 years agoospfd: default route got flushed after lsa refresh timer.
rgirada [Mon, 8 Oct 2018 06:22:58 +0000 (23:22 -0700)]
ospfd: default route got flushed after lsa refresh timer.

Default route type is not considered while  processing  lsa
refresh timer  expiry   which intern makes it flushed from lsdb.

Signed-off-by: rgirada <rgirada@vmware.com>
5 years agoMerge pull request #3407 from opensourcerouting/60-bfd-fix-mhop-bsd
Donald Sharp [Sat, 1 Dec 2018 12:21:23 +0000 (07:21 -0500)]
Merge pull request #3407 from opensourcerouting/60-bfd-fix-mhop-bsd

6.x: bfdd: fix multihop on FreeBSD

5 years agobfdd: fix multihop on FreeBSD
Rafael Zalamena [Fri, 30 Nov 2018 17:02:23 +0000 (15:02 -0200)]
bfdd: fix multihop on FreeBSD

Some systems have a extra `struct sockaddr*` field (`_len`) which must
be filled in order for the peer lookup to work.

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

5 years agoMerge pull request #3282 from opensourcerouting/60-fix-bfd-ipv6-unnumbered
Russ White [Thu, 8 Nov 2018 23:01:58 +0000 (18:01 -0500)]
Merge pull request #3282 from opensourcerouting/60-fix-bfd-ipv6-unnumbered

6.0: bfdd: fix BGP unnumbered peer setup

5 years agobfdd: fix BGP unnumbered peer setup
Rafael Zalamena [Sat, 3 Nov 2018 22:08:33 +0000 (19:08 -0300)]
bfdd: fix BGP unnumbered peer setup

The session key uses the scope id to figure out which interface we are
using with that link-local address, so if we don't set it when
registering a session we'll end up with multiple IPv6 sessions.

This bug was spotted by Sandro Bolliger.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoMerge pull request #3253 from opensourcerouting/6.0-backport-build
Quentin Young [Mon, 29 Oct 2018 18:21:47 +0000 (14:21 -0400)]
Merge pull request #3253 from opensourcerouting/6.0-backport-build

6.0: backport build changes from master

5 years agoredhat: remove @CONFDATE@ from spec
David Lamparter [Sun, 28 Oct 2018 18:49:32 +0000 (19:49 +0100)]
redhat: remove @CONFDATE@ from spec

CONFDATE should not be used like this.  Also, the extraversion is now
burned into tarballs anyway so this is no longer neccessary.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobuild: make rfptest and ospfclient "noinst"
David Lamparter [Sun, 28 Oct 2018 15:05:38 +0000 (16:05 +0100)]
build: make rfptest and ospfclient "noinst"

Both of these are testing/demo-style tools that don't make sense as part
of a normal installation.  So don't install them.

NB: this is only the executables, libospfclient and the RFP code are not
affected.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobuild: crop excessive net-snmp library list
David Lamparter [Sat, 27 Oct 2018 17:06:22 +0000 (19:06 +0200)]
build: crop excessive net-snmp library list

This fixes the longstanding GPL vs. OpenSSL licensing issue in our SNMP
code (and cuts down on its other dependencies a wee bit.)

In a way, net-snmp is really buggy here in what it says that we should
link against, but I don't know their application scenarios well enough
to say it should be changed at their end.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3244 from k0ste/stable_6.0_backports
Donald Sharp [Fri, 26 Oct 2018 00:22:00 +0000 (20:22 -0400)]
Merge pull request #3244 from k0ste/stable_6.0_backports

stable/6.0: tools/frr: use path settings from ./configure

5 years agobuild: add "redistclean" target
David Lamparter [Wed, 24 Oct 2018 15:31:31 +0000 (17:31 +0200)]
build: add "redistclean" target

This puts a source tree back in the state it was in after unpacking a
dist tarball.  Different from distclean in that it doesn't remove files
that are included in the tarball.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobuild: make clean and dist consistent
David Lamparter [Wed, 24 Oct 2018 15:44:04 +0000 (17:44 +0200)]
build: make clean and dist consistent

We weren't cleaning up some files (a whole lot of python foobar) and had
some files in the dist tarball that don't quite belong there.

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