]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
7 years agodebian: delete unused files out of debian/
smccroskey [Thu, 27 Apr 2017 23:42:43 +0000 (16:42 -0700)]
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>
7 years agoprecise/trusty: don't attempt to install pimd or ldpd manuals
smccroskey [Thu, 27 Apr 2017 21:31:29 +0000 (14:31 -0700)]
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>
7 years agobackports: error out on upstream/downstream version mismatch
smccroskey [Thu, 27 Apr 2017 21:27:09 +0000 (14:27 -0700)]
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>
7 years agodebian: Fix some incorrect references to Quagga instead of FRR
Martin Winter [Thu, 16 Feb 2017 18:49:00 +0000 (01:49 +0700)]
debian: Fix some incorrect references to Quagga instead of FRR

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agobackports: symlink identical files
Silas McCroskey [Tue, 14 Feb 2017 17:48:57 +0000 (00:48 +0700)]
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>

7 years agodebian: add pkg-config to build-depends
Silas McCroskey [Tue, 14 Feb 2017 17:34:42 +0000 (00:34 +0700)]
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>

7 years agodebian: move ubuntu 16.04 files into new backports system
Silas McCroskey [Tue, 14 Feb 2017 15:48:19 +0000 (22:48 +0700)]
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>
7 years agodebian: move ubuntu 14.04 files into new backports system
Silas McCroskey [Tue, 14 Feb 2017 15:44:17 +0000 (22:44 +0700)]
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>
7 years agodebian: move ubuntu 12.04 files into new backports system
Silas McCroskey [Tue, 14 Feb 2017 15:34:56 +0000 (22:34 +0700)]
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>
7 years agodebian/backports: include in distfile, don't put files in ..
Silas McCroskey [Tue, 14 Feb 2017 12:04:10 +0000 (19:04 +0700)]
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>
7 years agodebian: fix dpkg tool invocations to work on Ubuntu 12.04
Silas McCroskey [Tue, 14 Feb 2017 11:52:40 +0000 (18:52 +0700)]
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>
7 years agodebian: structure for building backports from a single branch
Silas McCroskey [Tue, 14 Feb 2017 11:45:50 +0000 (18:45 +0700)]
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>
7 years agoMerge pull request #1318 from opensourcerouting/bgp_mplsvpn_werror_fix
Donald Sharp [Tue, 10 Oct 2017 12:23:22 +0000 (08:23 -0400)]
Merge pull request #1318 from opensourcerouting/bgp_mplsvpn_werror_fix

bgpd: fix werror warning for potentially uninitialized variable

7 years agobgpd: fix werror warning for potentially uninitialized variable 1318/head
Martin Winter [Tue, 10 Oct 2017 02:27:44 +0000 (19:27 -0700)]
bgpd: fix werror warning for potentially uninitialized variable

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoMerge pull request #1284 from donaldsharp/more_mem_leaks
Lou Berger [Mon, 9 Oct 2017 13:56:51 +0000 (09:56 -0400)]
Merge pull request #1284 from donaldsharp/more_mem_leaks

More mem leaks

7 years agoldpd: detach stdin/stdout/stderr from the child processes
Renato Westphal [Tue, 3 Oct 2017 19:11:07 +0000 (16:11 -0300)]
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>
7 years agoisisd: Allow adjacency cleanup to free malloc'ed memory 1284/head
Donald Sharp [Wed, 4 Oct 2017 12:49:14 +0000 (08:49 -0400)]
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>
7 years agoospf6d: When removing a vertex free memory associated with it
Donald Sharp [Wed, 4 Oct 2017 12:35:29 +0000 (08:35 -0400)]
ospf6d: When removing a vertex free memory associated with it

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoospfd: Free memory associated with ospf instance startup
Donald Sharp [Wed, 4 Oct 2017 12:04:00 +0000 (08:04 -0400)]
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>
7 years agoripngd: Fix possible memory leak of route_node
Donald Sharp [Wed, 4 Oct 2017 11:55:58 +0000 (07:55 -0400)]
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>
7 years agobgpd: Fix AS_PATH size calculation for long paths
Andreas Jaggi [Fri, 8 Sep 2017 11:46:20 +0000 (07:46 -0400)]
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>
7 years agoMerge pull request #1217 from qlyoung/fix-heap-uaf-ospf6
Renato Westphal [Sun, 24 Sep 2017 13:54:13 +0000 (10:54 -0300)]
Merge pull request #1217 from qlyoung/fix-heap-uaf-ospf6

