]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 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>
6 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)

6 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

6 years agolib: Add json support for 'show version' command
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>
6 years agorelease: FRR 3.0-rc2
Donald Sharp [Tue, 12 Sep 2017 17:23:51 +0000 (13:23 -0400)]
release: FRR 3.0-rc2

6 years agodoc: remove --enable-tcp-zebra from the build instructions
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>
6 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

6 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

6 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>
6 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>
6 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>
6 years agodocs: Added large-community documentation
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>
6 years agoBuild FRR using branch stable/3.0
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.

6 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

6 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.

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

6 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()

6 years agobgpd: fix lcommunity refs in table-map
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>
6 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>
6 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>
6 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)

6 years agobgpd: Fixed incorrect MTYPE being used for large communites
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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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

6 years agoisisd: guard SPF warning by debug flag
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>
6 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)

6 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

6 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>
6 years agoisisd: don't validate dict integrity for regular builds
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>
6 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

6 years agobuild: fix --disable-snmp
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>
6 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>
6 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>
6 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>
6 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

6 years agoisisd: always link fragments to fragment #0, even when learned by CSNP
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>
6 years agolib: fix prefix list trie corruption
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>
6 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

6 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>
6 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

6 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

6 years agozebra: vrf: remove VRF-move static route updating
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>
6 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>
6 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>
6 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

6 years agolib: vty: fix config-write fd leak
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>
6 years agozebra: add support for static pseudowires
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>
6 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

6 years agoospf: Fix segfault if compiled with DEBUG
ß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>
6 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>
6 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

6 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

6 years agozebra: fetch interface speed on *BSD
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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 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>
6 years agoldpd: fix bug with dual-stack neighbors
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>
6 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

6 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

6 years agodoc: Update Building Doc for RedHat-style Distro's (CentOS / Fedora)
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>
6 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>
6 years agodocs: Changed the manpage section from 1 to 8 so it conforms with its definition
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>
6 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]

6 years ago*: simplify log message lookup
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>
6 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

6 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

6 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

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

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

6 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

6 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

6 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

6 years agozebra: more dbzing
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>
6 years agoospfd: correct typo in zebra trace
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>
6 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>
6 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

6 years agozebra: fix ipv6 route command description strings
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>
6 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>
6 years agoldpd: fix issues with dual-stack adjacencies
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>
6 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>
6 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>
6 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>
6 years agoisisd: fix heap uaf, round 2
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>
6 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

6 years agodoc: update build instructions for openbsd
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>
6 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>
6 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>
6 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