]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agoMerge remote-tracking branch 'frr/master' into tcp-zebra
David Lamparter [Wed, 9 Aug 2017 18:42:27 +0000 (20:42 +0200)]
Merge remote-tracking branch 'frr/master' into tcp-zebra

6 years agoMerge pull request #911 from opensourcerouting/non-recursive-2
Donald Sharp [Wed, 9 Aug 2017 18:38:07 +0000 (14:38 -0400)]
Merge pull request #911 from opensourcerouting/non-recursive-2

more non-recursive build, fix cross-compile, & doc build mangling

6 years agoMerge pull request #892 from opensourcerouting/watchfrr-simplify
Donald Sharp [Wed, 9 Aug 2017 18:32:44 +0000 (14:32 -0400)]
Merge pull request #892 from opensourcerouting/watchfrr-simplify

simplify watchfrr, add --terminal, improve startup logging

6 years agoMerge pull request #942 from lunn/eigrpd-debug
Quentin Young [Wed, 9 Aug 2017 17:59:48 +0000 (13:59 -0400)]
Merge pull request #942 from lunn/eigrpd-debug

eigrpd: Add missing install_element for debug eigrp transmit

6 years agoMerge pull request #944 from qlyoung/ignore-disrtamp
David Lamparter [Wed, 9 Aug 2017 17:55:20 +0000 (19:55 +0200)]
Merge pull request #944 from qlyoung/ignore-disrtamp

*: ignore .dirstamp

6 years ago*: ignore .dirstamp
Quentin Young [Wed, 9 Aug 2017 17:48:31 +0000 (13:48 -0400)]
*: ignore .dirstamp

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #883 from daveolson53/master
David Lamparter [Wed, 9 Aug 2017 17:29:16 +0000 (19:29 +0200)]
Merge pull request #883 from daveolson53/master

Switch to using syslog for logging as the default

6 years agoeigrpd: Add missing install_element for debug eigrp transmit
Andrew Lunn [Wed, 9 Aug 2017 16:56:13 +0000 (11:56 -0500)]
eigrpd: Add missing install_element for debug eigrp transmit

debug eigrp transmit command is added to the ENABLE_NODE list, but not
CONFIG_NODE. As a result the command cannot be used in the
configuration file. Add the missing call.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
6 years agoMerge branch 'stable/3.0'
David Lamparter [Wed, 9 Aug 2017 12:35:17 +0000 (14:35 +0200)]
Merge branch 'stable/3.0'

... with a lot of fixups.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge branch 'stable/3.0' into tmp-3.0-master-merge
David Lamparter [Wed, 9 Aug 2017 11:13:01 +0000 (13:13 +0200)]
Merge branch 'stable/3.0' into tmp-3.0-master-merge

Marker (--strategy=ours) merge to record which point in history master
is in sync with related to stable/3.0.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agozebra: fix pseudowire code re. upstream changes
David Lamparter [Wed, 9 Aug 2017 10:37:45 +0000 (12:37 +0200)]
zebra: fix pseudowire code re. upstream changes

- VTY_NEWLINE is out
- thread API changed with the extra arg
- struct rib got renamed to struct route_entry
- MPLS_NO_LABEL was removed
- RB-tree implementation has some extra args

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 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 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 agoMerge commit '78986c0' into tmp-3.0-master-merge
David Lamparter [Wed, 9 Aug 2017 10:09:04 +0000 (12:09 +0200)]
Merge commit '78986c0' into tmp-3.0-master-merge

Marker (--strategy=ours) merge to record which point in history master
is in sync with related to stable/3.0.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
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 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 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 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 agowatchfrr: print specific error for removed options
David Lamparter [Wed, 9 Aug 2017 09:28:22 +0000 (11:28 +0200)]
watchfrr: print specific error for removed options

... and document them in the man page.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agowatchfrr: remove STATEDIR preprocessor define
David Lamparter [Wed, 2 Aug 2017 08:46:01 +0000 (10:46 +0200)]
watchfrr: remove STATEDIR preprocessor define

