]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agoMerge pull request #935 from donaldsharp/kernel_metric
David Lamparter [Tue, 15 Aug 2017 11:42:04 +0000 (13:42 +0200)]
Merge pull request #935 from donaldsharp/kernel_metric

zebra: Pay attention to metric from kernel

6 years agoMerge pull request #976 from lucize/lededoc
Donald Sharp [Tue, 15 Aug 2017 11:30:54 +0000 (07:30 -0400)]
Merge pull request #976 from lucize/lededoc

doc: add LEDE/OpenWRT build instructions

6 years agoMerge pull request #978 from devicenull/master
David Lamparter [Tue, 15 Aug 2017 09:12:15 +0000 (11:12 +0200)]
Merge pull request #978 from devicenull/master

bgpd: Check for per-peer outbound configuration, in addition to the peer-group config

6 years agoMerge pull request #948 from qlyoung/fix-set-ip-next-hop-peer-address
David Lamparter [Tue, 15 Aug 2017 09:10:01 +0000 (11:10 +0200)]
Merge pull request #948 from qlyoung/fix-set-ip-next-hop-peer-address

lib, bgpd: fix `set ip next-hop peer-address`

6 years agoMerge pull request #934 from qlyoung/mac-parser
David Lamparter [Tue, 15 Aug 2017 09:09:15 +0000 (11:09 +0200)]
Merge pull request #934 from qlyoung/mac-parser

lib: add CLI token for 48-bit mac addresses

6 years agobgpd: Check for per-peer outbound configuration, in addition to the peer-group config
Brian Rak [Mon, 14 Aug 2017 21:22:03 +0000 (17:22 -0400)]
bgpd: Check for per-peer outbound configuration, in addition to the peer-group config

When displaying the config, bgpd only checked for the existance of a peer-group prefix-list before
deciding to not display the outbound prefix-list.  This commit updates the outbound prefix-list
logic to match the inbound.

6 years agodoc: add LEDE/OpenWRT build instructions
Lucian Cristian [Mon, 14 Aug 2017 19:20:30 +0000 (22:20 +0300)]
doc: add LEDE/OpenWRT build instructions

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years agolib, python: add M:A:C support for clippy
Quentin Young [Fri, 11 Aug 2017 16:53:06 +0000 (12:53 -0400)]
lib, python: add M:A:C support for clippy

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #959 from donaldsharp/pim_fixes
Jafar Al-Gharaibeh [Mon, 14 Aug 2017 14:58:23 +0000 (09:58 -0500)]
Merge pull request #959 from donaldsharp/pim_fixes

Pim fixes

6 years agoMerge pull request #969 from opensourcerouting/ownership-fix
Donald Sharp [Sat, 12 Aug 2017 21:37:34 +0000 (17:37 -0400)]
Merge pull request #969 from opensourcerouting/ownership-fix

zebra: don't raise privileges when creating unix zserv socket

6 years agozebra: don't raise privileges when creating unix zserv socket
Renato Westphal [Sat, 12 Aug 2017 19:02:42 +0000 (16:02 -0300)]
zebra: don't raise privileges when creating unix zserv socket

Raising privileges is only necessary when binding to a TCP/UDP privileged
port (< 1024).

This solves a problem where the zserv.api socket was being created with
root ownership, preventing the client daemons to connect to zebra.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoMerge pull request #964 from opensourcerouting/plist-trie-corruption-3.0
Donald Sharp [Fri, 11 Aug 2017 18:41:59 +0000 (14:41 -0400)]
Merge pull request #964 from opensourcerouting/plist-trie-corruption-3.0

[3.0] lib: fix prefix list trie corruption

6 years agoMerge pull request #963 from opensourcerouting/plist-trie-corruption
Donald Sharp [Fri, 11 Aug 2017 18:41:43 +0000 (14:41 -0400)]
Merge pull request #963 from opensourcerouting/plist-trie-corruption

lib: fix prefix list trie corruption

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 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 agolib: add CLI token for 48-bit mac addresses
Quentin Young [Tue, 8 Aug 2017 21:10:23 +0000 (17:10 -0400)]
lib: add CLI token for 48-bit mac addresses

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #957 from chiragshah6/mdev
David Lamparter [Fri, 11 Aug 2017 16:28:04 +0000 (18:28 +0200)]
Merge pull request #957 from chiragshah6/mdev