ospf6d: fix heap use after free

7 years agoospf6d: fix heap use after free 1217/head
Quentin Young [Thu, 21 Sep 2017 20:03:17 +0000 (16:03 -0400)]
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>
7 years agoAdding Useful Sysctl Settings recommendations.
Eric Pulvino [Mon, 18 Sep 2017 15:53:29 +0000 (11:53 -0400)]
Adding Useful Sysctl Settings recommendations.

7 years agoMerge pull request #1152 from nkukard/docs-ip-bgp
Donald Sharp [Thu, 21 Sep 2017 12:50:26 +0000 (08:50 -0400)]
Merge pull request #1152 from nkukard/docs-ip-bgp

doc: Updates for 3.0

7 years agoMerge branch 'stable/3.0' into docs-ip-bgp 1152/head
Donald Sharp [Thu, 21 Sep 2017 12:50:02 +0000 (08:50 -0400)]
Merge branch 'stable/3.0' into docs-ip-bgp

7 years agoMerge pull request #1211 from donaldsharp/mem_leaks
Renato Westphal [Thu, 21 Sep 2017 12:42:45 +0000 (09:42 -0300)]
Merge pull request #1211 from donaldsharp/mem_leaks

Mem leaks

7 years agobgpd: Fix json memory leak 1211/head
Donald Sharp [Wed, 20 Sep 2017 16:56:38 +0000 (12:56 -0400)]
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>
7 years agozebra: Free leaked zclient data structures on shutdown
Donald Sharp [Wed, 20 Sep 2017 16:52:38 +0000 (12:52 -0400)]
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>
7 years agoripd: Free leaked memory on shutdown
Donald Sharp [Wed, 20 Sep 2017 16:51:27 +0000 (12:51 -0400)]
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>
7 years agovtysh: Cleanup some stuff(tm)
Donald Sharp [Mon, 22 May 2017 19:43:20 +0000 (15:43 -0400)]
vtysh: Cleanup some stuff(tm)

1) vtysh_config_dump was not properly indented.  Fix

2) Add VRF_NODE to be line_uniq when parsing return from sub-daemons

3) Fix 'no log monitor' to be line_uniq as well

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #1176 from opensourcerouting/isis-stable-circuit-ids
Donald Sharp [Wed, 20 Sep 2017 11:55:55 +0000 (07:55 -0400)]
Merge pull request #1176 from opensourcerouting/isis-stable-circuit-ids

isisd: generate unique circuit ids

7 years agovtysh: fix various show commands
Quentin Young [Wed, 21 Jun 2017 18:42:17 +0000 (18:42 +0000)]
vtysh: fix various show commands

need 'do' to force ENABLE_NODE

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agolib: allow 'do' commands in ENABLE_NODE
Quentin Young [Wed, 14 Jun 2017 19:47:14 +0000 (19:47 +0000)]
lib: allow 'do' commands in ENABLE_NODE

'do' is syntax sugar that allows the user to execute a command under
ENABLE_NODE when in another CLI node. If the user is already in
ENABLE_NODE, use of 'do' was previously disallowed. This patch allows it
because it makes it easier for us to hack around certain instances of
the node synchronization problem with vtysh.

Also included is a fix for one of these problems.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoisisd: generate unique circuit ids 1176/head
Christian Franke [Thu, 14 Sep 2017 13:26:33 +0000 (15:26 +0200)]
isisd: generate unique circuit ids