use frr_vtydir from libfrr instead.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agolib: don't mkdir state paths in watchfrr
David Lamparter [Thu, 3 Aug 2017 04:02:45 +0000 (06:02 +0200)]
lib: don't mkdir state paths in watchfrr

watchfrr doesn't know if there will be -u/-g options on the individual
daemons, so it doesn't know what the appropriate ownership is.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agolib: thoroughly disable tcp-zebra
David Lamparter [Tue, 8 Aug 2017 18:11:10 +0000 (20:11 +0200)]
lib: thoroughly disable tcp-zebra

Disable this in the code to make it hard for people to shoot themselves
in the foot.  It's only left as a remnant for development use.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge pull request #930 from qlyoung/fix-masters-list-reachable
Lou Berger [Tue, 8 Aug 2017 17:58:06 +0000 (13:58 -0400)]
Merge pull request #930 from qlyoung/fix-masters-list-reachable

lib: fix still reachable linked list in thread.c

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 #919 from opensourcerouting/static-routes-ifindex-update
Donald Sharp [Tue, 8 Aug 2017 17:39:19 +0000 (13:39 -0400)]
Merge pull request #919 from opensourcerouting/static-routes-ifindex-update

fixup static routes' ifindexes when interfaces (dis)appear

6 years agolib: fix still reachable linked list in thread.c
Quentin Young [Tue, 8 Aug 2017 16:54:28 +0000 (12:54 -0400)]
lib: fix still reachable linked list in thread.c

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #927 from donaldsharp/one_day_second
David Lamparter [Tue, 8 Aug 2017 14:19:29 +0000 (16:19 +0200)]
Merge pull request #927 from donaldsharp/one_day_second

*: Define the number of seconds in a Day, Week and year

6 years ago*: Define the number of seconds in a Day, Week and year
Donald Sharp [Tue, 8 Aug 2017 12:24:17 +0000 (08:24 -0400)]
*: Define the number of seconds in a Day, Week and year

The defines:

ONE_DAY_SECOND
ONE_WEEK_SECOND
ONE_YEAR_SECOND

were being defined all over the system, move the
define to a central location.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
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 ago*: remove --enable-tcp-zebra, rework ZAPI path
David Lamparter [Sun, 6 Aug 2017 05:35:50 +0000 (07:35 +0200)]
*: remove --enable-tcp-zebra, rework ZAPI path

This adds "@tcp" as new choice on the -z option present in zebra and the
protocol daemons.  The --enable-tcp-zebra option on configure is no
longer needed, both UNIX and TCP socket support is always available.

Note that @tcp should not be used by default (e.g. in an init script),
and --enable-tcp-zebra should never have been in any distro package
builds, because

**** TCP-ZEBRA IS A SECURITY PROBLEM ****

It allows arbitrary local users to mess with the routing table and
inject bogus data -- and also ZAPI is not designed to be robust against
attacks.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge pull request #924 from qlyoung/deprecate-ospf-lsa-min-arrival
David Lamparter [Tue, 8 Aug 2017 02:17:00 +0000 (04:17 +0200)]
Merge pull request #924 from qlyoung/deprecate-ospf-lsa-min-arrival

ospfd: deprecate `timers lsa arrival ...`

6 years agoMerge pull request #923 from devicenull/master
David Lamparter [Tue, 8 Aug 2017 02:16:08 +0000 (04:16 +0200)]
Merge pull request #923 from devicenull/master

rhel: Don't obsolete bird

6 years agoMerge pull request #925 from qlyoung/ldpd-no-str
Renato Westphal [Mon, 7 Aug 2017 21:27:52 +0000 (18:27 -0300)]
Merge pull request #925 from qlyoung/ldpd-no-str

ldpd: use NO_STR