ospfd: fix crash due to conflicting router-id, fix MI-OSPF cli in lib commands and fix memory leaks

6 years agoMerge pull request #960 from opensourcerouting/vty-fixes
Lou Berger [Fri, 11 Aug 2017 15:30:42 +0000 (11:30 -0400)]
Merge pull request #960 from opensourcerouting/vty-fixes

vty stdio & newline fixing

6 years agoMerge pull request #961 from opensourcerouting/isis-fragment-fix
Donald Sharp [Fri, 11 Aug 2017 14:59:08 +0000 (10:59 -0400)]
Merge pull request #961 from opensourcerouting/isis-fragment-fix

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

6 years agoMerge pull request #953 from jbonor/nhrpd-fixes
Donald Sharp [Fri, 11 Aug 2017 14:38:00 +0000 (10:38 -0400)]
Merge pull request #953 from jbonor/nhrpd-fixes

nhrpd: fix issues found by coverity

6 years agoMerge pull request #954 from qlyoung/bgp-declvar
David Lamparter [Fri, 11 Aug 2017 14:37:02 +0000 (16:37 +0200)]
Merge pull request #954 from qlyoung/bgp-declvar

bgpd: don't use DECLVAR without qobj pointer

6 years agoisisd: always link fragments to fragment #0, even when learned by CSNP
Christian Franke [Fri, 11 Aug 2017 13:28:58 +0000 (15:28 +0200)]
isisd: always link fragments to fragment #0, even when learned by CSNP

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agolib: don't close stdio when running foreground
David Lamparter [Fri, 11 Aug 2017 13:43:28 +0000 (15:43 +0200)]
lib: don't close stdio when running foreground

c9c8d0d ("lib: close stdin/out/err in non-terminal case") overshot its
goal and closes stdin/stdout/stderr even when a daemon is running in
foreground.  That means stdout logging & exit memory reporting are both
broken.

Reported-by: Lou Berger <lberger@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobgpd: don't sidestep vty code
David Lamparter [Fri, 11 Aug 2017 12:25:56 +0000 (14:25 +0200)]
bgpd: don't sidestep vty code

afi_header_vty_out is sidestepping the vty code, writing straight to the
output (either stdout or the obuf), which results in newline translation
not being performed.

Easiest fix is replacing it with a macro.  Longer-term, I have some old
code to add "prefaces" to the vty output, planning to dig that up.

Fixes: #949 ("bgpd show running doesn't show new lines")
Reported-by: Lou Berger <lberger@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agopimd: Remove mroute when RPF is gone
Donald Sharp [Thu, 10 Aug 2017 20:13:45 +0000 (16:13 -0400)]
pimd: Remove mroute when RPF is gone

This does three things:

1) When we get a RPF_FAILURE, remove the mroute associated
with it.
   -> This way when the RPF comes back we can just add the
      mroute in as part of the normal scanning process.
2) When we do a ecmp_nexthop_search return 1 when we found
something we can use.
3) Ignore output from pim_update_rp_nh
   -> When we do a ecmp_nexthop_search ignore the return
      code and do not attempt to gather it up to return
      to the calling function.  It is just ignored
      and we were not taking into account the what of
      multiple RP's we were looking at.

Ticket: CM-17218
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Single Upstream join when Keepalive timer pops
Donald Sharp [Thu, 10 Aug 2017 18:41:38 +0000 (14:41 -0400)]
pimd: Single Upstream join when Keepalive timer pops

If a single S,G is being deleted because the keepalive
timer has timed out, Send a *,G join upstream to clear
the S,G RPT prune bit.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agonhrpd: fixes for clang scan-build issues
Jorge Boncompte [Fri, 11 Aug 2017 10:19:23 +0000 (12:19 +0200)]
nhrpd: fixes for clang scan-build issues

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
6 years agoMerge pull request #956 from lunn/eigrpd-bandwidth
Donald Sharp [Thu, 10 Aug 2017 23:13:19 +0000 (19:13 -0400)]
Merge pull request #956 from lunn/eigrpd-bandwidth

eigrpd: fix spelling of "bandwidth"