Circuit IDs need to be unique, otherwise mayhem will ensue.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoldpd: fix broken label allocation frr-3.0-rc2
Renato Westphal [Tue, 12 Sep 2017 12:46:31 +0000 (09:46 -0300)]
ldpd: fix broken label allocation

Once ldpd allocated label 48 for a given FEC, all subsequent requests
for a new label would return the same value (48). The problem is that
we were left shifting an uint32_t value up to 64 times, losing important
information.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #1159 from opensourcerouting/doc-tcp-zebra
Russ White [Wed, 13 Sep 2017 20:24:30 +0000 (16:24 -0400)]
Merge pull request #1159 from opensourcerouting/doc-tcp-zebra

doc: remove --enable-tcp-zebra from the build instructions (3.0)

7 years agoMerge pull request #1168 from donaldsharp/show_ver
Russ White [Wed, 13 Sep 2017 20:18:57 +0000 (16:18 -0400)]
Merge pull request #1168 from donaldsharp/show_ver

lib: Add json support for 'show version' command

7 years agolib: Add json support for 'show version' command 1168/head
Donald Sharp [Tue, 12 Sep 2017 20:27:39 +0000 (16:27 -0400)]
lib: Add json support for 'show version' command

Fixes: #1167
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agorelease: FRR 3.0-rc2
Donald Sharp [Tue, 12 Sep 2017 17:23:51 +0000 (13:23 -0400)]
release: FRR 3.0-rc2

7 years agodoc: remove --enable-tcp-zebra from the build instructions 1159/head
Renato Westphal [Tue, 12 Sep 2017 12:58:00 +0000 (09:58 -0300)]
doc: remove --enable-tcp-zebra from the build instructions

This parameter was removed by commit 01c9f29.

Fixes #1146.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #1141 from nkukard/lc-docs-3.0
David Lamparter [Mon, 11 Sep 2017 09:00:28 +0000 (11:00 +0200)]
Merge pull request #1141 from nkukard/lc-docs-3.0

docs: Added large-community documentation

7 years agoMerge pull request #1128 from subsecond/patch-3
David Lamparter [Mon, 11 Sep 2017 08:59:53 +0000 (10:59 +0200)]
Merge pull request #1128 from subsecond/patch-3

Build FRR using branch stable/3.0

7 years agovtysh: Fix shell executed commands
Donald Sharp [Mon, 31 Jul 2017 12:52:10 +0000 (08:52 -0400)]
vtysh: Fix shell executed commands

Pretty much all shell executed commands from vtysh were
not behaving correctly due to errors introduced in
switching to the new cli.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agodoc: Cleaned up BGP showing of information section
Nigel Kukard [Sat, 9 Sep 2017 10:27:16 +0000 (10:27 +0000)]
doc: Cleaned up BGP showing of information section

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agodoc: English language cleanup
Nigel Kukard [Sat, 9 Sep 2017 10:15:26 +0000 (10:15 +0000)]
doc: English language cleanup

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agodoc: Moved AS regular expressions to BGP regular expressions
Nigel Kukard [Sat, 9 Sep 2017 10:09:27 +0000 (10:09 +0000)]
doc: Moved AS regular expressions to BGP regular expressions

Regular expressions are used throughout in bgp commands, it
should not be in a section under as paths which cannot be
easily found.

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agodoc: Clarified the use of show bgp ipv4/ipv6 for communities
Nigel Kukard [Sat, 9 Sep 2017 09:51:09 +0000 (09:51 +0000)]
doc: Clarified the use of show bgp ipv4/ipv6 for communities

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agonhrpd: Fix missing include for 'access_list_init' function
Donald Sharp [Fri, 26 May 2017 20:19:08 +0000 (16:19 -0400)]
nhrpd: Fix missing include for 'access_list_init' function

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: add #pragma's to ignore flex sign cmp error
Quentin Young [Fri, 7 Apr 2017 17:40:11 +0000 (17:40 +0000)]
lib: add #pragma's to ignore flex sign cmp error

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agodocs: Added large-community documentation 1141/head
Nigel Kukard [Fri, 8 Sep 2017 12:24:52 +0000 (12:24 +0000)]
docs: Added large-community documentation

