]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
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>
7 years agoldpd: fix missing label mappings
Renato Westphal [Thu, 6 Jul 2017 03:46:34 +0000 (00:46 -0300)]
ldpd: fix missing label mappings

In some scenarios, it's possible to send a Label Withdraw to a neighbor
and not receive a corresponding Label Release right away. This can happen
during reconvergence after a network failure or configuration change.

When this happens, the list of upstream mappings of a given FEC might
not be empty even after sending a Label Withdraw to all neighbors. This
situation holds until all neighbors either send a Label Release or are
torn down (e.g. keepalive timeout).

With that said, we shouldn't check for 'RB_EMPTY(&fn->upstream)'
in lde_kernel_update() because it can prevent ldpd from sending label
mappings in such circumstances. This check was introduced to avoid sending
the same label mapping more than once to the same neighbor, but we need
to remove this optimization for now until we find a better solution (which
probably involves refactoring the whole zebra<->ldpd communication).

While here, add a new debug message in lde_send_labelmapping() which
can aid in troubleshooting label problems in the future.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: add support to openbsd's mpw(4) for pseudowires
Renato Westphal [Fri, 30 Jun 2017 15:18:21 +0000 (12:18 -0300)]
zebra: add support to openbsd's mpw(4) for pseudowires

Thanks to rzalamena@ for writing mpw(4) :)

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: integrate with the pseudowire manager in zebra
Renato Westphal [Fri, 30 Jun 2017 15:19:39 +0000 (12:19 -0300)]
ldpd: integrate with the pseudowire manager in zebra