6 years agoMerge pull request #950 from LabNConsulting/working/master/patch/alt-emacs-ws-convention
Donald Sharp [Thu, 10 Aug 2017 22:40:36 +0000 (18:40 -0400)]
Merge pull request #950 from LabNConsulting/working/master/patch/alt-emacs-ws-convention

Initial take on project emacs variables file and settings.

6 years agoeigrpd: fix spelling of "bandwidth"
Andrew Lunn [Thu, 10 Aug 2017 22:24:24 +0000 (17:24 -0500)]
eigrpd: fix spelling of "bandwidth"

There are a number of spelling errors in eigrp. But this one is
particular annoying because it is a variable name, not in a comment.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
6 years agoospfd: Fix conflict router-id, memory leaks
Chirag Shah [Fri, 23 Jun 2017 00:19:00 +0000 (17:19 -0700)]
ospfd: Fix conflict router-id, memory leaks

Remove assert in path of router_id_update:
Upon configuring same router-id as neighbor's
assert would cause a crash. Log a warning message
and neighborship would not come up.

Address memory leaks

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agolib: Fix multi instance ospf
Chirag Shah [Thu, 10 Aug 2017 17:13:36 +0000 (10:13 -0700)]
lib: Fix multi instance ospf

ospfd crashes upon configuring multi-instance ospf
i.e 'router ospf x'.
ospfd can return CMD_NOT_MY_INSTANCE which
is not supported in lib/commands

Support two of the error codes
CMD_NOT_MY_INSTANCE and CMD_WARNING_CONFIG_FAILED

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agobgpd: don't use DECLVAR without qobj pointer
Quentin Young [Thu, 10 Aug 2017 21:01:59 +0000 (17:01 -0400)]
bgpd: don't use DECLVAR without qobj pointer

Since we don't actually have a BGP context until we enter into the
`router bgp` node, debugging commands which use DECLVAR before that
happens will fail. This is just `no debug bgp` and `no debug bgp
updates`. Instead just iterate over all bgp instances and do the deed.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agonhrpd: fix issues found by coverity
Jorge Boncompte [Thu, 10 Aug 2017 19:21:14 +0000 (21:21 +0200)]
nhrpd: fix issues found by coverity

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
6 years agoMerge pull request #952 from lunn/eigrpd-nbr-timer-crash
Donald Sharp [Thu, 10 Aug 2017 19:11:37 +0000 (15:11 -0400)]
Merge pull request #952 from lunn/eigrpd-nbr-timer-crash

eigrp: Don't dereference NULL timer in a Neighbour

6 years agoeigrp: Don't dereference NULL timer in a Neighbour
Andrew Lunn [Wed, 9 Aug 2017 18:46:52 +0000 (13:46 -0500)]
eigrp: Don't dereference NULL timer in a Neighbour

Current, a eigrp_neighbor only has a t_holddown timer when in state
EIGRP_NEIGHBOR_PENDING and EIGRP_NEIGHBOR_UP. In state
EIGRP_NEIGHBOR_DOWN it could be a NULL pointer. Don't dereference the
timer when dumping the neighbour table without first checking it
exists. If it does not exist, display - instead of the remaining time.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
6 years agoInitial take on project emacs variables file and settings. Sets tabs for c-mode.
Lou Berger [Thu, 10 Aug 2017 18:07:28 +0000 (14:07 -0400)]
Initial take on project emacs variables file and settings.  Sets tabs for c-mode.

6 years agobgpd: add `no set ip next-hop unchanged`
Quentin Young [Thu, 10 Aug 2017 16:55:32 +0000 (12:55 -0400)]
bgpd: add `no set ip next-hop unchanged`

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib, bgpd: fix `set ip next-hop peer-address`
Quentin Young [Thu, 10 Aug 2017 16:31:47 +0000 (12:31 -0400)]
lib, bgpd: fix `set ip next-hop peer-address`

This bgp-specific command had its positive form defined only in bgpd and
its negative form defined only in lib, which broke the whole rule for
other daemons.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #941 from dwalton76/bgpd-peer-group-rebind
David Lamparter [Thu, 10 Aug 2017 06:19:33 +0000 (08:19 +0200)]
Merge pull request #941 from dwalton76/bgpd-peer-group-rebind

