]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agoMerge pull request #984 from donaldsharp/debugging
David Lamparter [Wed, 16 Aug 2017 17:18:31 +0000 (19:18 +0200)]
Merge pull request #984 from donaldsharp/debugging

Some Small Pim Issues

6 years agoMerge pull request #990 from donaldsharp/eigrp_cleanup
Russ White [Wed, 16 Aug 2017 17:16:54 +0000 (13:16 -0400)]
Merge pull request #990 from donaldsharp/eigrp_cleanup

Eigrp cleanup

6 years agoMerge pull request #979 from donaldsharp/ifchannel_fix
David Lamparter [Wed, 16 Aug 2017 17:16:46 +0000 (19:16 +0200)]
Merge pull request #979 from donaldsharp/ifchannel_fix

pimd: Ensure cleanup of S,G on ifchannel failure to create

6 years agoMerge pull request #972 from chiragshah6/mdev
David Lamparter [Wed, 16 Aug 2017 17:14:08 +0000 (19:14 +0200)]
Merge pull request #972 from chiragshah6/mdev

Pim Bfd related changes

6 years agoMerge pull request #985 from chiragshah6/mdev2
Martin Winter [Wed, 16 Aug 2017 03:30:23 +0000 (20:30 -0700)]
Merge pull request #985 from chiragshah6/mdev2

ospfd: Fix ospfd crash in free_nexthop

6 years agoeigrpd: Cleanup eigrp_get_fsm_event
Donald Sharp [Wed, 16 Aug 2017 02:35:27 +0000 (22:35 -0400)]
eigrpd: Cleanup eigrp_get_fsm_event

Make this function a bit more legible

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Make eigrp_get_fsm_event use metric changed
Donald Sharp [Wed, 16 Aug 2017 02:14:18 +0000 (22:14 -0400)]
eigrpd: Make eigrp_get_fsm_event use metric changed

Refactor eigrp_get_fsm_event a tiny bit to let all
the states get the new metric.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: cleanup eigrp_topology_update_distance
Donald Sharp [Wed, 16 Aug 2017 02:09:55 +0000 (22:09 -0400)]
eigrpd: cleanup eigrp_topology_update_distance

Cleanup eigrp_topology_update_distance to
return an enum of whether or not the metric
has changed or not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Add 'show ip msdp vrf all sa ...' command
Donald Sharp [Tue, 15 Aug 2017 20:37:13 +0000 (16:37 -0400)]
pimd: Add 'show ip msdp vrf all sa ...' command

Allow the ability to iterate over all vrfs.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #983 from opensourcerouting/vtysh-watchfrr-no-conf
Donald Sharp [Tue, 15 Aug 2017 15:37:15 +0000 (11:37 -0400)]
Merge pull request #983 from opensourcerouting/vtysh-watchfrr-no-conf

vtysh: don't collect config from watchfrr

6 years agoMerge pull request #982 from opensourcerouting/buildfix-parallel-tests-clippy
Quentin Young [Tue, 15 Aug 2017 15:28:37 +0000 (11:28 -0400)]
Merge pull request #982 from opensourcerouting/buildfix-parallel-tests-clippy

tests: fix clippy include paths / double-build

6 years agoospfd: Fix ospfd crash in free_nexthop
Chirag Shah [Tue, 15 Aug 2017 01:57:46 +0000 (18:57 -0700)]
ospfd: Fix ospfd crash in free_nexthop

Fix ANVL-OSPF-5.1 reported ospfd crash.

vertex_nexthop_free was added as valgrind reported potential
memory leak, but in some cases nexthop would not be available
freed.
The actual nexthop free is part of ospf_canonical_nexthops_free(),
upon trying to free, qfree checks mtype count becomes 0 and asserts.
Removing vertex_nexthop_free() from ospf_spf_flush_parents().

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agopimd: Rename duplicate JSON key
Donald Sharp [Tue, 15 Aug 2017 14:31:09 +0000 (10:31 -0400)]
pimd: Rename duplicate JSON key

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Add more vrf debugging to pim_upstream.c
Donald Sharp [Tue, 15 Aug 2017 14:17:33 +0000 (10:17 -0400)]
pimd: Add more vrf debugging to pim_upstream.c

Cleanup a few missed spots of debugging to know
what vrf we are talking about.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Allow user to specify ip address for 'no ip pim use-source'
Donald Sharp [Tue, 15 Aug 2017 14:16:51 +0000 (10:16 -0400)]
pimd: Allow user to specify ip address for 'no ip pim use-source'

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agovtysh: don't collect config from watchfrr
David Lamparter [Tue, 15 Aug 2017 11:43:50 +0000 (13:43 +0200)]
vtysh: don't collect config from watchfrr

This results in some hardcoded watchfrr logging config ending up in the
integrated config otherwise.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
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 agotests: fix clippy include paths / double-build
David Lamparter [Tue, 15 Aug 2017 09:17:36 +0000 (11:17 +0200)]
tests: fix clippy include paths / double-build

A mismatch between the make rule and the include path causes dependency
tracking to try to build the clippy.c file twice (at the same time),
which results in spurious build failures.

Fixes: #971
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
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 agopimd: Ensure cleanup of S,G on ifchannel failure to create
Donald Sharp [Mon, 14 Aug 2017 23:06:39 +0000 (19:06 -0400)]
pimd: Ensure cleanup of S,G on ifchannel failure to create

There exists a path for ifchannel creation that if a S,G
fails to create and a corresponding *,G ifchannel is there,
the S,G will be deleted but we were leaving the S,G in the
*,G ifchannel sources list.  Remove from the list in this case

Ticket: CM-17605
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
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 agopimd: pim bfd vrf aware
Chirag Shah [Mon, 14 Aug 2017 00:41:01 +0000 (17:41 -0700)]
pimd: pim bfd vrf aware

BFD replay for all interfaces was only considering VRF_DEFAULT interface
list.
The change will walk all VRFs, interface list per VRF to register pim
neighbor with BFD.

Signed-off-by: Chirag shah <chirag@cumulusnetworks.com>
6 years agopimd: Fix pim bfd config order dependecny
Chirag Shah [Mon, 14 Aug 2017 00:28:11 +0000 (17:28 -0700)]
pimd: Fix pim bfd config order dependecny

Upon frr restart vtysh replays pim bfd configuration
cli before pim sm command, this results in failure
of pim bfd config on the VIF as it is not pim enabled yet.
Inside pim bfd configuration, call to create PIM vif
handler if it is not created yet.
no ip pim bfd, if pim is not enabled display warning and return.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
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>