Commit Graph

7291 Commits

Author SHA1 Message Date
smccroskey
037760136f debian: install PNG files in /usr/share/info
Testing done: built in sbuild with lintian enabled

Clears lintian warnings of the following form:
W: frr-doc: info-document-missing-image-file

According to the documentation for the lintian warning, certain
applications (e.g.  emacs) can render images from info files inline,
and expect the images to either have their full path defined or be
installed in the same directory as the info files themselves.
Automake doesn't seem to have a primary for handling this sort of
installation (info_DATA is invalid and causes an error), so opted to
handle it in the debian install file itself.

Installing the images elsewhere (another path installed by frr-doc)
and giving a full path to their location in info files might be a
better approach.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2017-10-10 07:52:48 -07:00
Martin Winter
70a74a9c11 debianpkg: Overriding lintian package-name-doesnt-match-sonames warning
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:48 -07:00
Silas McCroskey
6225c3fde8 debianpkg: Fix 'make backports' warning about autopkgtest
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:48 -07:00
Martin Winter
9d7e7a3cf3 debianpkg: Move frr-reload.py to frr-pythontools subpackage
- avoids python dependency on main frr package

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:47 -07:00
Martin Winter
3185b02c01 debianpkg: Register/remove init script on init.d based systems
- Ubuntu 12.04 and Ubuntu 14.04 need init script registered during
  install and removed at uninstall

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:47 -07:00
Martin Winter
147ca0c63a debianpkg: Fix description (make shorter - max 80 chars)
- Fixes lintian error 'description-too-long'

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:47 -07:00
Martin Winter
dd9d4f74fa debianpkg: Support --with-pkg-extra-version and other modifier to build custom package version
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:47 -07:00
Martin Winter
3bdbfc791c debianpkg: Cleanup configure options
- Make them configurable (with WANT_xxx env variables)
- Adjust defaults to generic package
- remove obsolete configure options

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:47 -07:00
Martin Winter
fd623c4f8b debianpkg: Do not start package after installation
- Remove auto-start from Ubuntu 12.04 Backport
- Update Doc to explain on how to enable startup

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:47 -07:00
Martin Winter
60d11d92a5 tools: Rename to FRRouting in frr.service file
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:47 -07:00
Martin Winter
23025b6537 debianpkg/Ubuntu12.04-backport: Remove accidental reference to frr_sudoers
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:47 -07:00
Martin Winter
15261b903d debianpkg: Update control to fix maintainer email
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:47 -07:00
Martin Winter
c56e538017 debianpkg: Fix Date format in changelog and version numbering to make sure custom build is newer
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:47 -07:00
Martin Winter
56f9b733a0 debianpkg: Add backport for Debian 8
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:47 -07:00
Martin Winter
156c5270bf debianpkg: debian rules file needs to be executable
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:46 -07:00
Martin Winter
94990b0da4 debianpkg: Update Build-Depends to use libjson-c-dev / libjson-c2 instead of libjson0 on newer debian systems
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:46 -07:00
Martin Winter
86a22f1ed9 debianpkg: Add initial README to document the steps required to build the debian packages with backports
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:46 -07:00
Martin Winter
66f4865d2d debian->debianpkg: Move debian files from debian dir to debianpkg dir.
Debian build systems use debian subdir for building and having a debian
dir in the source package causes issues.
Moving it to debianpkg avoids the issue and allows us to ship debian
package files in the source distribution

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:46 -07:00
smccroskey
5424c62d6e backports: minimize diffs with base debian files
minimize diffs between the base debian files and each backport to the
changes that actually matter, so that they aren't lost in the noise of
capitalization and ordering differences.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2017-10-10 07:52:46 -07:00
smccroskey
a0d732567e debian: clean up, update base debian/control
this removes some cruft -- old/outdated/incorrect information,
trailing whitespace, etc., and updates the descriptions.  Some small
changes were made where appropriate to minimize the diff between the
base control file and those of the various backports.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2017-10-10 07:52:46 -07:00
smccroskey
20fd86ac23 debian: delete unused files out of debian/
These are unused and not referenced anywhere.