Closes #1140

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agoBuild FRR using branch stable/3.0 1128/head
Manuel Schweizer [Fri, 8 Sep 2017 10:48:39 +0000 (12:48 +0200)]
Build FRR using branch stable/3.0

Change all build instructions to include checkout of the respective branch.

7 years agoMerge pull request #1126 from subsecond/patch-2
Donald Sharp [Fri, 8 Sep 2017 00:30:34 +0000 (20:30 -0400)]
Merge pull request #1126 from subsecond/patch-2

Typos and formatting

7 years agoBuild FRR using branch stable/3.0
Manuel Schweizer [Thu, 7 Sep 2017 18:51:35 +0000 (20:51 +0200)]
Build FRR using branch stable/3.0

This is the documentation for Ubuntu 16.04 in branch stable/3.0. Hence it is important to checkout the respective branch before building FRR.

7 years agoTypos and formatting 1126/head
Manuel Schweizer [Thu, 7 Sep 2017 17:25:24 +0000 (19:25 +0200)]
Typos and formatting

7 years agoMerge pull request #1116 from opensourcerouting/attr-refcount-kill
Donald Sharp [Thu, 7 Sep 2017 13:39:54 +0000 (09:39 -0400)]
Merge pull request #1116 from opensourcerouting/attr-refcount-kill

[3.0] kill bgp_attr_refcount()

7 years agobgpd: fix lcommunity refs in table-map 1116/head
David Lamparter [Thu, 7 Sep 2017 12:51:00 +0000 (14:51 +0200)]
bgpd: fix lcommunity refs in table-map

bgp_attr_deep_dup() needs to be removed just like bgp_attr_refcount(),
but that's a little too intrusive for the 3.0 branch at this point.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: kill bgp_attr_refcount()
David Lamparter [Thu, 7 Sep 2017 12:24:00 +0000 (14:24 +0200)]
bgpd: kill bgp_attr_refcount()

This attempt at optimization has cost us more than a week's worth of
time on several people hunting down the subtle bug that it was missing
an increment on attr->lcommunity.

This is absolutely not worth the maintenance cost.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: Modify attr->flag to be 64 bit
Donald Sharp [Fri, 10 Mar 2017 12:59:52 +0000 (07:59 -0500)]
bgpd: Modify attr->flag to be 64 bit

With the some current bgp drafts the Attribute number has
surpassed 32.  Which is a bit unfortunate in that we keep
track of the attributes via a bitfield based on the attribute #.

For the moment since I am not aware of Attribute #'s being
greater than 64, convert the flag to 64 bit and allow the
bit shifting to know about it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #1097 from nkukard/nk3.0
Donald Sharp [Sun, 3 Sep 2017 15:29:04 +0000 (11:29 -0400)]
Merge pull request #1097 from nkukard/nk3.0

Large community fixes (critical)

7 years agobgpd: Fixed incorrect MTYPE being used for large communites 1097/head
Nigel Kukard [Sun, 3 Sep 2017 05:20:48 +0000 (05:20 +0000)]
bgpd: Fixed incorrect MTYPE being used for large communites

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Fixed pointer calculation issue in lcommunity
Nigel Kukard [Fri, 1 Sep 2017 23:36:11 +0000 (23:36 +0000)]
bgpd: Fixed pointer calculation issue in lcommunity

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agovtysh: Fix for the ordering of large-community lists in config output
Nigel Kukard [Mon, 28 Aug 2017 18:35:15 +0000 (18:35 +0000)]
vtysh: Fix for the ordering of large-community lists in config output

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Fixed pointer arithmatic miscalculation
Nigel Kukard [Thu, 31 Aug 2017 09:27:46 +0000 (09:27 +0000)]
bgpd: Fixed pointer arithmatic miscalculation