6 years agoldpd: use NO_STR
Quentin Young [Mon, 7 Aug 2017 20:22:59 +0000 (16:22 -0400)]
ldpd: use NO_STR

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoospfd: deprecate `timers lsa arrival ...`
Quentin Young [Mon, 7 Aug 2017 20:11:10 +0000 (16:11 -0400)]
ospfd: deprecate `timers lsa arrival ...`

Don't need two of these that do the exact same thing.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agorhel: Don't obsolete bird
Brian Rak [Mon, 7 Aug 2017 18:37:21 +0000 (14:37 -0400)]
rhel: Don't obsolete bird

The FRR RPM was obsoleting BIRD, which meant that as soon as you added a FRR RPM to a repository, you could no longer install BIRD.  This patch switches it over to Conflicts instead, which should be much nicer behavior

6 years agoMerge pull request #922 from qlyoung/pim-cli
Jafar Al-Gharaibeh [Mon, 7 Aug 2017 18:19:11 +0000 (13:19 -0500)]
Merge pull request #922 from qlyoung/pim-cli

pimd: some pim cli fixes

6 years agopimd: some pim cli fixes
Quentin Young [Mon, 7 Aug 2017 16:42:05 +0000 (12:42 -0400)]
pimd: some pim cli fixes

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #916 from donaldsharp/eigrp_various
Jafar Al-Gharaibeh [Mon, 7 Aug 2017 16:22:36 +0000 (11:22 -0500)]
Merge pull request #916 from donaldsharp/eigrp_various

Eigrp various

6 years agoMerge pull request #903 from donaldsharp/pimble
Jafar Al-Gharaibeh [Mon, 7 Aug 2017 16:20:39 +0000 (11:20 -0500)]
Merge pull request #903 from donaldsharp/pimble

Pimble

6 years agoMerge pull request #921 from opensourcerouting/vty-varname-end-tkn
Quentin Young [Mon, 7 Aug 2017 14:33:15 +0000 (10:33 -0400)]
Merge pull request #921 from opensourcerouting/vty-varname-end-tkn

lib: cli: don't run off graph "pre-end"

6 years agolib: cli: don't run off graph "pre-end"
David Lamparter [Mon, 7 Aug 2017 13:05:34 +0000 (15:05 +0200)]
lib: cli: don't run off graph "pre-end"

Behind END_TKN, there is another graph node whose data pointer is
actually struct cmd_element instead of struct cmd_token.  Don't try to
interpret that as cmd_token.  This causes very interesting crashes when
ASLR decides to give one of the strings of a command definition a lower
32-bit value that is a valid cmd_token_type (e.g. FORK_TKN).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge pull request #918 from opensourcerouting/vtysh-miss-newline
Donald Sharp [Mon, 7 Aug 2017 12:39:08 +0000 (08:39 -0400)]
Merge pull request #918 from opensourcerouting/vtysh-miss-newline

vtysh: add missing \n on warning message

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: 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 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 agovtysh: add missing \n on warning message
David Lamparter [Sun, 6 Aug 2017 02:17:13 +0000 (04:17 +0200)]
vtysh: add missing \n on warning message

Oops, missed this in review.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge pull request #912 from chiragshah6/mdev
David Lamparter [Sun, 6 Aug 2017 01:55:10 +0000 (03:55 +0200)]
Merge pull request #912 from chiragshah6/mdev

Fix Multi-Instance OSPF configurations CLIs

6 years agoospfd: Handle multi instance router ospf command
Chirag Shah [Sat, 5 Aug 2017 05:55:20 +0000 (22:55 -0700)]
ospfd: Handle multi instance router ospf command

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoMerge pull request #899 from donaldsharp/ETH_ALEN
David Lamparter [Sat, 5 Aug 2017 03:19:01 +0000 (05:19 +0200)]
Merge pull request #899 from donaldsharp/ETH_ALEN

Fix Crash and Convert to ETH_ALEN

6 years agoospfd: Fix MI-OSPF CLIs
Chirag Shah [Thu, 3 Aug 2017 23:34:17 +0000 (16:34 -0700)]
ospfd: Fix MI-OSPF CLIs

