]> 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 agoMerge pull request #3823 from opensourcerouting/confd-build-fix
Donald Sharp [Tue, 19 Feb 2019 18:05:17 +0000 (13:05 -0500)]
Merge pull request #3823 from opensourcerouting/confd-build-fix

build: fix linking to libconfd

5 years agoMerge pull request #3816 from opensourcerouting/doc-pager-theme
Quentin Young [Tue, 19 Feb 2019 17:41:08 +0000 (12:41 -0500)]
Merge pull request #3816 from opensourcerouting/doc-pager-theme

[master] doc: VTYSH_PAGER docs + new FRR theme

5 years agoMerge pull request #3790 from qlyoung/doc-add-buildessential-libsystemdev-docs
David Lamparter [Tue, 19 Feb 2019 16:54:25 +0000 (17:54 +0100)]
Merge pull request #3790 from qlyoung/doc-add-buildessential-libsystemdev-docs

doc: update build dependencies for debian systems

5 years agodoc: update build dependencies for debian systems
Quentin Young [Tue, 12 Feb 2019 21:53:55 +0000 (21:53 +0000)]
doc: update build dependencies for debian systems

Add build-essential and, for platforms with systemd, libsystemd-dev to
the package list for builds

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #3731 from opensourcerouting/bfd-refactory
Donald Sharp [Tue, 19 Feb 2019 16:32:39 +0000 (11:32 -0500)]
Merge pull request #3731 from opensourcerouting/bfd-refactory

bfdd: protocol refactory

5 years agoMerge pull request #3746 from ton31337/feature/rfc_8212
David Lamparter [Tue, 19 Feb 2019 12:54:23 +0000 (13:54 +0100)]
Merge pull request #3746 from ton31337/feature/rfc_8212

bgpd: Implement RFC8212

5 years agoMerge pull request #3792 from donaldsharp/pbr_massacre_at_5
David Lamparter [Tue, 19 Feb 2019 12:53:37 +0000 (13:53 +0100)]
Merge pull request #3792 from donaldsharp/pbr_massacre_at_5

Pbr massacre at 5

5 years agoMerge pull request #3825 from opensourcerouting/master-isis-fix-3533
Donald Sharp [Mon, 18 Feb 2019 23:28:57 +0000 (18:28 -0500)]
Merge pull request #3825 from opensourcerouting/master-isis-fix-3533

[master] isisd: skip over deleted fragments

5 years agoisisd: skip over deleted fragments
David Lamparter [Mon, 18 Feb 2019 20:34:06 +0000 (21:34 +0100)]
isisd: skip over deleted fragments

Since LSP fragments are also on our lspdb dict, lsp_tick() needs to skip
over them after calling lsp_destroy().  Otherwise it ends up accessing
free'd memory.

Fixes: #3533
Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3817 from sergeyrar/patch-1
David Lamparter [Mon, 18 Feb 2019 17:41:20 +0000 (18:41 +0100)]
Merge pull request #3817 from sergeyrar/patch-1

XSTRDUP function signature fix

5 years agobuild: fix linking to libconfd
Renato Westphal [Mon, 18 Feb 2019 16:14:33 +0000 (13:14 -0300)]
build: fix linking to libconfd

Commit fdbd8086b1e1 removed the explicit -lconfd flag from
lib_confd_la_LIBADD in favor of using the CONFD_LIBS variable. The
problem, however, is that ConfD doesn't use pkg-config nor anything
similar, so CONFD_LIBS is not created automatically by autotools.

Fix this problem by manually assigning -lconfd to the CONFD_LIBS
variable in the configure script.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoXSTRDUP function signature fix
sergey [Mon, 18 Feb 2019 14:06:37 +0000 (16:06 +0200)]
XSTRDUP function signature fix

I think  there is a mistake in XSTRDUP function signature.

5 years agodoc: document VTYSH_PAGER and "terminal paginate"
David Lamparter [Mon, 18 Feb 2019 13:23:03 +0000 (14:23 +0100)]
doc: document VTYSH_PAGER and "terminal paginate"

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

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3788 from AnuradhaKaruppiah/evpn-pmsi-fixes
David Lamparter [Mon, 18 Feb 2019 12:45:09 +0000 (13:45 +0100)]
Merge pull request #3788 from AnuradhaKaruppiah/evpn-pmsi-fixes

EVPN IMET route PMSI attribute handling fixes