debian/rules.orig: included by mistake
debian/watch: no longer applicable; url is not valid
debian/patches: stale, unused, misleading

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2017-10-10 07:52:46 -07:00
smccroskey
6e6ac031e8 precise/trusty: don't attempt to install pimd or ldpd manuals
Neither of these daemons are installed on 14.04, leading to build
failures now that the man pages are excluded from the Makefiles when
the daemons aren't enabled for install.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2017-10-10 07:52:46 -07:00
smccroskey
5c11eecffd backports: error out on upstream/downstream version mismatch
The quilt source format expects the upstream tarball's version to
correspond roughly to the debian version of the package, and errors
will be thrown (at unpack time, in our case) if it doesn't.  Do a
sanity check when we're building the source package to make sure they
match up.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2017-10-10 07:52:46 -07:00
Martin Winter
5c4e36469f debian: Fix some incorrect references to Quagga instead of FRR
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:46 -07:00
Silas McCroskey
c565f59564 backports: symlink identical files
Testing-done: built all backports in schroots and VMs

made files identical between different backports symlinks
to the ones for the more recent distribution, and updated
relevant tar invocations to follow symlinks.

Signed-off by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2017-10-10 07:52:45 -07:00
Silas McCroskey
a83353ccb5 debian: add pkg-config to build-depends
Testing-done: `--add-depends pkg-config' sbuild

The dependency on pkg-config was introduced recently, and
missed because it's in our schroots by default. Need to add
it for other build environments (e.g. ubuntu schroots).

Signed-off by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2017-10-10 07:52:45 -07:00
Silas McCroskey
0bfcbfec61 debian: move ubuntu 16.04 files into new backports system
Added 'debian/patches' to the exclude file, since the existing patches
interfere with the build and are unused by our build.  No other
changes were necessary.  Used '-0~ubuntu16.04+1' as the version
extention, to denote: no patches (-0), debian packaging files changed
for backport (+1).

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:45 -07:00
Silas McCroskey
fef655d362 debian: move ubuntu 14.04 files into new backports system
`git diff'ed the main (cmaster) branch against the 14.04 branch
to determine changed debian files, then pulled them into
debian/backports via `git cat-file'. Added 'debian/patches' to
the exclude file, since the existing patches interfere with the
build and are unused by our build. Used '-0~ubuntu14.04+1' as
the version extention, to denote: no patches (-0), debian
packaging files changed for backport (+1).

Original commit by Silas with updates on fork name by Martin

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:45 -07:00
Silas McCroskey
01ceb38354 debian: move ubuntu 12.04 files into new backports system
`git diff'ed the main (cmaster) branch against the 12.04 branch
to determine changed debian files, then pulled them into
debian/backports via `git cat-file'. Added 'debian/patches' to
the exclude file, since the existing patches interfere with the
build and are unused by our build. Used '-0~ubuntu12.04+1' as
the version extention, to denote: no patches (-0), debian
packaging files changed for backport (+1).

Original commit by Silas with updates on fork name by Martin

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:45 -07:00
Silas McCroskey
4472c4fba0 debian/backports: include in distfile, don't put files in ..
Testing-done: ran 'make dist', unpacked elsewhere, built from result

Adjusted target to build the .orig.tar.gz accordingly, since it must
exclude the debian/ subdirectory.  Allows for building any backport from
only a tarball.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:45 -07:00
Silas McCroskey
c395cd15ad debian: fix dpkg tool invocations to work on Ubuntu 12.04
dpkg-parsechangelog and dpkg-source were both using flags
not yet available in the versions available on 12.04.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-10 07:52:45 -07:00
Silas McCroskey
8e18f48ee5 debian: structure for building backports from a single branch
Source a makefile (when it exists) in debian/rules to assemble
a source package via:

* a debian.tar.gz tarball built from combining the contents of debian/
  and debian/backports/$backport/debian/ using other details under
  debian/backports/$backport
* an orig.tar.gz file (not generated by this makefile). This can (and
  should) be the same for all backports.

Details in debian/backports/README

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2017-10-10 07:52:44 -07:00
Donald Sharp
2c9b206708 Merge pull request #1318 from opensourcerouting/bgp_mplsvpn_werror_fix
bgpd: fix werror warning for potentially uninitialized variable
2017-10-10 08:23:22 -04:00
Martin Winter
967ea258c2 bgpd: fix werror warning for potentially uninitialized variable
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-10-09 19:27:44 -07:00
Lou Berger
3bc129a4c4 Merge pull request #1284 from donaldsharp/more_mem_leaks
More mem leaks
2017-10-09 09:56:51 -04:00
Renato Westphal
b6c604315f ldpd: detach stdin/stdout/stderr from the child processes
Doing a "ssh user@node 'ldpd -d'" was making the SSH session hang. In
the original OpenBSD's ldpd(8) daemon, the daemon function takes care
of connecting stdin/stdout/stderr to /dev/null. In the FRR port, this
only happens in the frr_run() function, after all children have been
forked. Ideally we could try to rearrange libfrr.c and ldpd.c in a way
that start_child() is called only after the parent connects the standard
I/O streams to /dev/null. But since this issue needs an immediate
fix, let's do this workaround for now. Note: even when running on the
foreground, all log messages from the child processes are sent to the
parent process, which then prints the messages to stdout/stderr and/or
to a log file.

Reported-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-10-05 23:03:21 -03:00
Donald Sharp
f0ccc63174 isisd: Allow adjacency cleanup to free malloc'ed memory
The `struct isis_adjacency` needs to free up memory
associated with the area_addrs ipv4_addrs and ipv6_addrs
lists.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-04 08:49:14 -04:00
Donald Sharp
916c7e84b8 ospf6d: When removing a vertex free memory associated with it
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-04 08:35:29 -04:00
Donald Sharp
79942104bf ospfd: Free memory associated with ospf instance startup
We have memory that is initialized upon ospf instance
and area startup.  Free it up on shutdown.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-04 08:04:00 -04:00
Donald Sharp
27dfc6355d ripngd: Fix possible memory leak of route_node
There exists a path where we do not save the route_node
after creation.  Allow cleanup.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-04 07:55:58 -04:00
Andreas Jaggi
60b153acdf bgpd: Fix AS_PATH size calculation for long paths
If you have an AS_PATH with more entries than
what can be written into a single AS_SEGMENT_MAX
it needs to be broken up.  The code that noticed
that the AS_PATH needs to be broken up was not
correctly calculating the size of the resulting
message.  This patch addresses this issue.

This patch was built from an email that Andreas
sent to the dev alias for FRRouting.

Fixes: #1114
Signed-off-by: Andreas Jaggi <aj@open.ch>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-01 17:54:57 -04:00
Renato Westphal
d31b6db3c3 Merge pull request #1217 from qlyoung/fix-heap-uaf-ospf6
ospf6d: fix heap use after free
2017-09-24 10:54:13 -03:00
Quentin Young
e2ee000bdf
ospf6d: fix heap use after free
During the loop we save a pointer to the next route in the table in case
brouter is deleted during the course of the loop iteration. However when
we call ospf6_route_remove this can trigger ospf6_route_remove on other
routes in the table, one of which could be pointed at by said pointer.
Since ospf6_route_next locks the route that it returns, it won't
actually be deleted, instead the refcount will go to 1. In the next loop
iteration, nbrouter becomes brouter, and calling ospf6_route_next on
this one will finally decrement the refcount to 0, resulting in a free,
which causes subsequent reads on brouter to be UAF. Since the route will
have OSPF6_ROUTE_WAS_REMOVED set, provided the memory was not
overwritten before we got there, we'll continue on to the next one so it
is unlikely this will cause a crash in production.

Solution implemented is to check if we've deleted the route and continue
if so.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-09-22 04:56:25 -04:00
Eric Pulvino
f2a3a14071 Adding Useful Sysctl Settings recommendations. 2017-09-21 08:55:35 -04:00
Donald Sharp
c263436697 Merge pull request #1152 from nkukard/docs-ip-bgp
doc: Updates for 3.0
2017-09-21 08:50:26 -04:00
Donald Sharp
2842a41907 Merge branch 'stable/3.0' into docs-ip-bgp 2017-09-21 08:50:02 -04:00
Renato Westphal
16989e36b1 Merge pull request #1211 from donaldsharp/mem_leaks
Mem leaks
2017-09-21 09:42:45 -03:00
Donald Sharp
e3d06a93f2 bgpd: Fix json memory leak
When issuing 'show bgp ...' commands that dump
the entire table, we were dropping the initial
json_paths = json_object_new_object() memory
allocation.  Fix this.

Additionally reformat the output to fit
better in 80 columns.

There may be additional memory leaks here
hidden away in how we decide to continue
or not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-20 13:14:34 -04:00
Donald Sharp
8b2e7cacaf zebra: Free leaked zclient data structures on shutdown
On shutdown we were deleting the linked list that
kept the zclient connections, but we were not
freeing the data pointed at by the link list.

This modification allows the normal cleanup of the
linked list to cleanup the zclient data structure.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-20 12:52:38 -04:00
Donald Sharp
e3ace5fc9b ripd: Free leaked memory on shutdown
Usage of the address sanitizer and topotests showed
that rip was leaking obuf on shutdown

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-20 12:51:27 -04:00