If we receive a notification from zebra indicating that the installation
of a pseudowire has failed (e.g. no reachability), send a PW Status
notification to the remote peer (or a Label Withdraw if the remote peer
doesn't support the PW Status TLV).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: add new flag to detect nexthop label updates
Renato Westphal [Thu, 8 Jun 2017 23:29:12 +0000 (20:29 -0300)]
zebra: add new flag to detect nexthop label updates

With the introduction of the pseudowire manager, the NHT tracking code
needs to detect label updates as well.

Create a specific nexthop flag for that. We can't reuse the
RIB_ENTRY_NEXTHOPS_CHANGED flag for this porpose because this flag is
always cleared and reevaluated in rib_process(), setting it outside that
function is a nop.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: add nexthop tracking for pseudowires
Renato Westphal [Fri, 30 Jun 2017 15:26:04 +0000 (12:26 -0300)]
zebra: add nexthop tracking for pseudowires

If the remote end of a pseudowire becomes unreachable (no route or an
unlabeled route), then it must be uninstalled. In the same way, when
the remote end becomes reachable, the pseudowire must be installed.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: add pseudowire manager
ßingen [Mon, 15 May 2017 15:09:28 +0000 (17:09 +0200)]
zebra: add pseudowire manager

Base framework for supporting MPLS pseudowires in FRR.

A consistent zserv interface is provided so that any client daemon
(e.g. ldpd, bgpd) can install/uninstall pseudowires in a standard
way. Static pseudowires can also be implemented by using the same
interface.

When zebra receives a request to install a pseudowire and the installation
in the kernel or hardware fails, a notification is sent back to the
client daemon and a new install attempt is made every 60 seconds (until
it succeeds).

Support for external dataplanes is provided by the use of hooks to
install/uninstall pseudowires.

Signed-off-by: ßingen <bingen@voltanet.io>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: add implicit-null labels to the rib
Renato Westphal [Tue, 6 Jun 2017 01:48:10 +0000 (22:48 -0300)]
zebra: add implicit-null labels to the rib

Implicit-null labels are never installed in the FIB but we need to keep
track of them because of L2/L3 VPN nexthop resolution.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: fix bug with dual-stack neighbors 849/head
Renato Westphal [Mon, 24 Jul 2017 21:57:20 +0000 (18:57 -0300)]
ldpd: fix bug with dual-stack neighbors

We were assuming that a neighbor can be deleted only when all of its
adjacencies are dead. This is not the case for dual-stack neighbors. If
the transport-preference is IPv4 and all adjacencies are IPv6 (or
vice-versa), then it should be deleted and everything cleaned-up
accordingly.

Bug exposed by the new RB tree implementation on master, but the fix
also applies to stable/3.0.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #802 from opensourcerouting/redhat-doc-fixes-3.0
Donald Sharp [Fri, 14 Jul 2017 14:59:18 +0000 (10:59 -0400)]
Merge pull request #802 from opensourcerouting/redhat-doc-fixes-3.0

Redhat doc fixes for stable/3.0

7 years agoMerge pull request #785 from Jafaral/debpkgfix3.0
Donald Sharp [Wed, 12 Jul 2017 12:26:30 +0000 (08:26 -0400)]
Merge pull request #785 from Jafaral/debpkgfix3.0

Deb pkg cleanup for 3.0/2.0

7 years agodoc: Update Building Doc for RedHat-style Distro's (CentOS / Fedora) 802/head
Martin Winter [Wed, 12 Jul 2017 01:37:02 +0000 (18:37 -0700)]
doc: Update Building Doc for RedHat-style Distro's (CentOS / Fedora)

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Add missing pimd to daemon config file
Martin Winter [Wed, 12 Jul 2017 01:36:41 +0000 (18:36 -0700)]
redhat: Add missing pimd to daemon config file

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agodocs: Changed the manpage section from 1 to 8 so it conforms with its definition 785/head
Ryan Hagelstrom [Fri, 30 Jun 2017 19:21:11 +0000 (14:21 -0500)]
docs: Changed the manpage section from 1 to 8 so it conforms with its definition

Signed-off-by: Ryan Hagelstrom <rhagelstrom@gmail.com>
7 years agoMerge pull request #773 from qlyoung/log-fix-3.0
Donald Sharp [Fri, 30 Jun 2017 19:08:53 +0000 (15:08 -0400)]
Merge pull request #773 from qlyoung/log-fix-3.0

*: simplify log message lookup [3.0]

7 years ago*: simplify log message lookup 773/head
Quentin Young [Tue, 20 Jun 2017 23:56:50 +0000 (23:56 +0000)]
*: simplify log message lookup

log.c provides functionality for associating a constant (typically a
protocol constant) with a string and finding the string given the
constant. However this is highly delicate code that is extremely prone
to stack overflows and off-by-one's due to requiring the developer to
always remember to update the array size constant and to do so correctly
which, as shown by example, is never a good idea.b

The original goal of this code was to try to implement lookups in O(1)
time without a linear search through the message array. Since this code
is used 99% of the time for debugs, it's worth the 5-6 additional cmp's
worst case if it means we avoid explitable bugs due to oversights...

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #756 from opensourcerouting/isis-redist-fixes
Donald Sharp [Wed, 28 Jun 2017 13:55:35 +0000 (09:55 -0400)]
Merge pull request #756 from opensourcerouting/isis-redist-fixes

Isis redist fixes

7 years agoMerge pull request #709 from opensourcerouting/ldpd-dual-stack
ßingen [Tue, 27 Jun 2017 13:37:52 +0000 (15:37 +0200)]
Merge pull request #709 from opensourcerouting/ldpd-dual-stack

ldpd: fix issues with dual-stack adjacencies

7 years agoMerge pull request #704 from chiragshah6/pim_dev_3_0
Jafar Al-Gharaibeh [Fri, 23 Jun 2017 15:29:27 +0000 (10:29 -0500)]
Merge pull request #704 from chiragshah6/pim_dev_3_0

ospfd: ospf bandwidth handling

7 years agoisisd: fix to adhere to new cli api 756/head
Christian Franke [Tue, 20 Jun 2017 20:49:37 +0000 (22:49 +0200)]
isisd: fix to adhere to new cli api

7 years agoisisd: fix memtype counting issue
Christian Franke [Tue, 20 Jun 2017 20:48:36 +0000 (22:48 +0200)]
isisd: fix memtype counting issue

7 years agoisisd: adjust redist functionality to current zapi
Christian Franke [Tue, 20 Jun 2017 20:47:54 +0000 (22:47 +0200)]
isisd: adjust redist functionality to current zapi

7 years agoisisd: fix formatting in metrics when showing database
Christian Franke [Tue, 20 Jun 2017 20:46:41 +0000 (22:46 +0200)]
isisd: fix formatting in metrics when showing database

7 years agoMerge pull request #713 from qlyoung/fix-zebra-dbz-3.0
David Lamparter [Fri, 16 Jun 2017 17:40:52 +0000 (19:40 +0200)]
Merge pull request #713 from qlyoung/fix-zebra-dbz-3.0

Fix zebra div by zero

7 years agozebra: more dbzing 713/head
Quentin Young [Fri, 16 Jun 2017 16:18:54 +0000 (16:18 +0000)]
zebra: more dbzing

Revert to the previous <= restrictions, improve error messages, fix the
divide by zero.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoospfd: correct typo in zebra trace 704/head
Chirag Shah [Wed, 14 Jun 2017 20:30:08 +0000 (13:30 -0700)]
ospfd: correct typo in zebra trace

added comment around which bw value used.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agozebra: fix divide-by-zero
Quentin Young [Wed, 14 Jun 2017 14:06:01 +0000 (14:06 +0000)]
zebra: fix divide-by-zero

x % 0 = FPE

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #712 from opensourcerouting/fix-issue-683
Donald Sharp [Wed, 14 Jun 2017 10:51:06 +0000 (06:51 -0400)]
Merge pull request #712 from opensourcerouting/fix-issue-683

Fix srcdest blackhole routes

7 years agozebra: fix ipv6 route command description strings 712/head
Christian Franke [Wed, 14 Jun 2017 07:23:40 +0000 (09:23 +0200)]
zebra: fix ipv6 route command description strings

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agozebra: pass srcdest information also when creating blackhole routes
Christian Franke [Wed, 14 Jun 2017 07:23:36 +0000 (09:23 +0200)]
zebra: pass srcdest information also when creating blackhole routes

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoldpd: fix issues with dual-stack adjacencies 709/head
Renato Westphal [Tue, 13 Jun 2017 13:32:24 +0000 (10:32 -0300)]
ldpd: fix issues with dual-stack adjacencies

Handling configuration changes from single-stack mode to dual-stack mode
(and vice-versa) is tricky. This patch attempts to solve all issues that
might happen on such circumstances.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #681 (ASAN warnings)
David Lamparter [Tue, 13 Jun 2017 15:16:24 +0000 (17:16 +0200)]
Merge pull request #681 (ASAN warnings)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoospfd: ospf bandwidth handling
Chirag Shah [Mon, 12 Jun 2017 20:17:28 +0000 (13:17 -0700)]
ospfd: ospf bandwidth handling

Handle proper indent and insert missing not statement.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoospfd: ospf bandwidth handling
Chirag Shah [Mon, 12 Jun 2017 16:53:21 +0000 (09:53 -0700)]
ospfd: ospf bandwidth handling

if bandwidth is not set from Zebra use speed as bandwidth
for ospf route.

Testing Done:
Verfied over bond which has aggregated speed of all member interfaces,
cost is reflected in ospf route and ip route.
Manually changed interface bandwidth which replaces speed as bw, instead
uses cli entered value as bw, verifid output of ospf route and ip route.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoisisd: fix heap uaf, round 2 681/head
Quentin Young [Fri, 9 Jun 2017 14:53:11 +0000 (14:53 +0000)]
isisd: fix heap uaf, round 2

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #688 from opensourcerouting/openbsd-mpls-fixes
Donald Sharp [Wed, 7 Jun 2017 14:19:53 +0000 (10:19 -0400)]
Merge pull request #688 from opensourcerouting/openbsd-mpls-fixes

Small fixes for OpenBSD

7 years agodoc: update build instructions for openbsd 688/head
Renato Westphal [Wed, 7 Jun 2017 13:00:34 +0000 (10:00 -0300)]
doc: update build instructions for openbsd

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: fix uninstallation of mpls lsps in openbsd
Renato Westphal [Wed, 7 Jun 2017 12:53:15 +0000 (09:53 -0300)]
zebra: fix uninstallation of mpls lsps in openbsd

While here, fix a warning in kernel_lsp_cmd().

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: remove pledge calls
Renato Westphal [Wed, 7 Jun 2017 00:24:02 +0000 (21:24 -0300)]
ldpd: remove pledge calls

In OpenBSD pledge is a mitigation mechanism used to restrict the syscalls
a program can use, enforcing its correct behavior.

In this port of OpenBSD's ldpd(8), it's hard to run under the same
tight pledge promises because of libfrr and additional components we
introduced, like a zclient in lde. Since ldpd is already privsep'ed,
removing the pledge calls shouldn't be a big compromise security-wise.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #686 from opensourcerouting/redhat-3.0-nhrp
Donald Sharp [Wed, 7 Jun 2017 12:57:18 +0000 (08:57 -0400)]
Merge pull request #686 from opensourcerouting/redhat-3.0-nhrp

Redhat: Add remaining NHRP modifications to match 2.0 and master branch

7 years agoRedhat: Add remaining NHRP modifications to match 2.0 and master branch 686/head
Martin Winter [Tue, 6 Jun 2017 22:23:05 +0000 (15:23 -0700)]
Redhat: Add remaining NHRP modifications to match 2.0 and master branch

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoisisd: fix heap uaf
Quentin Young [Tue, 6 Jun 2017 17:53:48 +0000 (17:53 +0000)]
isisd: fix heap uaf

Fix #671

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agozebra: fix misc zebra leaks
Quentin Young [Tue, 6 Jun 2017 16:19:17 +0000 (16:19 +0000)]
zebra: fix misc zebra leaks

Fix #669

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #684 from donaldsharp/redhat_3.0
Martin Winter [Wed, 7 Jun 2017 00:35:27 +0000 (17:35 -0700)]
Merge pull request #684 from donaldsharp/redhat_3.0

Redhat 3.0

7 years agoredhat: Fix changelog to be in correct format and order 684/head
Martin Winter [Tue, 6 Jun 2017 22:03:54 +0000 (15:03 -0700)]
redhat: Fix changelog to be in correct format and order

7 years agoredhat: Fix missing packages in requirements section of README
Martin Winter [Mon, 22 May 2017 11:08:44 +0000 (04:08 -0700)]
redhat: Fix missing packages in requirements section of README

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Disallow reload function for unsupported systems
Martin Winter [Mon, 22 May 2017 11:07:22 +0000 (04:07 -0700)]
redhat: Disallow reload function for unsupported systems

Before the change, a reload triggered a restart if the python reload script wasn't installed or for non-integrated configs
With this change, the reload is rejected with an error in this case (and suggests the installation of the python script package)

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: fix previous merge. initsystem detection should now work for mock builds...
Martin Winter [Mon, 22 May 2017 11:04:35 +0000 (04:04 -0700)]
redhat: fix previous merge. initsystem detection should now work for mock builds and native builds on systemd based systems

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: use %initsystem check that works when chrooted
smccroskey [Fri, 28 Apr 2017 02:39:24 +0000 (19:39 -0700)]
redhat: use %initsystem check that works when chrooted

`systemctl' returns different, non-useful output while in a chroot.
Switch to checking if /sbin/init is a symlink to the systemd binary.
With this change the build works in a mock chroot.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
7 years agoredhat: fix README for rpm package build
Martin Winter [Thu, 20 Apr 2017 01:45:03 +0000 (18:45 -0700)]
redhat: fix README for rpm package build

- correct requirements
- add comment on bison 2.7 installation on CentOS 6

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: redirect reload function in frr init script to restart if reload script is...
Martin Winter [Thu, 20 Apr 2017 01:41:45 +0000 (18:41 -0700)]
redhat: redirect reload function in frr init script to restart if reload script is not installed (fixes systemctl restart)

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: fix duplicate Requires: line in spec file
Martin Winter [Thu, 20 Apr 2017 01:39:49 +0000 (18:39 -0700)]
redhat: fix duplicate Requires: line in spec file

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Fix BuildRequires for FRR/2.0 and duplicate /etc/frr/daemons
Martin Winter [Thu, 20 Apr 2017 01:12:10 +0000 (18:12 -0700)]
redhat: Fix BuildRequires for FRR/2.0 and duplicate /etc/frr/daemons

- add make & gcc
- remove autoconf and automake (not needed to build from src.rpm)
- fix texi2html version detection for case when no texi2html is installed (broke yum-builddep)
- fix duplicate listing of /etc/frr/daemons

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Update documentation for RPM build and usage
Martin Winter [Tue, 18 Apr 2017 01:45:50 +0000 (18:45 -0700)]
redhat: Update documentation for RPM build and usage

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: fix upgrade script (%postun), remove invalid mpls package selection (it's...
Martin Winter [Tue, 18 Apr 2017 01:34:32 +0000 (18:34 -0700)]
redhat: fix upgrade script (%postun), remove invalid mpls package selection (it's always built and auto detected), add ldpd

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Add frr.service file for redhat based systemd systems (using init script)
Martin Winter [Tue, 18 Apr 2017 01:17:16 +0000 (18:17 -0700)]
redhat: Add frr.service file for redhat based systemd systems (using init script)

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: /etc/frr/daemons needs to be marked as no replace config to be save from...
Martin Winter [Sat, 15 Apr 2017 10:29:34 +0000 (03:29 -0700)]
redhat: /etc/frr/daemons needs to be marked as no replace config to be save from overwriting

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Add (combined) init.d script for FRR with daemon selection based on /etc...
Martin Winter [Sat, 15 Apr 2017 10:13:07 +0000 (03:13 -0700)]
redhat: Add (combined) init.d script for FRR with daemon selection based on /etc/frr/daemons

- Provide new frr init script
- Remove separate per-deamon init.d scripts

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agowatchfrr: Remove the HAVE_CUMULUS around the watchfrr.started file. It's always useful
Martin Winter [Sat, 15 Apr 2017 09:00:15 +0000 (02:00 -0700)]
watchfrr: Remove the HAVE_CUMULUS around the watchfrr.started file. It's always useful

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Add python2 build requirement to pythontools sub package
Martin Winter [Fri, 14 Apr 2017 09:21:44 +0000 (02:21 -0700)]
redhat: Add python2 build requirement to pythontools sub package

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Fix previously added centos6/redhat6 check
Martin Winter [Fri, 14 Apr 2017 09:20:31 +0000 (02:20 -0700)]
redhat: Fix previously added centos6/redhat6 check

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Fix install (daemon selection) and make postun scripts compatible with fedora
Martin Winter [Fri, 14 Apr 2017 08:28:13 +0000 (01:28 -0700)]
redhat: Fix install (daemon selection) and make postun scripts compatible with fedora

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Always disable PIMd on CentOS 6 and RedHat 6 systems as they are too old...
Martin Winter [Fri, 14 Apr 2017 01:54:58 +0000 (18:54 -0700)]
redhat: Always disable PIMd on CentOS 6 and RedHat 6 systems as they are too old to correctly support the protocol

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Move frr-reload python script to it's own sub package to avoid the python2...
Martin Winter [Fri, 14 Apr 2017 00:34:26 +0000 (17:34 -0700)]
redhat: Move frr-reload python script to it's own sub package to avoid the python2 requirement for main frr package

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Don't set file attributes for symlinks
Martin Winter [Fri, 14 Apr 2017 00:33:24 +0000 (17:33 -0700)]
redhat: Don't set file attributes for symlinks

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Fix ospf6d typo in frr.spec.in
Martin Winter [Thu, 13 Apr 2017 22:00:16 +0000 (15:00 -0700)]
redhat: Fix ospf6d typo in frr.spec.in

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Fix dependencies for rpm package
Martin Winter [Thu, 13 Apr 2017 03:23:18 +0000 (20:23 -0700)]
redhat: Fix dependencies for rpm package

- Add bison, flex & autoconf
- Remove systemd for systems without it (i.e. CentOS 6)
- Update doc to reflect dependencies

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Remove tab's with spaces in frr.spec.in to make it better readable
Martin Winter [Thu, 13 Apr 2017 02:10:35 +0000 (19:10 -0700)]
redhat: Remove tab's with spaces in frr.spec.in to make it better readable

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Replace tab's with spaces in README
Martin Winter [Thu, 13 Apr 2017 01:54:40 +0000 (18:54 -0700)]
redhat: Replace tab's with spaces in README

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoripngd: fix packet buffer memleak
Quentin Young [Tue, 6 Jun 2017 15:47:49 +0000 (15:47 +0000)]
ripngd: fix packet buffer memleak

Fix #668

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoospf6d: fix heap uaf
Quentin Young [Tue, 6 Jun 2017 15:47:09 +0000 (15:47 +0000)]
ospf6d: fix heap uaf

Fix #667

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoospfd: fix stack underflow
Quentin Young [Tue, 6 Jun 2017 15:36:00 +0000 (15:36 +0000)]
ospfd: fix stack underflow

Fix #666

}:-)

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge branch 'frr/pull/672' into stable/3.0
David Lamparter [Tue, 6 Jun 2017 14:47:48 +0000 (16:47 +0200)]
Merge branch 'frr/pull/672' into stable/3.0

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #675 from opensourcerouting/ldpd-cherry-picks
Donald Sharp [Tue, 6 Jun 2017 12:24:47 +0000 (08:24 -0400)]
Merge pull request #675 from opensourcerouting/ldpd-cherry-picks

ldpd: cherry-pick fixes from master to stable/3.0

7 years agoldpd: fix bug in pseudowire control-word negotiation 675/head
Renato Westphal [Fri, 2 Jun 2017 14:14:54 +0000 (11:14 -0300)]
ldpd: fix bug in pseudowire control-word negotiation

Bingen discovered a bug in the pseudowire control-word negotiation that
might happen when the "control-word exclude" command is used. Under some
very specific conditions, ldpd might ignore a PWID label mapping when
it shouldn't.

This patch removes a wrong optimization that was preventing ldpd to call
l2vpn_pw_reset() every time we change the configuration of a pseudowire.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: fix issues detected by Coverity Scan
Renato Westphal [Thu, 27 Apr 2017 11:56:15 +0000 (08:56 -0300)]
ldpd: fix issues detected by Coverity Scan

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: fix bug when changing the transport address
Renato Westphal [Sat, 22 Apr 2017 15:03:14 +0000 (12:03 -0300)]
ldpd: fix bug when changing the transport address

When the transport address is changed, all interfaces and targeted
neighbors are temporary disabled in the ldpe process until new sockets
bound to the new transport address are received from the parent.

This patch fixes a problem in which adjacencies weren't being removed
after the associated targeted neighbors were disabled. This was causing
ldpd not to set some MD5 sockoptions for new neighbors are thus preventing
MD5-protected sessions to come up after a change in the transport-address.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: allow targeted neighbors over any interface
Renato Westphal [Sat, 22 Apr 2017 13:55:27 +0000 (10:55 -0300)]
ldpd: allow targeted neighbors over any interface

It's doesn't make sense to enforce that a targeted-hello is received
on an LDP-enabled interface. It should be possible, for example, to use
LDP only to signal pseudowires and other another protocol (e.g. RSVP-TE)
to create end-to-end LSPs.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: schedule the sending of label messages when necessary
Renato Westphal [Sat, 22 Apr 2017 01:10:42 +0000 (22:10 -0300)]
ldpd: schedule the sending of label messages when necessary

Once we send a Label Withdraw, we can't send a Label Mapping for the
same FEC until we receive a Label Release from the peer. This is due to
some limitations in the LDP algorithms described in Appendix A. ("LDP
Label Distribution Procedures") of RFC 5036.

To workaround this issue, make it possible to schedule the sending of
a Label Mapping as soon as a Label Release is received for the same FEC.

The easiest way to test this patch is by typing the "label local advertise
explicit-null" command. ldpd will withdraw all null labels using a
Wildcard FEC and then send new Label Mappings as soon the corresponding
Label Releases are received.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: improve ldp_zebra_read_route()
Renato Westphal [Fri, 21 Apr 2017 22:39:11 +0000 (19:39 -0300)]
ldpd: improve ldp_zebra_read_route()

Log deleted routes and simplify the code a bit.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: be more conservative with labels
Renato Westphal [Fri, 21 Apr 2017 18:41:14 +0000 (15:41 -0300)]
ldpd: be more conservative with labels

On unstable networks, routes can be lost and relearned very often. If
we deallocate the input label every time a route is lost and allocate
a new one when the route is relearned, a lot of changes are made in vain.

This patch introduces a logic in which labels are preserved for at least
five minutes before being deallocated by the LIB garbage collector. This
is consistent with what other implementations do.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: accept notifications during the session establishment process
Renato Westphal [Wed, 19 Apr 2017 22:31:19 +0000 (19:31 -0300)]
ldpd: accept notifications during the session establishment process

If we don't do this, we'll never trigger the backoff exponential timer
since it's impossible to distinguish between Initialization NAK's and
general errors.

Also:
* Implement some missing bits from RFC 5036;
* remove superfluous log message in session_shutdown()
  (send_notification() logs that we're sending a fatal notification).

Regression introduced by commit 8819fc3.

Fixes the following ANVL LDP regressions: 6.19 and 6.21.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: minor changes in the output of some show commands
Renato Westphal [Wed, 19 Apr 2017 20:12:35 +0000 (17:12 -0300)]
ldpd: minor changes in the output of some show commands

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: use synchronous channels for sending log messages
Renato Westphal [Wed, 19 Apr 2017 19:59:50 +0000 (16:59 -0300)]
ldpd: use synchronous channels for sending log messages

This is necessary to guarantee that all log messages sent from the child
processes are received in the parent process right away.

Without this patch, when a child process calls fatal() or fatalx(),
the log messages don't make it to the parent because the child doesn't
have a chance to flush its buffers before exiting.

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