5 years agoMerge pull request #3777 from donaldsharp/topotest_all_routes
David Lamparter [Mon, 18 Feb 2019 12:41:44 +0000 (13:41 +0100)]
Merge pull request #3777 from donaldsharp/topotest_all_routes

topotests: Add code to ensure routes are as expected

5 years agoMerge pull request #3802 from pguibert6WIND/ospfv3_misc_fixes
David Lamparter [Mon, 18 Feb 2019 12:13:58 +0000 (13:13 +0100)]
Merge pull request #3802 from pguibert6WIND/ospfv3_misc_fixes

Ospfv3 misc fixes

5 years agoMerge pull request #3706 from pguibert6WIND/graceful_restart_range
David Lamparter [Mon, 18 Feb 2019 12:10:31 +0000 (13:10 +0100)]
Merge pull request #3706 from pguibert6WIND/graceful_restart_range

Graceful restart range

5 years agoMerge pull request #3797 from donaldsharp/allow_in_dir_build
David Lamparter [Mon, 18 Feb 2019 12:09:29 +0000 (13:09 +0100)]
Merge pull request #3797 from donaldsharp/allow_in_dir_build

build: non-recursive sharpd

5 years agoMerge pull request #3808 from qlyoung/update-readme-protos
David Lamparter [Mon, 18 Feb 2019 12:07:10 +0000 (13:07 +0100)]
Merge pull request #3808 from qlyoung/update-readme-protos

README.md: update list of supported protos

5 years agoMerge pull request #3804 from qlyoung/build-remove-fPIE-add-fPIC
David Lamparter [Mon, 18 Feb 2019 11:59:41 +0000 (12:59 +0100)]
Merge pull request #3804 from qlyoung/build-remove-fPIE-add-fPIC

build: fix automake fart under MSAN

5 years agobgpd: Implement RFC8212
Donatas Abraitis [Thu, 7 Feb 2019 08:49:04 +0000 (10:49 +0200)]
bgpd: Implement RFC8212

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #3805 from qlyoung/msan-fixes
Mark Stapp [Fri, 15 Feb 2019 20:53:53 +0000 (15:53 -0500)]
Merge pull request #3805 from qlyoung/msan-fixes

lib: fix uninitialized value use in privs.c

5 years agoMerge pull request #3798 from robgil/docker-debian9
Quentin Young [Fri, 15 Feb 2019 18:10:49 +0000 (13:10 -0500)]
Merge pull request #3798 from robgil/docker-debian9

Quick and dirty debian9 docker image

5 years agoREADME.md: update list of supported protos
Quentin Young [Fri, 15 Feb 2019 17:57:13 +0000 (17:57 +0000)]
README.md: update list of supported protos

WHOoOoOooOoOooOOOOOo!!!

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agobgpd: fix automake fart under MSAN
Quentin Young [Fri, 15 Feb 2019 17:32:09 +0000 (17:32 +0000)]
bgpd: fix automake fart under MSAN

"When building without VNC, automake sees that the `bgpd_bgpd_CFLAGS`
variable exists, although it is only set in the VNC-enabled case... but
since the variable exists, it unconditionally drops `AM_CFLAGS` for the
two bgp targets and uses `bgpd_bgpd_CFLAGS` instead, which will
contain... _nothing_."

This was breaking builds of bgpd binaries with MSAN enabled.

Signed-off-by: David Lamparter <equinox@diac24.net>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoospf6d: reset the global ospf6 pointer
Philippe Guibert [Fri, 15 Feb 2019 16:42:13 +0000 (17:42 +0100)]
ospf6d: reset the global ospf6 pointer

reset the global ospf6 pointer.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agolib: fix garbage array size in zprivs_init
Quentin Young [Fri, 15 Feb 2019 16:27:55 +0000 (16:27 +0000)]
lib: fix garbage array size in zprivs_init

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodocker: quick and dirty debian 9 img
Rob Gil [Thu, 14 Feb 2019 03:06:11 +0000 (22:06 -0500)]
docker: quick and dirty debian 9 img

Signed-off-by: Rob Gil <rob@rem5.com>
5 years agolib: fix uninitialized value use in privs.c
Quentin Young [Thu, 14 Feb 2019 18:40:29 +0000 (18:40 +0000)]
lib: fix uninitialized value use in privs.c

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoospf6d: upon interface deletion, the area if list may be updated
Philippe Guibert [Thu, 14 Feb 2019 13:04:45 +0000 (14:04 +0100)]
ospf6d: upon interface deletion, the area if list may be updated