If we increment PTR by i * size each time, we end up doing 1, 3, 6
etc.

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Fixed incorrect large community pointer calculation
Nigel Kukard [Wed, 30 Aug 2017 07:35:31 +0000 (07:35 +0000)]
bgpd: Fixed incorrect large community pointer calculation

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Fixed incorrect calculation of pointer location
Nigel Kukard [Wed, 30 Aug 2017 09:39:36 +0000 (09:39 +0000)]
bgpd: Fixed incorrect calculation of pointer location

com_index_to_delete[i] holds the location in lcom->val of where the
value is stored, we cannot just increment it by this value on each
iteration as we'll overflow the size of lcom->val.

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Fixed potential memory leak if additive is false
Nigel Kukard [Wed, 30 Aug 2017 07:37:19 +0000 (07:37 +0000)]
bgpd: Fixed potential memory leak if additive is false

The else portion of the IF dups the lc, but doesn't free old

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Fixed potential memory leak if additive is false in normal communities
Nigel Kukard [Wed, 30 Aug 2017 08:27:15 +0000 (08:27 +0000)]
bgpd: Fixed potential memory leak if additive is false in normal communities

The else portion of the IF dups the community, but doesn't free old

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Fixed typo in the lc list type being matched on
Nigel Kukard [Wed, 30 Aug 2017 07:44:18 +0000 (07:44 +0000)]
bgpd: Fixed typo in the lc list type being matched on

This should be EXPANDED, not STANDARD.

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agoMerge pull request #1070 from opensourcerouting/isis-spf-debug-guard-stable
Donald Sharp [Tue, 29 Aug 2017 17:05:49 +0000 (13:05 -0400)]
Merge pull request #1070 from opensourcerouting/isis-spf-debug-guard-stable

Isis spf debug guard stable

7 years agoisisd: guard SPF warning by debug flag 1070/head
Christian Franke [Mon, 28 Aug 2017 22:28:04 +0000 (00:28 +0200)]
isisd: guard SPF warning by debug flag

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agolib: "show route-map" is missing from the parser
Daniel Walton [Wed, 14 Jun 2017 18:21:17 +0000 (18:21 +0000)]
lib: "show route-map" is missing from the parser

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
(cherry picked from commit 6d2729e3d793bdc190f5d59b6f9825ab42d80123)

7 years agoMerge pull request #1035 from opensourcerouting/isisd-simple-enhance-dict_verify
Donald Sharp [Wed, 23 Aug 2017 20:28:02 +0000 (16:28 -0400)]
Merge pull request #1035 from opensourcerouting/isisd-simple-enhance-dict_verify

isisd: don't validate dict integrity for regular builds

7 years agobgpd: fix file descriptor leak
Renato Westphal [Tue, 22 Aug 2017 23:09:26 +0000 (20:09 -0300)]
bgpd: fix file descriptor leak

Bug introduced by commit 37d361e7. Removing the call to bgp_close()
from bgp_delete() was a mistake.

Reported-by: Don Slice <dslice@cumulusnetworks.com>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoisisd: don't validate dict integrity for regular builds 1035/head
Christian Franke [Fri, 4 Aug 2017 13:44:45 +0000 (15:44 +0200)]
isisd: don't validate dict integrity for regular builds

This method is intended to be only used for debugging as per the author
and profiling shows we are spending a lot of cycles on it. Remove it for
regular builds by guarding it with a define.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoMerge pull request #1015 from opensourcerouting/3.0-minor
Donald Sharp [Tue, 22 Aug 2017 12:54:28 +0000 (08:54 -0400)]
Merge pull request #1015 from opensourcerouting/3.0-minor

[3.0] kill tcp-zebra, put pseudowire-show under mpls