bgpd: do not bounce peer when re-binding to current peer-group

6 years agoMerge pull request #938 from LabNConsulting/working/master/patch/pr784-partial-backout
Jafar Al-Gharaibeh [Thu, 10 Aug 2017 04:42:39 +0000 (23:42 -0500)]
Merge pull request #938 from LabNConsulting/working/master/patch/pr784-partial-backout

configure: restore support for --with-rfp-path= broken by PR784

6 years agoconfigure: restore support for --with-rfp-path= broken by PR784
Lou Berger [Wed, 9 Aug 2017 15:56:58 +0000 (11:56 -0400)]
configure: restore support for --with-rfp-path= broken by PR784
   - revised per equinox

6 years agoMerge branch 'frr/pull/822' ("EVPN fixes")
David Lamparter [Wed, 9 Aug 2017 19:34:10 +0000 (21:34 +0200)]
Merge branch 'frr/pull/822' ("EVPN fixes")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge pull request #926 from opensourcerouting/tcp-zebra
Donald Sharp [Wed, 9 Aug 2017 18:43:48 +0000 (14:43 -0400)]
Merge pull request #926 from opensourcerouting/tcp-zebra

remove `--enable-tcp-zebra`

6 years agoMerge pull request #940 from qlyoung/hashtable-expansion-lf
David Lamparter [Wed, 9 Aug 2017 18:43:40 +0000 (20:43 +0200)]
Merge pull request #940 from qlyoung/hashtable-expansion-lf

lib: use load factor as hash expansion trigger

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 agolib: some final MAC access-list fixes
David Lamparter [Wed, 9 Aug 2017 18:30:34 +0000 (20:30 +0200)]
lib: some final MAC access-list fixes

- couldn't load back written configs because it was trying to parse
  "any" as MAC address
- don't need special-casing in filter_match_zebra(), exact is going to
  be 0 for AF_ETHERNET anyway
- some vty formatting was slightly different
- is_zero_mac now static to prefix.c

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
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 agolib: use load factor as hash expansion trigger
Quentin Young [Wed, 9 Aug 2017 15:57:13 +0000 (11:57 -0400)]
lib: use load factor as hash expansion trigger

Previous strategy was to resize the hash table when the length of any
one bucket exceeded a certain size, with some logic for intelligently
stopping resizes when the gains from doing so weren't sufficient. While
this was a good idea that attempted to optimize both space and lookup
time, unfortunately under transient degenerate conditions this led to
some issues with the tables not resizing when they should have,
harming performance. The resizing restriction was lifted, but this had
the result of exacerbating degenerate behavior and caused out of memory
conditions.

This patch changes the hash expansion criterion to be based on the
number of elements in the table. Once the # of elements in the table
exceeds the number of buckets, the table size is doubled. While the
space efficiency of this method decreases relative to the perfectness of
the hash function, at least this strategy puts the table performance
squarely in the hands of the hash function.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
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 agobgpd: do not bounce peer when re-binding to current peer-group
Daniel Walton [Wed, 9 Aug 2017 16:47:05 +0000 (20:47 +0400)]
bgpd: do not bounce peer when re-binding to current peer-group

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
6 years agobgpd: do not bounce peer when re-binding to current peer-group
Daniel Walton [Wed, 9 Aug 2017 16:04:55 +0000 (20:04 +0400)]
bgpd: do not bounce peer when re-binding to current peer-group

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
6 years agozebra: Pay attention to metric from kernel
Donald Sharp [Wed, 9 Aug 2017 13:13:33 +0000 (09:13 -0400)]
zebra: Pay attention to metric from kernel

When the linux kernel adds/deletes routes, the
metric is important, but our routing protocols
add/delete in a slightly different manner,
so allow kernel metrics to match so that our
rib matches the kernel's fib.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
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, bgpd: Use 'struct prefix *' for filter matching
Donald Sharp [Fri, 4 Aug 2017 19:55:44 +0000 (15:55 -0400)]
lib, bgpd: Use 'struct prefix *' for filter matching

There is no need for special casing of mac addresses,
since the mac address is it's own type integrated
into `struct prefix` now.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
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 agolib, bgpd: Distinguish between AF_EVPN and AF_ETHERNET
Donald Sharp [Tue, 8 Aug 2017 14:16:12 +0000 (10:16 -0400)]
lib, bgpd: Distinguish between AF_EVPN and AF_ETHERNET