there are some events where the list of interfaces per area should be
reviewed due to an interface is being removed. This fix avoids having
some memory leak.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoospf6d: closing server socket when leaving ospf6d
Philippe Guibert [Thu, 14 Feb 2019 13:06:41 +0000 (14:06 +0100)]
ospf6d: closing server socket when leaving ospf6d

this commit brings consistency as it closes the socket used to carry
ospfv3 messages.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobfdd: fix CI warnings
Rafael Zalamena [Tue, 5 Feb 2019 00:05:39 +0000 (22:05 -0200)]
bfdd: fix CI warnings

Fix a few checkpatch warnings and a clang analyzer warning of
uninitialized variable.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: fix discriminator mismatch log message
Rafael Zalamena [Mon, 4 Feb 2019 15:51:24 +0000 (13:51 -0200)]
bfdd: fix discriminator mismatch log message

The discriminator is an unsigned 32bit variable.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: apply new timers on on-going connections
Rafael Zalamena [Mon, 4 Feb 2019 15:44:52 +0000 (13:44 -0200)]
bfdd: apply new timers on on-going connections

Apply new timers when only one side is negotiating new settings: when
sending the final bit we must apply the remote settings, otherwise
we'll keep the previous transmission rate.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: header clean up
Rafael Zalamena [Sat, 2 Feb 2019 12:10:01 +0000 (10:10 -0200)]
bfdd: header clean up

Remove some unused definitions in the bfd daemon header.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: don't allow VRF for single hop session
Rafael Zalamena [Sat, 2 Feb 2019 12:00:09 +0000 (10:00 -0200)]
bfdd: don't allow VRF for single hop session

Single hop sessions already allow you to select the interface, which
should be enough to determine the VRF we are running in.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: implement session interface observer
Rafael Zalamena [Sat, 2 Feb 2019 11:57:08 +0000 (09:57 -0200)]
bfdd: implement session interface observer

Allow `bfdd` to configure inexisting interfaces / VRF and only activate
them once the interface/VRF start existing. This implementation doesn't
handle dynamic VRFs yet.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: generate random session identificators
Rafael Zalamena [Fri, 1 Feb 2019 11:50:06 +0000 (09:50 -0200)]
bfdd: generate random session identificators

This also avoids returning `session_id == 0` which should not happen.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: remove unused vrf/interface data structures
Rafael Zalamena [Fri, 1 Feb 2019 11:29:26 +0000 (09:29 -0200)]
bfdd: remove unused vrf/interface data structures

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: refactor session lookup
Rafael Zalamena [Fri, 1 Feb 2019 11:22:00 +0000 (09:22 -0200)]
bfdd: refactor session lookup

Use internal data to lookup sessions. This approach has two main
advantages:

  * it uses less memory because it doesn't use strings for interface /
    vrf, it uses OS indexes instead;
  * prepares code to support VRF;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: slow down on peer connection loss
Rafael Zalamena [Thu, 31 Jan 2019 20:36:44 +0000 (18:36 -0200)]
bfdd: slow down on peer connection loss

Lets be more RFC 5880 compliant and slow down control packets on
connection loss.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: don't try to start echo on protocol restart
Rafael Zalamena [Thu, 31 Jan 2019 20:21:18 +0000 (18:21 -0200)]
bfdd: don't try to start echo on protocol restart

`echo-mode` should and will automatically start after session goes up
and it is allowed by the remote peer. See `bs_echo_timer_handler` for
more information.

This avoids having echo controling code spread.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: change slow time value
Rafael Zalamena [Thu, 31 Jan 2019 20:15:35 +0000 (18:15 -0200)]
bfdd: change slow time value

Let's use the RFC 5880 suggested value of 1 second for slow
transmission speed.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: simplify timer data structure
Rafael Zalamena [Thu, 31 Jan 2019 20:10:32 +0000 (18:10 -0200)]
bfdd: simplify timer data structure

Remove some legacy left overs of the old timer data structure bits and
use a simpler version:

  We always keep the current configuration in the timer structure, but
  also keep the running timers (before poll transition) in
  `cur_timers`.

  With this we can remove `new_timers` and avoid timer copy
  configuration copy on final handler (this also simplifies peer
  show command).

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: don't poll to make echo/multiplier changes
Rafael Zalamena [Thu, 31 Jan 2019 20:04:34 +0000 (18:04 -0200)]
bfdd: don't poll to make echo/multiplier changes