Handle all instance base clis calling ospf_lookup_instance()
to return CMD_NOT_MY_INSTANCE in case of ospf is not found.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoeigrpd: Fix crash and attempt to send data
Donald Sharp [Tue, 25 Jul 2017 23:32:51 +0000 (19:32 -0400)]
eigrpd: Fix crash and attempt to send data

This code fixes a crash in EIGRP when on initial
neighbor formation we need to send more than 1 packet
of data to the nbr.

I was testing this by redistributing connected
and just adding a bunch of /32 address to
an interface.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Fix a md5 digest issue
Donald Sharp [Wed, 10 May 2017 23:45:40 +0000 (19:45 -0400)]
eigrpd: Fix a md5 digest issue

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Fix argv_find return code confusion
Donald Sharp [Wed, 10 May 2017 00:50:46 +0000 (20:50 -0400)]
eigrpd: Fix argv_find return code confusion

argv_find when it finds a match, returns 1 not 0

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #914 from jbonor/fixes
Quentin Young [Fri, 4 Aug 2017 18:50:33 +0000 (14:50 -0400)]
Merge pull request #914 from jbonor/fixes

bgpd: remove bogus change in attrhash_key_make()

6 years agobgpd: remove bogus change in attrhash_key_make()
Jorge Boncompte [Fri, 4 Aug 2017 17:33:15 +0000 (19:33 +0200)]
bgpd: remove bogus change in attrhash_key_make()