7 years agobuild: fix --disable-snmp 1015/head
David Lamparter [Mon, 31 Jul 2017 20:34:26 +0000 (22:34 +0200)]
build: fix --disable-snmp

--disable-foo results in "no" as value in $enable_foo

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobuild: remove tcp-zebra option
David Lamparter [Mon, 21 Aug 2017 12:29:30 +0000 (14:29 +0200)]
build: remove tcp-zebra option

It's a security hazard.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agozebra: put pseudowire show cmd under mpls
David Lamparter [Fri, 18 Aug 2017 11:10:36 +0000 (13:10 +0200)]
zebra: put pseudowire show cmd under mpls

Let's group this where it belongs and not clutter the commands too much.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/964' into stable/3.0
David Lamparter [Wed, 16 Aug 2017 13:20:14 +0000 (15:20 +0200)]
Merge branch 'frr/pull/964' into stable/3.0

This accidentally ended up merged to master... *derp*

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #975 from opensourcerouting/isis-csnp-stable-fix
Quentin Young [Mon, 14 Aug 2017 15:28:01 +0000 (11:28 -0400)]
Merge pull request #975 from opensourcerouting/isis-csnp-stable-fix

isisd: always link fragments to fragment #0, even when learned by CSNP

7 years agoisisd: always link fragments to fragment #0, even when learned by CSNP 975/head
Christian Franke [Mon, 14 Aug 2017 08:51:58 +0000 (10:51 +0200)]
isisd: always link fragments to fragment #0, even when learned by CSNP

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agolib: fix prefix list trie corruption 964/head
David Lamparter [Fri, 11 Aug 2017 16:54:26 +0000 (18:54 +0200)]
lib: fix prefix list trie corruption

The specific code here needs to establish an absolute order of more
specific to less specific possible matches in a prefix list.  This is
indirectly checked by an assert on insertion, because the "next best"
entry is required to be consistent even when joining multiple chains
of candidates.

Unfortunately, trie_install_fn() would insert entries too far ahead in
the chain if another entry with higher sequence number was seen.  This
breaks the trie and (rightfully) triggers the assertion failure on
insert.

Fixes: #937
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agorelease: FRR 3.0-rc1 frr-3.0-rc1
David Lamparter [Wed, 9 Aug 2017 10:56:09 +0000 (12:56 +0200)]
release: FRR 3.0-rc1

7 years ago*: reindent reindent-3.0-after
whitespace / reindent [Wed, 9 Aug 2017 09:49:42 +0000 (11:49 +0200)]
*: reindent

indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #920 from opensourcerouting/static-routes-ifindex-update-3.0 reindent-3.0-before
Donald Sharp [Tue, 8 Aug 2017 17:39:38 +0000 (13:39 -0400)]
Merge pull request #920 from opensourcerouting/static-routes-ifindex-update-3.0

[3.0] fixup static routes' ifindexes when interfaces (dis)appear

7 years agoMerge pull request #783 from opensourcerouting/pw-manager-2
Donald Sharp [Tue, 8 Aug 2017 11:54:32 +0000 (07:54 -0400)]
Merge pull request #783 from opensourcerouting/pw-manager-2

Add Pseudowire management in Zebra

7 years agozebra: vrf: remove VRF-move static route updating 920/head
David Lamparter [Sun, 6 Aug 2017 05:50:18 +0000 (07:50 +0200)]
zebra: vrf: remove VRF-move static route updating

This was incorrectly implemented to begin with (it only re-added routes,
but didn't remove them) and is now covered in static_ifindex_update.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agozebra: static: update on ifindex changes
David Lamparter [Sun, 6 Aug 2017 03:14:39 +0000 (05:14 +0200)]
zebra: static: update on ifindex changes

Whenever an interface is created or deleted in the system, we need to
check whether we have static routes referencing that interface by name.
If so, we need to [un]install these routes.

This has the unfortunate side effect of making static routes with
non-existent interfaces disappear from "show ip route", but I think
that's acceptable (and I don't see a "good" fix for that).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agozebra: static: rename IFINDEX -> IFNAME
David Lamparter [Sun, 6 Aug 2017 02:32:55 +0000 (04:32 +0200)]
zebra: static: rename IFINDEX -> IFNAME