RFC 5880 says that it is only necessary to run polling in two cases:

  - Desired minimum transmission interval;
  - Required minimum receive interval;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: deduplicate echo handling code
Rafael Zalamena [Thu, 31 Jan 2019 16:16:09 +0000 (14:16 -0200)]
bfdd: deduplicate echo handling code

Use the standardized echo timer handling function.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: fix bug on poll sequence
Rafael Zalamena [Wed, 30 Jan 2019 20:11:55 +0000 (18:11 -0200)]
bfdd: fix bug on poll sequence

Poll and Final bits can't be set at the same time in a packet.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: echo-mode doesn't need poll to start/stop
Rafael Zalamena [Wed, 30 Jan 2019 17:49:11 +0000 (15:49 -0200)]
bfdd: echo-mode doesn't need poll to start/stop

Remove all polling negotiation when starting/stopping `echo-mode` as it
is not necessary.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: refactor timer handling
Rafael Zalamena [Tue, 29 Jan 2019 19:33:16 +0000 (17:33 -0200)]
bfdd: refactor timer handling

Move timer calculation code outside of the packet handling function
and explain how timers are calculated.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: refactor state change handler
Rafael Zalamena [Tue, 15 Jan 2019 22:23:06 +0000 (20:23 -0200)]
bfdd: refactor state change handler

Expand state change handling into smaller functions with more
explanatory commentaries. This also handles some corner cases that
were not being handled.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoMerge pull request #3799 from donaldsharp/show_debugging
Rafael Zalamena [Thu, 14 Feb 2019 16:16:38 +0000 (14:16 -0200)]
Merge pull request #3799 from donaldsharp/show_debugging

Show debugging for bfd

5 years agoMerge pull request #3791 from sworleys/RT-Braces-rtadv
Mark Stapp [Thu, 14 Feb 2019 14:07:47 +0000 (09:07 -0500)]
Merge pull request #3791 from sworleys/RT-Braces-rtadv

zebra: Fix CLANG suggestion for braces on init of struct

5 years agoospf6d: unitialised buffer zone used by socket
Philippe Guibert [Thu, 14 Feb 2019 13:10:03 +0000 (14:10 +0100)]
ospf6d: unitialised buffer zone used by socket

a buffer zone is initialised, before being used by server socket.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobfdd: Add `show debugging [bfd]` command
Donald Sharp [Thu, 14 Feb 2019 04:24:05 +0000 (23:24 -0500)]
bfdd: Add `show debugging [bfd]` command

This will prevent vtysh from displaying `command imcomplete`
for a `show debugging` issued and we are running this
bfd daemon.  A quick look showed me that there was not
really the ability to turn on/off debugging like other
daemons.  I imagine future work can be focused here.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobfdd: Add some code so we can compile from w/ in the bfdd dir
Donald Sharp [Thu, 14 Feb 2019 04:23:06 +0000 (23:23 -0500)]
bfdd: Add some code so we can compile from w/ in the bfdd dir

Copy pattern of Makefile from other daemons to allow us to
compile this thingie(tm) from within the bfdd directory.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3794 from donaldsharp/sharp_import_check
Mark Stapp [Wed, 13 Feb 2019 20:25:02 +0000 (15:25 -0500)]
Merge pull request #3794 from donaldsharp/sharp_import_check

Sharp import check

5 years agoMerge pull request #3796 from donaldsharp/mpls_deletion_cleanup
Mark Stapp [Wed, 13 Feb 2019 20:19:39 +0000 (15:19 -0500)]
Merge pull request #3796 from donaldsharp/mpls_deletion_cleanup

zebra: Deletion of a lsp is not a failure event

5 years agobuild: non-recursive sharpd
Donald Sharp [Wed, 13 Feb 2019 20:03:16 +0000 (15:03 -0500)]
build: non-recursive sharpd

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: Deletion of a lsp is not a failure event
Donald Sharp [Wed, 13 Feb 2019 17:49:59 +0000 (12:49 -0500)]
zebra: Deletion of a lsp is not a failure event

FRR is reporting that a lsp deletion event as a failure
in the log messsages.  This will lead to confusion and
lots of fun debugging.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3622 from mjstapp/fix_cpp_compile
Donald Sharp [Wed, 13 Feb 2019 17:47:23 +0000 (12:47 -0500)]
Merge pull request #3622 from mjstapp/fix_cpp_compile

libs, daemons: changes to permit c++ compilation