]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
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 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>
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>
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 agobgpd: fix json double free when showing neighbors
Quentin Young [Mon, 17 Dec 2018 22:18:13 +0000 (22:18 +0000)]
bgpd: fix json double free when showing neighbors

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
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>