Static routes are really held by ifname, not ifindex.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #907 from opensourcerouting/vty-close-3.0
Russ White [Fri, 4 Aug 2017 17:14:18 +0000 (13:14 -0400)]
Merge pull request #907 from opensourcerouting/vty-close-3.0

[3.0] lib: vty: fix config-write fd leak

7 years agolib: vty: fix config-write fd leak 907/head
David Lamparter [Fri, 4 Aug 2017 10:05:38 +0000 (12:05 +0200)]
lib: vty: fix config-write fd leak

Since we were only setting vty->wfd in config_write, vty->fd would
remain 0 and vty_close() wouldn't close vty->wfd.

Clean up the entire fd closing and make it more explicit.  We were even
trying to write to stdin...

[master commit: 10b8a9c]
Reported-by: Jorge Boncompte <jbonor@gmail.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agozebra: add support for static pseudowires 783/head
Renato Westphal [Tue, 1 Aug 2017 23:16:28 +0000 (20:16 -0300)]
zebra: add support for static pseudowires

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #885 from bingen/fix_debug_directive
Russ White [Tue, 1 Aug 2017 11:37:01 +0000 (07:37 -0400)]
Merge pull request #885 from bingen/fix_debug_directive

Fix debug directive

7 years agoospf: Fix segfault if compiled with DEBUG 885/head
ßingen [Tue, 1 Aug 2017 09:38:19 +0000 (11:38 +0200)]
ospf: Fix segfault if compiled with DEBUG

If OSPF_LS_REFRESH_TIME is 60, min_delay in ospf_refresher_register_lsa
function (ospf_lsa.c) would be negative, so index (which is unsigned)
would be out of range, causing a segfault.

Signed-off-by: ßingen <bingen@voltanet.io>
7 years agoospf6: Fix DEBUG compiling error
ßingen [Tue, 1 Aug 2017 09:34:15 +0000 (11:34 +0200)]
ospf6: Fix DEBUG compiling error

struct ospf6_lsa doesn't have next nor prev, so it was raising a
compiling error if DEBUG is set.

Signed-off-by: ßingen <bingen@voltanet.io>
7 years agoMerge pull request #849 from opensourcerouting/ldpd-ds-fix
Daniel Walton [Fri, 28 Jul 2017 12:25:21 +0000 (08:25 -0400)]
Merge pull request #849 from opensourcerouting/ldpd-ds-fix

ldpd: fix bug with dual-stack neighbors

7 years agoMerge pull request #851 from opensourcerouting/bsd-speed
Donald Sharp [Tue, 25 Jul 2017 12:14:39 +0000 (08:14 -0400)]
Merge pull request #851 from opensourcerouting/bsd-speed

zebra: fetch interface speed on *BSD

7 years agozebra: fetch interface speed on *BSD 851/head
Renato Westphal [Fri, 21 Jul 2017 18:09:58 +0000 (15:09 -0300)]
zebra: fetch interface speed on *BSD

Fixes #407 for FreeBSD and NetBSD.

OpenBSD uses ioctl to fetch interface information on startup and the
SIOCGIFMEDIA command is just too cumbersome to use.

The best way to fix the problem for OpenBSD is probably to stop treating
it differently from the other BSDs for no apparent reason.  There should
be nothing preventing us to make OpenBSD use the routing socket to fetch
interface information on startup (we already do it to detect runtime
changes). This is something that should be done in a separate commit
after a careful analysis.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: add label information to json output
Renato Westphal [Tue, 25 Jul 2017 04:08:46 +0000 (01:08 -0300)]
zebra: add label information to json output

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>