Commit c8e7b895 ("bgpd: use Jenkins hash for BGP transit, cluster and
attr hashes") changed attrhash_key_make() to use Jenkins hash, commit
c8f3fe30 ("bgpd: Remove AS Path limit/TTL functionality") introduced
a bogus change with a snippet of code that was deleted in the first
one.

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
6 years agoMerge pull request #906 from opensourcerouting/vty-close
Russ White [Fri, 4 Aug 2017 17:14:43 +0000 (13:14 -0400)]
Merge pull request #906 from opensourcerouting/vty-close

lib: vty: fix config-write fd leak

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 agobuild: non-recursive babeld & eigrpd
David Lamparter [Fri, 4 Aug 2017 14:49:15 +0000 (16:49 +0200)]
build: non-recursive babeld & eigrpd

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobuild: non-recursive ldpd
David Lamparter [Fri, 4 Aug 2017 14:13:29 +0000 (16:13 +0200)]
build: non-recursive ldpd

This also fixes a build problem where using #include
"ldpd/ldp_vty_cmds_clippy.c" results in the Makefile dependency tracking
having both

ldp_vty_cmds.c: ldp_vty_cmds_clippy.c
ldp_vty_cmds.c: ../ldpd/ldp_vty_cmds_clippy.c

(because, if it's included as "ldpd/..", it uses the "-I.." include path
in gcc, so the gcc -MD dependency output is "../ldpd/...")

... all of which causes the build to try to build it twice (at the same
time) and fail rather stupidly.

With a non-recursive build, the two paths are identical and everything
just works.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge pull request #867 from jbonor/fixes
Donald Sharp [Fri, 4 Aug 2017 16:57:35 +0000 (12:57 -0400)]
Merge pull request #867 from jbonor/fixes

Assorted fixes

6 years agoMerge pull request #913 from qlyoung/remove-powl
David Lamparter [Fri, 4 Aug 2017 16:19:25 +0000 (18:19 +0200)]
Merge pull request #913 from qlyoung/remove-powl

lib: remove last powl()

6 years agolib: remove last powl()
Quentin Young [Fri, 4 Aug 2017 14:58:00 +0000 (10:58 -0400)]
lib: remove last powl()

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #910 from opensourcerouting/isis-perf2
Donald Sharp [Fri, 4 Aug 2017 14:56:34 +0000 (10:56 -0400)]
Merge pull request #910 from opensourcerouting/isis-perf2

isisd: don't validate dict integrity for regular builds

6 years agoospfd: Fix MI-OSPF configuraton clis
Chirag Shah [Thu, 3 Aug 2017 23:34:17 +0000 (16:34 -0700)]
ospfd: Fix MI-OSPF configuraton clis

Multi-Instance OSPF configuration CLI would fail because
first client return error upon seeing qobj_index being 0.
With new marco generate new error code to return from each
instance (vtysh client) and if the command is intended for given
instance, its qobj_index would be nonzero and process the command
and push correct ospf context. Other instance would return the error.
On vtysh end, check all instance return an error log a message to a
file.

Testing Done:
Verfied various MI-OSPF configuration CLI with multi instances.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoMerge pull request #908 from donaldsharp/safi
Renato Westphal [Fri, 4 Aug 2017 14:34:23 +0000 (11:34 -0300)]
Merge pull request #908 from donaldsharp/safi

bgpd: Fix safi_t confusion wition iana_safi_t

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 agoisisd: Convert to using prefix.h ETH_ALEN
Donald Sharp [Thu, 3 Aug 2017 12:46:00 +0000 (08:46 -0400)]
isisd: Convert to using prefix.h ETH_ALEN

Remove the #define for ETH_ALEN as well as ETHER_ADDR_LEN
and convert all uses to ETH_ALEN

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Convert to using ETH_ALEN
Donald Sharp [Thu, 3 Aug 2017 12:45:27 +0000 (08:45 -0400)]
bgpd: Convert to using ETH_ALEN

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoldpd: Switch to using ETH_ALEN
Donald Sharp [Thu, 3 Aug 2017 12:44:25 +0000 (08:44 -0400)]
ldpd: Switch to using ETH_ALEN

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Switch to using ETH_ALEN
Donald Sharp [Thu, 3 Aug 2017 12:43:56 +0000 (08:43 -0400)]
zebra: Switch to using ETH_ALEN

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Add ETH_ALEN to prefix.h and deprecate ETHER_ADDR_LEN
Donald Sharp [Thu, 3 Aug 2017 12:42:29 +0000 (08:42 -0400)]
lib: Add ETH_ALEN to prefix.h and deprecate ETHER_ADDR_LEN

From discussion we decided that we should use ETH_ALEN instead
of ETHER_ADDR_LEN.  Add ETH_ALEN to prefix.h and make
ETHER_ADDR_LEN generate a warning when used( but still work ).

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Fix crash when OOM happens.
Donald Sharp [Thu, 3 Aug 2017 11:43:47 +0000 (07:43 -0400)]
zebra: Fix crash when OOM happens.

The hash key function choosen for mac vni's would tend
to clump the key value to the same number.  Use a better
hash key generator to spread the hash values out.

A bad hash key might lead to O(2^n) memory consumption
because the hash size is doubled, each time a backet
exceeds a predefined threshold.  This quickly leads
to OOM.  Fixing this issue by fixing the hash
key generation to actually spread the keys out.

Ticket: CM-17412
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #909 from opensourcerouting/isis-perf
Donald Sharp [Fri, 4 Aug 2017 13:04:12 +0000 (09:04 -0400)]
Merge pull request #909 from opensourcerouting/isis-perf

IS-IS: improve spf performance

6 years agodoc: work around weird texinfo bug
David Lamparter [Fri, 4 Aug 2017 12:45:08 +0000 (14:45 +0200)]
doc: work around weird texinfo bug

This inserts "\global \advance \brackcount by 1" into the frr.fn
(function index) for some reason, which causes the PDF build to fail.

It's somehow related to the [] brackets, but they work just fine in
other locations...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agodoc: stop using version.texi, fix URLs
David Lamparter [Fri, 4 Aug 2017 12:44:07 +0000 (14:44 +0200)]
doc: stop using version.texi, fix URLs

Ditch version.texi, put PACKAGE_VERSION in defines.texi instead.
Also add a PACKAGE_URL variable and fix some leftover outdated URLs.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobgpd: Fix safi_t confusion wition iana_safi_t
Donald Sharp [Fri, 4 Aug 2017 11:45:44 +0000 (07:45 -0400)]
bgpd: Fix safi_t confusion wition iana_safi_t

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
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 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...

Reported-by: Jorge Boncompte <jbonor@gmail.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobuild: clean up BUILT_SOURCES
David Lamparter [Fri, 4 Aug 2017 08:36:34 +0000 (10:36 +0200)]
build: clean up BUILT_SOURCES

BUILT_SOURCES doesn't do what the name suggests.  What it actually means
is "these files should be built first when doing a 'make' without
explicit target" (or "make all").

It's pretty much almost always wrong to use BUILT_SOURCES, the only
correct use is when a file is needed by an unspecified / large set of
files.

Also remove version.h and route_types.h from dist tarball while we're at
it.  configure will create them anyway.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobuild: pre-generate built headers in configure
David Lamparter [Fri, 4 Aug 2017 07:59:00 +0000 (09:59 +0200)]
build: pre-generate built headers in configure

zebra.h includes route_types.h, which means almost all of our Makefile
targets have a dependency on route_types.h.  While BUILT_SOURCES ensures
that this dependency is fulfilled on a "make all", this doesn't work
when building specific targets (e.g. "make lib/libfrr.la").

There seems to be no good way to add a dependency on everything, so the
best fix for this is to just generate the file during ./configure.

(The Makefile rule is still there, so if route_types.txt is changed,
route_types.h will be rebuilt.)

This only affects "initial" builds from a clean directory and/or builds
with --disable-dependency-tracking;  other than that gcc will output
Makefile dependencies during compilation so that route_types.h will
become a dependency for all output files.

gitversion.h has the same problem on a smaller scope.

command_lex.h & command_parse.h *don't* have the problem because they're
only used in specific files, and these files have the dependency
explicitly listed in the Makefile.  Hence, they can also be removed from
BUILT_SOURCES.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobuild: non-recursive nhrpd
David Lamparter [Fri, 4 Aug 2017 07:34:44 +0000 (09:34 +0200)]
build: non-recursive nhrpd

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobuild: non-recursive isisd
David Lamparter [Thu, 3 Aug 2017 11:42:11 +0000 (13:42 +0200)]
build: non-recursive isisd

(Also fix a minor snafu in the autoconf logic)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobuild: non-recursive ospf*
David Lamparter [Wed, 2 Aug 2017 08:29:21 +0000 (10:29 +0200)]
build: non-recursive ospf*

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobuild: non-recursive ripd & ripngd
David Lamparter [Wed, 2 Aug 2017 07:46:45 +0000 (09:46 +0200)]
build: non-recursive ripd & ripngd

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobuild: fix clippy cross-compile
David Lamparter [Thu, 3 Aug 2017 11:31:28 +0000 (13:31 +0200)]
build: fix clippy cross-compile

Broke the build-for-host setup for clippy in the non-recursive changes
:/

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agonhrp: fix assertion with negative holding times
Jorge Boncompte [Thu, 3 Aug 2017 17:12:27 +0000 (19:12 +0200)]
nhrp: fix assertion with negative holding times

Correctly reset status or we later assert at nhrp_cache_free().

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
6 years agonhrp: fix initialization and route redistribution registration
Jorge Boncompte [Tue, 25 Jul 2017 11:15:15 +0000 (13:15 +0200)]
nhrp: fix initialization and route redistribution registration

nhrpd wasn't registering correctly with zebra for route redistribution.
It wasn't neither parsing the right messages nor parsing them correctly too.

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
6 years agonhrp: initialize interfaces after VRFs
Jorge Boncompte [Tue, 25 Jul 2017 10:32:20 +0000 (12:32 +0200)]
nhrp: initialize interfaces after VRFs

Interfaces depend logically of VRF, initialize one after another just in
case in the future someone adds something to this functions.

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>