Create AF_EVPN for internal use and start using it.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
6 years agolib, bgpd: Address Review comments.
Donald Sharp [Thu, 27 Jul 2017 16:31:54 +0000 (12:31 -0400)]
lib, bgpd: Address Review comments.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Use JSON_STR
Donald Sharp [Tue, 25 Jul 2017 12:18:20 +0000 (08:18 -0400)]
bgpd: Use JSON_STR

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoldpd: Use JSON_STR
Donald Sharp [Tue, 25 Jul 2017 12:17:55 +0000 (08:17 -0400)]
ldpd: Use JSON_STR

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Use JSON_STR
Donald Sharp [Tue, 25 Jul 2017 12:17:31 +0000 (08:17 -0400)]
zebra: Use JSON_STR

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Fix extra doc string
Donald Sharp [Sat, 15 Jul 2017 18:15:13 +0000 (14:15 -0400)]
lib: Fix extra doc string

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgp: fix match mac address/match evpn vni commands
Mitesh Kanjariya [Wed, 12 Jul 2017 21:55:22 +0000 (14:55 -0700)]
bgp: fix match mac address/match evpn vni commands

Ticket: CM-17071
Review: CCR-6454
Unit-test: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agolib: changes needed for mac access-list any command
Mitesh Kanjariya [Wed, 12 Jul 2017 21:27:24 +0000 (14:27 -0700)]
lib: changes needed for mac access-list any command

Ticket: CM-17074
Review: CCR-6453
Unit-test: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agozebra: zebra should not try and advertise gateway macip if EVPN is disabled
Mitesh Kanjariya [Wed, 12 Jul 2017 21:09:36 +0000 (14:09 -0700)]
zebra: zebra should not try and advertise gateway macip if EVPN is disabled

Ticket: CM-17050
Review: CCR-6447
Unit-test: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: BGP should not ignore the VNI add notification if it is not live currently
Mitesh Kanjariya [Wed, 12 Jul 2017 20:44:02 +0000 (13:44 -0700)]
bgpd: BGP should not ignore the VNI add notification if it is not live currently

Ticket: CM-17053
Review: CCR-6446
Unit-test: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agozebra: Guard debugs in interface speed check
Donald Sharp [Fri, 7 Jul 2017 13:45:15 +0000 (09:45 -0400)]
zebra: Guard debugs in interface speed check

Not being able to get the interface speed is a common
occurrence for some interface types.  Convert this
these outputs to a guarded debug.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Fix output of interface based 'show bgp ..' commands
Donald Sharp [Fri, 7 Jul 2017 13:08:25 +0000 (09:08 -0400)]
bgpd: Fix output of interface based 'show bgp ..' commands

When issuing a 'show ip bgp' command and the nexthop is
a interface, if the interface name was greater than 7 characters
we would arbitrarily start a new-line and setup the next
line to start at the wrong spot.

Modify the interface field to allow 16 characters than 7( to
match v6 display ), and if the interface name is greater than
16 characters properly setup the next line for display

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: show bgp ipv4 label-unicast does not provide any output
Daniel Walton [Thu, 6 Jul 2017 23:47:15 +0000 (23:47 +0000)]
bgpd: show bgp ipv4 label-unicast does not provide any output

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-16957

6 years agobgpd/zebra: honor tunnel ip change in bgp regardless of vni readiness
Mitesh Kanjariya [Thu, 6 Jul 2017 23:33:50 +0000 (16:33 -0700)]
bgpd/zebra: honor tunnel ip change in bgp regardless of vni readiness

Ticket: CM-17014
Review: CCR-6432
Unit-test: Manual

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agozebra: Provide neigh-mac tie-in in zebra
Mitesh Kanjariya [Wed, 5 Jul 2017 22:03:14 +0000 (15:03 -0700)]
zebra: Provide neigh-mac tie-in in zebra

Currently, FRR does not do any linking between local MACs and neighbors.
We found this necessary when dealing with centralized GW. A neigh is considered local only when the mac is learnt locally as well.

Ticket: CM-16544
Review: CCR-6388
Unit-test: Manual/Evpn-Smoke

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>