]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
7 years agoldpd: provide both a brief and a detailed version of some show commands
Renato Westphal [Fri, 17 Mar 2017 01:11:15 +0000 (22:11 -0300)]
ldpd: provide both a brief and a detailed version of some show commands

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #282 from opensourcerouting/ldpd-lspcheck
Donald Sharp [Mon, 20 Mar 2017 12:08:38 +0000 (08:08 -0400)]
Merge pull request #282 from opensourcerouting/ldpd-lspcheck

ldpd: remove pseudowire LSP check

7 years agoldpd: remove pseudowire LSP check
Renato Westphal [Fri, 17 Mar 2017 18:41:04 +0000 (15:41 -0300)]
ldpd: remove pseudowire LSP check

In order to bring a pseudowire up, we must make sure that there's at
least one LSP available to its remote end (otherwise the labeled frames
from the CEs wouldn't reach their destination). We were doing this
check in ldpd, but doing so is very limiting because it doesn't consider
other types of LSPs that might be available (static LSPs, RSVP-TE, SR,
etc). Thus remove this check from the l2vpn_pw_ok() function. Later
on we'll implement a pseudowire manager in zebra which will solve this
problem in a much better way (including notifying ldpd about failures
to install a pseudowire in the kernel/hardware).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #270 from donaldsharp/cares
David Lamparter [Fri, 10 Mar 2017 19:53:42 +0000 (20:53 +0100)]
Merge pull request #270 from donaldsharp/cares

debian: Allow building the .deb to know about new dependency

7 years agoMerge pull request #271 from AnuradhaKaruppiah/master
David Lamparter [Fri, 10 Mar 2017 19:53:30 +0000 (20:53 +0100)]
Merge pull request #271 from AnuradhaKaruppiah/master

pimd: Separate the register and upstream join states

7 years agopimd: display reg-state and join-state info in the pim_upstream output
anuradhak [Thu, 9 Mar 2017 19:42:55 +0000 (11:42 -0800)]
pimd: display reg-state and join-state info in the pim_upstream output

Changed the state field in the "sh ip pim upstream" output to include
register and join state info as a comma separated value. Register info
is supressed if reg-state=NoInfo.

Sample output:
=============
root@fhr:/home/cumulus# net show pim upstream
Iif       Source          Group           State       Uptime   JoinTimer
RSTimer   KATimer   RefCnt
swp1      33.1.1.1        239.1.1.2       J,RegP      00:00:18 --:--:--
00:00:44  00:03:24       2
root@fhr:/home/cumulus#

root@rp:/home/cumulus# net show pim upstream
Iif       Source          Group           State       Uptime   JoinTimer
RSTimer   KATimer   RefCnt
lo        *               239.1.1.2       J           00:02:08 00:00:52
--:--:--  --:--:--       1
swp1      33.1.1.1        239.1.1.2       J           00:00:16 00:00:11
--:--:--  00:03:26       1
root@rp:/home/cumulus#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-14700
Testing Done: pim-smoke

7 years agopimd: simplify pim upstream state transitions
anuradhak [Thu, 9 Mar 2017 18:47:50 +0000 (10:47 -0800)]
pimd: simplify pim upstream state transitions

This is another follow-up change to the reg-state and up-join-state
separation. The upstream join state machine can now respond to
JoinDesired macro changes independent of router role.

I have also dropped the PRUNE state from the upstream-join-state
enumeration. RFC4601 only defines JOINED and NOTJOINED states. And PRUNE
can really be replace by NOTJOINED.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-14700
Testing Done: Register state machine in FHR only, combined FHR-RP and
FHR-RP-LHR/all-in-one setups. Also ran pim-smoke.

7 years agopimd: add new/distinct enumeration for pim register state
anuradhak [Thu, 9 Mar 2017 17:52:59 +0000 (09:52 -0800)]
pimd: add new/distinct enumeration for pim register state

With the separation of register-state and upstream-join-state we no
longer need an enumeration that covers both states. This commit includes
the following -
1. Defined new enumeration for reg state (this 1:1 with RFC4601).
2. Dropped JOIN_PENDING enum value from upstream join state. RFC4601
only define two values NOT_JOINED and JOINED for this state.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-14700
Testing Done: Verified register setup manually and ran pim-smoke

7 years agopimd: Separate the register and upstream join states on the FHR
anuradhak [Wed, 8 Mar 2017 17:29:40 +0000 (09:29 -0800)]
pimd: Separate the register and upstream join states on the FHR

On the FHR upstream-join-state is not particularly relevant as we
don't need to send upstream JPs for the SG. So that field was being
overloaded with the register-state. However some of the events that
triggered changes to the JoinDesired macro were accidentally overwriting
the state with join info (instead of treating it as register info)
confusing the register state machine.

To make the PIM RFC macros' implemention simple I have separated out
the register-state. And upstream->state now solely describes the
upstream-join-state independent of the role of the PIM router.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-14700
Testing Done: verified pim-register state-machine with separate and
combined FHR/RP routers. Also ran pim-smoke.

7 years agodebian: Allow building the .deb to know about new dependency
Donald Sharp [Fri, 10 Mar 2017 18:02:09 +0000 (13:02 -0500)]
debian: Allow building the .deb to know about new dependency

libc-ares-dev and libc-ares2 are now dependencies to build nhrpd

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #269 from donaldsharp/libfrr
David Lamparter [Fri, 10 Mar 2017 13:29:58 +0000 (14:29 +0100)]
Merge pull request #269 from donaldsharp/libfrr

lib: Fix missed code

7 years agolib: Fix missed code
Donald Sharp [Thu, 9 Mar 2017 21:31:44 +0000 (16:31 -0500)]
lib: Fix missed code

When converting to new format we missed some code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge branch 'stable/2.0'
David Lamparter [Fri, 10 Mar 2017 13:20:40 +0000 (14:20 +0100)]
Merge branch 'stable/2.0'

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agomerge: pre-revert inapplicable changes
David Lamparter [Fri, 10 Mar 2017 13:16:37 +0000 (14:16 +0100)]
merge: pre-revert inapplicable changes

The following changes do not apply on master because the code has
changed:

- "vtysh: fix completion"
  reverts commit 09e61a383facd3c9e3e52162e98302c7cba15ecc.
- "Revert "lib: Fix tab completions memleak, memory stats corruption""
  reverts commit 4dcee34bd603645e53f8a8265dd263a85422b63d.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #266 from donaldsharp/nht
David Lamparter [Fri, 10 Mar 2017 13:10:10 +0000 (14:10 +0100)]
Merge pull request #266 from donaldsharp/nht

bug fixes

7 years agozebra: Fix specific prefix handling
Donald Sharp [Fri, 10 Mar 2017 00:37:23 +0000 (19:37 -0500)]
zebra: Fix specific prefix handling

Suppose we are handling the process_workq and either a new static
route is installed or a Routing Protocol installs a new route.
We will call evaluate_rnh with a specific prefix.  We might
have a situation where we clear the NHC flag prematurely.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #267 from opensourcerouting/vty-completion-again
Donald Sharp [Thu, 9 Mar 2017 20:34:57 +0000 (15:34 -0500)]
Merge pull request #267 from opensourcerouting/vty-completion-again

vty completion memory counting redux

7 years agolib: handle case specifc types, protect against double free (issue #144)
Lou Berger [Wed, 8 Mar 2017 17:14:15 +0000 (12:14 -0500)]
lib: handle case specifc types, protect against double free (issue #144)

Signed-off-by: Lou Berger <lberger@labn.net>
[DL: dropped changes except the two NULL assignments]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoRevert "lib: Fix tab completions memleak, memory stats corruption"
David Lamparter [Thu, 9 Mar 2017 18:23:00 +0000 (19:23 +0100)]
Revert "lib: Fix tab completions memleak, memory stats corruption"

This reverts commit 039dc61292de5f3ed5f46316b1940ab6bb184c3f.

The patch actually made the situation worse since the return value from
cmd_complete_command_real() was now inconsistently allocated from
different memory stat pools.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoLowercase frr.conf
Martín Beauchamp [Mon, 27 Feb 2017 18:26:20 +0000 (13:26 -0500)]
Lowercase frr.conf

7 years agozebra: Notify all nexthops that we've changed
Donald Sharp [Tue, 7 Mar 2017 20:13:04 +0000 (15:13 -0500)]
zebra: Notify all nexthops that we've changed

Zebra when it was scanning the tree would unset NEXTHOPS_CHANGED
after the first notification.  If the route we are notifying because
of covers multiple interesting nexthops then we would be unable
to know that we need to notify for that one as well because of
the flag removal.

Ticket: CM-15157
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #263 from opensourcerouting/assorted-20170308
Donald Sharp [Thu, 9 Mar 2017 11:52:56 +0000 (06:52 -0500)]
Merge pull request #263 from opensourcerouting/assorted-20170308

assorted bits

7 years agopimd: fix clang warning
David Lamparter [Wed, 8 Mar 2017 15:37:42 +0000 (16:37 +0100)]
pimd: fix clang warning

pimd/pim_sock.c:178:13: error: implicit conversion from
'int' to 'char' changes value from 148 to -108
[-Werror,-Wconstant-conversion]
    ra[0] = 148;

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agowatchfrr: make min/max restart interval longopts
David Lamparter [Wed, 8 Mar 2017 15:22:43 +0000 (16:22 +0100)]
watchfrr: make min/max restart interval longopts

-m/-M seem to be seldomly used...
... and I kindof need/want -M for module loading.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years ago*: fix some user-visible Quagga remnants
David Lamparter [Wed, 8 Mar 2017 15:13:12 +0000 (16:13 +0100)]
*: fix some user-visible Quagga remnants

(Note: the allow_delete thing is called "zebra" on the commandline
because that's the clearest context there, while it is called "FRR" in
the CLI because that's considerably less confusing in a vtysh env.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoisisd: remove reload-by-reexec
David Lamparter [Wed, 8 Mar 2017 15:03:35 +0000 (16:03 +0100)]
isisd: remove reload-by-reexec

This is a quite horrible mechanism...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoospfd: remove unused usage() function
David Lamparter [Wed, 8 Mar 2017 15:00:45 +0000 (16:00 +0100)]
ospfd: remove unused usage() function

... forgot this one in the previous patchset.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #262 from donaldsharp/pim_jp_fixes frr-3.0-branchpoint
Jafar Al-Gharaibeh [Wed, 8 Mar 2017 14:59:07 +0000 (08:59 -0600)]
Merge pull request #262 from donaldsharp/pim_jp_fixes

Pim jp fixes

7 years agopimd: Don't double include Source
Donald Sharp [Wed, 8 Mar 2017 12:50:55 +0000 (07:50 -0500)]
pimd: Don't double include Source

When we are adding to a J/P Agg list, don't
double add the source.

Ticket: CM-15189
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix various ifdown/ifup scenarios w/ J/P Agg
Donald Sharp [Mon, 6 Mar 2017 17:56:32 +0000 (12:56 -0500)]
pimd: Fix various ifdown/ifup scenarios w/ J/P Agg

There exists situations where we may have cleaned not
properly cleaned up the various J/P aggregation lists.
This commit fixes those issues.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #261 from opensourcerouting/lib_cleanup
Donald Sharp [Wed, 8 Mar 2017 12:38:21 +0000 (07:38 -0500)]
Merge pull request #261 from opensourcerouting/lib_cleanup

startup, option parsing & logging refactor

7 years ago*: fix some option descriptions and make -e work
David Lamparter [Wed, 8 Mar 2017 00:56:02 +0000 (01:56 +0100)]
*: fix some option descriptions and make -e work

There were some typos in command line help, also the "e:" spec was
missing for getopt in zebra/bgpd (even before the refactor).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: time: remove leftover declarations
David Lamparter [Fri, 10 Feb 2017 22:10:06 +0000 (23:10 +0100)]
lib: time: remove leftover declarations

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: hide away logging internals
David Lamparter [Tue, 23 Feb 2016 12:01:47 +0000 (13:01 +0100)]
lib: hide away logging internals

... no need to have struct zlog generally-exposed.

A few files get to include log_int.h because they use zlog/vzlog.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: remove remaining struct zlog * args
David Lamparter [Tue, 23 Feb 2016 11:49:45 +0000 (12:49 +0100)]
lib: remove remaining struct zlog * args

These don't serve any purpose either.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: simplify protocol/log naming
David Lamparter [Tue, 23 Feb 2016 11:38:23 +0000 (12:38 +0100)]
lib: simplify protocol/log naming

The protocols enum serves no purpose other than adding potential for
bugs and making it complicated to add a new protocol... nuke.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: ditch struct zlog * argument on zlog/vzlog()
David Lamparter [Tue, 23 Feb 2016 10:59:36 +0000 (11:59 +0100)]
lib: ditch struct zlog * argument on zlog/vzlog()

It's completely useless...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years ago*: get rid of zlog(*, LOG_LEVEL, ...)
David Lamparter [Sun, 13 Nov 2016 03:19:14 +0000 (12:19 +0900)]
*: get rid of zlog(*, LOG_LEVEL, ...)

Result of running the following Coccinelle patch + fixups:
<<EOF
/* long-forms: zlog(NULL, <level>, ...)
 *    =>       zlog_level(...)
 */

@@
expression list args;
@@
- zlog(NULL, LOG_DEBUG, args)
+ zlog_debug(args)

@@
expression list args;
@@
- zlog(NULL, LOG_NOTICE, args)
+ zlog_notice(args)

@@
expression list args;
@@
- zlog(NULL, LOG_INFO, args)
+ zlog_info(args)

@@
expression list args;
@@
- zlog(NULL, LOG_WARNING, args)
+ zlog_warn(args)

@@
expression list args;
@@
- zlog(NULL, LOG_ERR, args)
+ zlog_err(args)

/* long-forms: zlog(base->log, <level>, ...)
 *    =>       zlog_level(...)
 */

@@
expression base;
expression list args;
@@
- zlog(base->log, LOG_DEBUG, args)
+ zlog_debug(args)

@@
expression base;
expression list args;
@@
- zlog(base->log, LOG_NOTICE, args)
+ zlog_notice(args)

@@
expression base;
expression list args;
@@
- zlog(base->log, LOG_INFO, args)
+ zlog_info(args)

@@
expression base;
expression list args;
@@
- zlog(base->log, LOG_WARNING, args)
+ zlog_warn(args)

@@
expression base;
expression list args;
@@
- zlog(base->log, LOG_ERR, args)
+ zlog_err(args)

EOF

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years ago*: add frr_run()
David Lamparter [Mon, 14 Nov 2016 00:56:02 +0000 (09:56 +0900)]
*: add frr_run()

Contains the fetch-and-run-thread logic, and vty startup (which is the
last thing happening before entering the main loop).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years ago*: add frr_config_fork()
David Lamparter [Sun, 13 Nov 2016 08:48:56 +0000 (17:48 +0900)]
*: add frr_config_fork()

Centralise read_config/daemonize/dryrun/pidfile/vty_serv into libfrr.

This also makes multi-instance pid/config handling available as part of
the library.  It's only wired up in ospfd, but the code is in lib/.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years ago*: centralize more into frr_init()
David Lamparter [Sun, 13 Nov 2016 07:23:29 +0000 (16:23 +0900)]
*: centralize more into frr_init()

Move CLI/VTY/Memory accounting init into frr_*

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years ago*: add frr_init() infrastructure
David Lamparter [Sun, 13 Nov 2016 07:02:23 +0000 (16:02 +0900)]
*: add frr_init() infrastructure

Start centralising startup & option parsing into the library.

FRR_DAEMON_INFO is a bit weird, but it will become useful later (e.g.
for killing the ZLOG_* enum, and having the daemon name available)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #257 from opensourcerouting/nhrpd
Donald Sharp [Tue, 7 Mar 2017 20:15:23 +0000 (15:15 -0500)]
Merge pull request #257 from opensourcerouting/nhrpd

nhrpd

7 years agoMerge pull request #259 from opensourcerouting/vtysh-completion-mtype-underflow
Quentin Young [Tue, 7 Mar 2017 18:24:12 +0000 (13:24 -0500)]
Merge pull request #259 from opensourcerouting/vtysh-completion-mtype-underflow

vtysh: fix completion

7 years agovtysh: fix completion
David Lamparter [Tue, 7 Mar 2017 18:16:21 +0000 (19:16 +0100)]
vtysh: fix completion

The return value from cmd_complete_command is a VECTOR_INDEX, not TMP.
Use the appropriate vector_only_index_free().

Fixes #223.

Reported-by: https://github.com/k0ste
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #254 from donaldsharp/shutdown3
Donald Sharp [Tue, 7 Mar 2017 16:29:44 +0000 (11:29 -0500)]
Merge pull request #254 from donaldsharp/shutdown3

Shutdown take 3

7 years agoMerge branch 'frr/pull/250' ("bgpd, zebra: Add ifindex to NEXTHOP_TYPE_IPV4")
David Lamparter [Tue, 7 Mar 2017 16:26:02 +0000 (17:26 +0100)]
Merge branch 'frr/pull/250' ("bgpd, zebra: Add ifindex to NEXTHOP_TYPE_IPV4")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobuild: only default-enable nhrpd on Linux
David Lamparter [Tue, 7 Mar 2017 15:56:57 +0000 (16:56 +0100)]
build: only default-enable nhrpd on Linux

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agocumulus, tools: Allow nhrpd to be brought up
Donald Sharp [Tue, 7 Mar 2017 15:49:46 +0000 (10:49 -0500)]
cumulus, tools: Allow nhrpd to be brought up

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #256 from donaldsharp/bgp_bfd_fix
David Lamparter [Tue, 7 Mar 2017 15:49:53 +0000 (16:49 +0100)]
Merge pull request #256 from donaldsharp/bgp_bfd_fix

bgpd: Clean up bfd memory *before* deleting the peer

7 years agoMerge branch 'frr/pull/243' ("Pim jp agg")
David Lamparter [Tue, 7 Mar 2017 15:42:20 +0000 (16:42 +0100)]
Merge branch 'frr/pull/243' ("Pim jp agg")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agopimd: Add copyright Information to pim_jp_agg.[ch]
Donald Sharp [Tue, 7 Mar 2017 15:40:32 +0000 (10:40 -0500)]
pimd: Add copyright Information to pim_jp_agg.[ch]

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agodistro/redhat: package nhrpd
Timo Teräs [Tue, 14 Feb 2017 11:07:39 +0000 (13:07 +0200)]
distro/redhat: package nhrpd

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
[DL: adapted for FRR, changed port number 2612->2610]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agonhrpd: workaround old kernel vs. glibc definition conflics
Timo Teräs [Tue, 14 Feb 2017 09:55:09 +0000 (11:55 +0200)]
nhrpd: workaround old kernel vs. glibc definition conflics

fixes https://bugzilla.quagga.net/show_bug.cgi?id=908

With kernel-headers-3.10.0 we have:

In file included from netlink_gre.c:15:0:
/usr/include/linux/ipv6.h:19:8: error: redefinition of 'struct in6_pktinfo'
 struct in6_pktinfo {
        ^
In file included from netlink_gre.c:10:0:
/usr/include/netinet/in.h:536:8: note: originally defined here
 struct in6_pktinfo
        ^
In file included from netlink_gre.c:15:0:
/usr/include/linux/ipv6.h:24:8: error: redefinition of 'struct ip6_mtuinfo'
 struct ip6_mtuinfo {
        ^
In file included from netlink_gre.c:10:0:
/usr/include/netinet/in.h:543:8: note: originally defined here
 struct ip6_mtuinfo

So instead of libc's netinet/in.h include kernel's linux/in.h
and the add sys/socket.h for struct sockaddr since it does not
seem to be defined in kernel headers.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agodoc: add initial nhrpd documentation
Timo Teräs [Tue, 24 Jan 2017 14:42:19 +0000 (16:42 +0200)]
doc: add initial nhrpd documentation

[DL: resolved renaming & conflicts]
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agonhrpd: include headers in dist tarball
David Lamparter [Sun, 12 Feb 2017 13:25:26 +0000 (14:25 +0100)]
nhrpd: include headers in dist tarball

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agonhrpd: change VTY port 2612->2610
David Lamparter [Sun, 12 Feb 2017 12:41:37 +0000 (13:41 +0100)]
nhrpd: change VTY port 2612->2610

2612 is already in use for ldpd.
(Change to SERVICES file resolved in rebasing)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agonhrpd: adapt to API changes
David Lamparter [Sat, 11 Feb 2017 20:29:57 +0000 (21:29 +0100)]
nhrpd: adapt to API changes

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agonhrpd: implement next hop resolution protocol
Timo Teräs [Thu, 19 Jan 2017 15:27:01 +0000 (17:27 +0200)]
nhrpd: implement next hop resolution protocol

This provides DMVPN support and integrates to strongSwan. Please read
README.nhrpd and README.kernel for more details.

[DL: cherry-picked from dafa05e65fe4b3b3ed5525443f554215ba14f42c]
[DL: merge partially resolved, this commit will not build.]
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/255' ("vtysh: Fix cli help string to have only 1 mention of...
David Lamparter [Tue, 7 Mar 2017 15:13:49 +0000 (16:13 +0100)]
Merge branch 'frr/pull/255' ("vtysh: Fix cli help string to have only 1 mention of vty_socket")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/246' ("Pim command cleanup")
David Lamparter [Tue, 7 Mar 2017 15:09:30 +0000 (16:09 +0100)]
Merge branch 'frr/pull/246' ("Pim command cleanup")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/240' ("lib, bgpd: clean up headers")
David Lamparter [Tue, 7 Mar 2017 15:03:36 +0000 (16:03 +0100)]
Merge branch 'frr/pull/240' ("lib, bgpd: clean up headers")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/236' ("tools: frr-reload.py needs to treat "mpls" as a single...
David Lamparter [Tue, 7 Mar 2017 15:02:41 +0000 (16:02 +0100)]
Merge branch 'frr/pull/236' ("tools: frr-reload.py needs to treat "mpls" as a single line context")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'frr/pull/228' ("doc: add CLI implementation documentation")
David Lamparter [Tue, 7 Mar 2017 15:01:37 +0000 (16:01 +0100)]
Merge branch 'frr/pull/228' ("doc: add CLI implementation documentation")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #251 from donaldsharp/bgp_view
Martin Winter [Tue, 7 Mar 2017 14:51:10 +0000 (06:51 -0800)]
Merge pull request #251 from donaldsharp/bgp_view

BGP Display

7 years agobgpd: Clean up bfd memory *before* deleting the peer
Donald Sharp [Tue, 7 Mar 2017 13:45:24 +0000 (08:45 -0500)]
bgpd: Clean up bfd memory *before* deleting the peer

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agovtysh: Fix cli help string to have only 1 mention of vty_socket
Donald Sharp [Tue, 7 Mar 2017 00:49:05 +0000 (19:49 -0500)]
vtysh: Fix cli help string to have only 1 mention of vty_socket

When you run 'vtysh -h' the option '--vty_socket' is listed twice.
Fixes issue #253

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Only send data if we have something to send
Donald Sharp [Fri, 3 Mar 2017 15:24:15 +0000 (10:24 -0500)]
bgpd: Only send data if we have something to send

When shutting down, only send with data if we have
something to send.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Add json output for last Notification message
Donald Sharp [Thu, 2 Mar 2017 13:56:33 +0000 (08:56 -0500)]
bgpd: Add json output for last Notification message

When we send a shutdown message, add json
support to let us see it there too.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: TX shutdown message
David Lamparter [Wed, 25 Jan 2017 02:30:52 +0000 (03:30 +0100)]
bgpd: TX shutdown message

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agobgpd: RX shutdown message in "show bgp neighbor"
David Lamparter [Wed, 25 Jan 2017 03:03:38 +0000 (04:03 +0100)]
bgpd: RX shutdown message in "show bgp neighbor"

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agolib: add zlog_sanitize function
David Lamparter [Thu, 2 Mar 2017 16:33:37 +0000 (17:33 +0100)]
lib: add zlog_sanitize function

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agobgpd: Remove dead code
Donald Sharp [Mon, 6 Mar 2017 18:59:06 +0000 (13:59 -0500)]
bgpd: Remove dead code

Remove the accidently left code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd, zebra: Add ifindex to NEXTHOP_TYPE_IPV6
Donald Sharp [Mon, 6 Mar 2017 16:05:42 +0000 (11:05 -0500)]
bgpd, zebra: Add ifindex to NEXTHOP_TYPE_IPV6

In the future we plan to update Nexthop tracking to better
handle ipv6 lla.  This commit will set this up for that.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Fix more assignments inside of if statement
Donald Sharp [Mon, 6 Mar 2017 15:43:15 +0000 (10:43 -0500)]
bgpd: Fix more assignments inside of if statement

Code inspection showed a bunch more spots where
we were assigning the safi inside of a if statement

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Fix broken if statement
Donald Sharp [Mon, 6 Mar 2017 15:29:14 +0000 (10:29 -0500)]
bgpd: Fix broken if statement

When outputting routes associated with a 'struct bgp'
do not force the safi to bee SAFI_EVPN and cause output
to be hosed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd, zebra: Add ifindex to NEXTHOP_TYPE_IPV4
Donald Sharp [Mon, 6 Mar 2017 13:16:43 +0000 (08:16 -0500)]
bgpd, zebra: Add ifindex to NEXTHOP_TYPE_IPV4

When passing up NEXTHOP_TYPE_IPV4 pass up the ifindex as well
Zebra already stores this data by passing it up PIM will be
able to use NEXTHOP_TYPE_IPV4 without having to do a recursive
lookup.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoMerge pull request #249 from opensourcerouting/ldpd-rfcs
Donald Sharp [Sun, 5 Mar 2017 02:04:46 +0000 (21:04 -0500)]
Merge pull request #249 from opensourcerouting/ldpd-rfcs

ldpd: implement new RFCs and other assorted enhancements

7 years agoldpd: add missing htonl and ntohl in PF_KEY code
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: add missing htonl and ntohl in PF_KEY code

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: always check if the received labels are valid
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: always check if the received labels are valid

We were doing some sanity checks only for labels of Label Mapping
messages. Now do the same checks for labels of Label Release and Label
Withdraw messages as well.

While here, plug a small memleak in the error path of recv_labelmessage().

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: remove unnecessary memcpy's
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: remove unnecessary memcpy's

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: send VPLS MAC withdrawals
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: send VPLS MAC withdrawals

RFC 4762 says that MAC address withdrawal messages can be used to
improve convergence time in VPLS networks. This patch makes ldpd send
MAC withdrawals whenever a non-pseudowire interface pertaining to a
VPLS goes down. The processing of received MAC withdrawals will be
implemented later.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: fix parsing of optional tlvs in address messages
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: fix parsing of optional tlvs in address messages

We were aborting the session upon receipt of MAC Address Withdrawal
messages. Now make the parser aware that optional TLVs are possible in
address messages.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: implement RFC 5919 (LDP End-of-LIB)
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: implement RFC 5919 (LDP End-of-LIB)

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: implement RFC 6667 (Typed Wildcard FEC for PWid)
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: implement RFC 6667 (Typed Wildcard FEC for PWid)

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: implement RFC 5918 (Typed Wildcard FEC)
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: implement RFC 5918 (Typed Wildcard FEC)

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: implement RFC 5561 (LDP Capabilities)
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: implement RFC 5561 (LDP Capabilities)

This patch per-se doesn't introduce any useful functionality, but prepares
the ground for new enhancements to ldpd (i.e. implementation of new RFCs
that make use of LDP capabilities).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: implement support for PWid group wildcards
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: implement support for PWid group wildcards

This was missing from our original RFC 4447 VPLS implementation. Now
ldpd understands group wildcards as mandated by the RFC, but we still
don't send them ourselves. I can't see any case in which sending a group
wildcard would be useful, but nonetheless this patch provides a function
called lde_send_labelwithdraw_pwid_wcard() which is ready to be used in
the future anytime we feel like it might be useful.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: fix processing of Label Withdraw messages
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: fix processing of Label Withdraw messages

Whenever we receive a Label Withdraw message with an optional Label
TLV, we should check if this label matches the label previously
received from this neighbor for this FEC. If they don't match then we
shouldn't uninstall the previous label from the kernel. This fixes a
misinterpretation from the "Receive Label Withdraw" algorithm described
in the A.1.5 section of RFC 5036.

Also, simplify the check of pending withdraws in lde_check_release()
and lde_check_release_wcard().

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: the PW Status is an unknown TLV
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: the PW Status is an unknown TLV

Without this fix, any LDP speaker that doesn't implement RFC 4447 will
shut down the session upon receipt of a PWid Label Mapping (unless the
use of the PW-Status TLV is disabled via configuration).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: send correct status code on error condition
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: send correct status code on error condition

The Unknown TLV status code is reserved for cases where we don't know
how to process a given TLV and its Unknown TLV bit is not set.

In the case of Address Messages, the Address List TLV is mandatory and
should appear before any optional TLV in the message. If that doesn't
happen the correct status notification to send is "Missing Message
Parameters" (non-fatal error).

Also, add a missing htons when creating an Address List TLV. Since the
value of TLV_TYPE_ADDRLIST is 0x0101 this missing htons wasn't noticed
earlier.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: create helper functions to log sent/received messages
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: create helper functions to log sent/received messages

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: provide more detailed output when logging notification messages
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: provide more detailed output when logging notification messages

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: kill send_notification_nbr()
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: kill send_notification_nbr()

Be more clever and trigger the PDU SENT event inside send_notification()
when tcp->nbr is set. This way we can eliminate send_notification_nbr()
and always use send_notification() instead.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: minor tweaks
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: minor tweaks

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: replace hand-rolled 'for' loop with specialized macro
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: replace hand-rolled 'for' loop with specialized macro

No intentional functional change.

Original author: Kenneth R Westerback <krw@openbsd.org>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agotools: frr-reload.py needs to treat "no " as a single line context
Daniel Walton [Fri, 3 Mar 2017 19:57:27 +0000 (19:57 +0000)]
tools: frr-reload.py needs to treat "no " as a single line context

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #245 from donaldsharp/ldpd_load
Renato Westphal [Fri, 3 Mar 2017 16:25:17 +0000 (13:25 -0300)]
Merge pull request #245 from donaldsharp/ldpd_load

Ldpd load

7 years agolib: Cleanup missing help strings for 'show commandtree..'
Donald Sharp [Fri, 3 Mar 2017 15:54:10 +0000 (10:54 -0500)]
lib: Cleanup missing help strings for 'show commandtree..'

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agocumulus: Add startup parameters for ldpd
Donald Sharp [Fri, 3 Mar 2017 15:47:10 +0000 (10:47 -0500)]
cumulus: Add startup parameters for ldpd

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>