]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agoMerge branch 'master' into PIM_VRF
Donald Sharp [Wed, 2 Aug 2017 13:39:38 +0000 (09:39 -0400)]
Merge branch 'master' into PIM_VRF

6 years agopimd: Add `ip pim rp keep-alive-time X`
Donald Sharp [Wed, 2 Aug 2017 12:15:45 +0000 (08:15 -0400)]
pimd: Add `ip pim rp keep-alive-time X`

Ticket: CM-17134
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #893 from opensourcerouting/minor-issues
Donald Sharp [Wed, 2 Aug 2017 11:59:29 +0000 (07:59 -0400)]
Merge pull request #893 from opensourcerouting/minor-issues

Fix #875 and #889 (minor issues)

6 years agopimd: Add some more vrf debug information
Donald Sharp [Mon, 31 Jul 2017 22:02:23 +0000 (18:02 -0400)]
pimd: Add some more vrf debug information

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Cleanup nht debugs
Donald Sharp [Mon, 31 Jul 2017 21:29:13 +0000 (17:29 -0400)]
pimd: Cleanup nht debugs

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Clean up mroute_add_vif debugging
Donald Sharp [Mon, 31 Jul 2017 21:16:54 +0000 (17:16 -0400)]
pimd: Clean up mroute_add_vif debugging

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Convert to using a RB tree for the pim_ifp ifchannel_list
Donald Sharp [Mon, 31 Jul 2017 16:44:20 +0000 (12:44 -0400)]
pimd: Convert to using a RB tree for the pim_ifp ifchannel_list

This patch does two things:
1) Converts the pim_ifp->ifchannel_list to a pim_ifp->ifchannel_rb
2) Removes the hashing to use the RB RB_FIND instead.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Rename pim_ifp->pim_ifchannel_list
Donald Sharp [Mon, 31 Jul 2017 14:41:12 +0000 (10:41 -0400)]
pimd: Rename pim_ifp->pim_ifchannel_list

Remove the redundant information in pim_ifp->pim_ifchannel_list
just call it pim_ifp->ifchannel_list

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Remove almost duplicate pim->ifchannel_list
Donald Sharp [Mon, 31 Jul 2017 13:58:42 +0000 (09:58 -0400)]
pimd: Remove almost duplicate pim->ifchannel_list

The pim->ifchannel_list can be duplicated by iterating
over each vrf and then over each pim_ifp->pim_ifchannel_list
Since list handling is taking allot of time at scale
convert over to using this value.

Additionally clean up pim_cmd.c to have helper functions
to handle the actual encoding of data for output.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc/babeld: small documentation update
Renato Westphal [Wed, 2 Aug 2017 01:19:18 +0000 (22:19 -0300)]
doc/babeld: small documentation update

Fixes Issue #889.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agolib: fix build from git repository on OpenBSD
Renato Westphal [Wed, 2 Aug 2017 01:12:24 +0000 (22:12 -0300)]
lib: fix build from git repository on OpenBSD

The OpenBSD's cp(1) command doesn't support the -v option. This will
change in the next releases (starting from v6.2) but this patch fixes
the problem for v6.1 and older releases.

Fixes Issue #875.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoMerge pull request #886 from dwalton76/bgpd-vpn-multipath-zebra-update
David Lamparter [Wed, 2 Aug 2017 00:46:30 +0000 (02:46 +0200)]
Merge pull request #886 from dwalton76/bgpd-vpn-multipath-zebra-update

bgpd: multipath change for VRF route is not updated in zebra

6 years agoMerge pull request #887 from Jafaral/ospfvlfix
David Lamparter [Wed, 2 Aug 2017 00:45:54 +0000 (02:45 +0200)]
Merge pull request #887 from Jafaral/ospfvlfix

ospfd: Fix, don't run network unset commands on virtual links

6 years agoospfd: Fix, don't run network unset commands on virtual links
Jafar Al-Gharaibeh [Tue, 1 Aug 2017 18:47:02 +0000 (13:47 -0500)]
ospfd: Fix, don't run network unset commands on virtual links

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
6 years agobgpd: multipath change for VRF route is not updated in zebra
Daniel Walton [Tue, 1 Aug 2017 18:31:56 +0000 (18:31 +0000)]
bgpd: multipath change for VRF route is not updated in zebra

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
If you are doing multipath in a VRF and bounce one of the multipaths for
a prefix, bgp is not updating the zebra entry for that prefix with the
new multipaths. We start with:

cel-redxp-10# show bgp vrf RED  ipv4 unicast 6.0.0.16/32
BGP routing table entry for 6.0.0.16/32
Paths: (4 available, best #4, table RED)
  Advertised to non peer-group peers:
  spine-1(swp1) spine-2(swp2) spine-3(swp3) spine-4(swp4)
  104 65104 65002
    fe80::202:ff:fe00:2d from spine-4(swp4) (6.0.0.12)
    (fe80::202:ff:fe00:2d) (used)
      Origin incomplete, localpref 100, valid, external, multipath, bestpath-from-AS 104
      AddPath ID: RX 0, TX 21
      Last update: Tue Aug  1 18:28:33 2017

  102 65104 65002
    fe80::202:ff:fe00:25 from spine-2(swp2) (6.0.0.10)
    (fe80::202:ff:fe00:25) (used)
      Origin incomplete, localpref 100, valid, external, multipath, bestpath-from-AS 102
      AddPath ID: RX 0, TX 20
      Last update: Tue Aug  1 18:28:33 2017

  103 65104 65002
    fe80::202:ff:fe00:29 from spine-3(swp3) (6.0.0.11)
    (fe80::202:ff:fe00:29) (used)
      Origin incomplete, localpref 100, valid, external, multipath, bestpath-from-AS 103
      AddPath ID: RX 0, TX 17
      Last update: Tue Aug  1 18:28:33 2017

  101 65104 65002
    fe80::202:ff:fe00:21 from spine-1(swp1) (6.0.0.9)
    (fe80::202:ff:fe00:21) (used)
      Origin incomplete, localpref 100, valid, external, multipath, bestpath-from-AS 101, best
      AddPath ID: RX 0, TX 8
      Last update: Tue Aug  1 18:28:33 2017

cel-redxp-10#
cel-redxp-10# show ip route vrf RED 6.0.0.16/32
Routing entry for 6.0.0.16/32
  Known via "bgp", distance 20, metric 0, vrf RED, best
  Last update 00:00:25 ago
  * fe80::202:ff:fe00:21, via swp1
  * fe80::202:ff:fe00:25, via swp2
  * fe80::202:ff:fe00:29, via swp3
  * fe80::202:ff:fe00:2d, via swp4

cel-redxp-10#

And then on spine-1 we bounce all peers

spine-1# clear ip bgp *
spine-1#

On the leaf (cel-redxp-10) we remove the route from spine-1

cel-redxp-10# show ip route vrf RED 6.0.0.16/32
Routing entry for 6.0.0.16/32
  Known via "bgp", distance 20, metric 0, vrf RED, best
  Last update 00:00:01 ago
  * fe80::202:ff:fe00:25, via swp2
  * fe80::202:ff:fe00:29, via swp3
  * fe80::202:ff:fe00:2d, via swp4

cel-redxp-10#

So far so good. The problem is when the session to spine-1 comes back up
bgp will mark the flag from spine-1 as `multipath` but does not update
zebra. We end up in a state where BGP has 4 paths flags as multipath but
only 3 paths are in the RIB.

6 years agoMerge pull request #882 from opensourcerouting/safi-cleanup
Donald Sharp [Tue, 1 Aug 2017 18:21:26 +0000 (14:21 -0400)]
Merge pull request #882 from opensourcerouting/safi-cleanup

lib/bgpd: cleanup SAFI values

6 years agoMerge pull request #860 from opensourcerouting/non-recursive
Donald Sharp [Tue, 1 Aug 2017 15:33:43 +0000 (11:33 -0400)]
Merge pull request #860 from opensourcerouting/non-recursive

convert lib & zebra to non-recursive automake

6 years agoMerge pull request #884 from dwalton76/bgpd-peer-hash-limit
Russ White [Tue, 1 Aug 2017 12:04:23 +0000 (08:04 -0400)]
Merge pull request #884 from dwalton76/bgpd-peer-hash-limit

bgpd: peer hash expands until we are out of memory

6 years agoMerge pull request #839 from Orange-OpenSource/TE
Russ White [Tue, 1 Aug 2017 11:34:41 +0000 (07:34 -0400)]
Merge pull request #839 from Orange-OpenSource/TE

OSPF OPAQUE, TE and RI macro refactoring & cleanup

6 years agobuild: fix/improve clippy dependencies
David Lamparter [Mon, 31 Jul 2017 20:38:48 +0000 (22:38 +0200)]
build: fix/improve clippy dependencies

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agotests: fix small typo
Renato Westphal [Tue, 1 Aug 2017 00:01:34 +0000 (21:01 -0300)]
tests: fix small typo

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agobgpd: don't make any assumptions about the size of an enum
Renato Westphal [Tue, 1 Aug 2017 00:37:46 +0000 (21:37 -0300)]
bgpd: don't make any assumptions about the size of an enum

The size of an enum is compiler dependent and thus we shouldn't use
enums inside structures that represent fields of a packet.

Problem detected by the 'test_capability' unit test.

The problem was not apparent before because the 'iana_safi_t' enum didn't
exist and 'safi_t' was a typedef to uint8_t. Now we have two different
enums, 'iana_afi_t' and 'iana_safi_t', and both need to be encoded in
different ways on the wire (2 bytes vs 1 byte).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agolib: use switch statements in the AFI/SAFI conversion functions
Renato Westphal [Tue, 1 Aug 2017 00:22:20 +0000 (21:22 -0300)]
lib: use switch statements in the AFI/SAFI conversion functions

Switch statements are more elegant (and potentially faster... but that's
not the main motivation).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agolib/bgpd: introduce the iana_safi_t enum
Renato Westphal [Tue, 1 Aug 2017 00:06:40 +0000 (21:06 -0300)]
lib/bgpd: introduce the iana_safi_t enum

We had afi_t/iana_afi_t for AFIs but only safi_t for SAFIs. Fix this
inconsistency.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agolib: remove SAFI_RESERVED_4 and SAFI_RESERVED_5
Renato Westphal [Tue, 1 Aug 2017 00:09:01 +0000 (21:09 -0300)]
lib: remove SAFI_RESERVED_4 and SAFI_RESERVED_5

SAFI values have been a major source of confusion over the last few
years. That's because each SAFI needs to be represented in two different
ways:
* IANA's value used to send/receive packets over the network;
* Internal value used for array indexing.

In the second case, defining reserved values makes no sense because we
don't want to index SAFIs that simply don't exist. The sole purpose of
the internal SAFI values is to remove the gaps we have among the IANA
values, which would represent wasted memory in C arrays. With that said,
remove these reserved SAFIs to avoid further confusion in the future.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agobgpd: peer hash expands until we are out of memory
Daniel Walton [Mon, 31 Jul 2017 21:22:23 +0000 (21:22 +0000)]
bgpd: peer hash expands until we are out of memory

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
swpX peers all start out with the same sockunion so initially they all
go into the same hash bucket. Once IPv6 ND has worked its magic they
will have different sockunions and will go in different buckets...life
is good.

Until then though, we are in a phase where all swpX peers have the same
socknunion. Once we have HASH_THRESHOLD (10) swpX peers and call
hash_get for a new swpX peer the hash code calls hash_expand(). This
happens because there are more than HASH_THRESHOLD entries in a single
bucket so the logic is "expand the hash to spread things out"...in our
case expanding doesn't spread out the swpX peers because all of their
sockunions are the same.

I looked at having peer_hash_make and peer_hash_same consider the ifname
of the swpX peer but that is a large change that we don't want to make
at the moment. So the fix is to put a cap on how large we are
willing to let the hash table get. By default there is no limit but if
max_size is set we will not allow the hash to expand above that.

6 years agobuild: non-recursive auxiliary directories
David Lamparter [Mon, 31 Jul 2017 20:05:56 +0000 (22:05 +0200)]
build: non-recursive auxiliary directories

Flatten {m4,pkgsrc,python,redhat,snapcraft}/Makefile.am into the main
one.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoprotobuf: fix build
David Lamparter [Fri, 28 Jul 2017 12:42:13 +0000 (14:42 +0200)]
protobuf: fix build

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobuild: non-recursive qpb & fpm
David Lamparter [Fri, 28 Jul 2017 12:40:39 +0000 (14:40 +0200)]
build: non-recursive qpb & fpm

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobuild: zebra: remove *_method Makefile hacks
David Lamparter [Wed, 26 Jul 2017 17:49:15 +0000 (19:49 +0200)]
build: zebra: remove *_method Makefile hacks

replace with preprocessor checks in source files.  Much simpler...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobuild: convert zebra/ to non-recursive build
David Lamparter [Sat, 22 Jul 2017 17:01:46 +0000 (19:01 +0200)]
build: convert zebra/ to non-recursive build

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobuild: convert lib/ to non-recursive build
David Lamparter [Wed, 24 May 2017 15:48:12 +0000 (17:48 +0200)]
build: convert lib/ to non-recursive build

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge pull request #881 from donaldsharp/ping_traceroute
David Lamparter [Mon, 31 Jul 2017 18:06:57 +0000 (20:06 +0200)]
Merge pull request #881 from donaldsharp/ping_traceroute

vtysh: Fix shell executed commands

6 years agoMerge pull request #873 from donaldsharp/ospf6_strings
David Lamparter [Mon, 31 Jul 2017 18:06:06 +0000 (20:06 +0200)]
Merge pull request #873 from donaldsharp/ospf6_strings

ospf6d: New version of GCC with new warnings

6 years agoMerge pull request #865 from qlyoung/find
David Lamparter [Mon, 31 Jul 2017 17:58:20 +0000 (19:58 +0200)]
Merge pull request #865 from qlyoung/find

Find

6 years agoMerge pull request #850 from opensourcerouting/ldpd-cli
Quentin Young [Mon, 31 Jul 2017 17:24:17 +0000 (13:24 -0400)]
Merge pull request #850 from opensourcerouting/ldpd-cli

ldpd: CLI fixes + use DEFPY

6 years agoCorrect build TLV functions
Olivier Dugeon [Mon, 31 Jul 2017 16:03:00 +0000 (18:03 +0200)]
Correct build TLV functions

 * Functions that build TLVs in ospf_te.c and ospf_te.c use 'tlvh + 1'
to move the pointer to the TLV payload ifor strem_put().
 * Correct this by using TLV_DATA() macro which is saffer.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agolib: s/leychain/keychain
Quentin Young [Mon, 31 Jul 2017 15:03:32 +0000 (11:03 -0400)]
lib: s/leychain/keychain

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #874 from opensourcerouting/zebra-static-rework
Quentin Young [Mon, 31 Jul 2017 14:53:39 +0000 (10:53 -0400)]
Merge pull request #874 from opensourcerouting/zebra-static-rework

zebra: make static routes great again

6 years agoCorrect code style as requested by review of PR839
Olivier Dugeon [Mon, 31 Jul 2017 14:39:00 +0000 (16:39 +0200)]
Correct code style as requested by review of PR839

 * As per https://github.com/torvalds/linux/blob/master/scripts/checkpatch.pl
script result, remove extra white space and add TAB when necessary

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agovtysh: Fix shell executed commands
Donald Sharp [Mon, 31 Jul 2017 12:52:10 +0000 (08:52 -0400)]
vtysh: Fix shell executed commands

Pretty much all shell executed commands from vtysh were
not behaving correctly due to errors introduced in
switching to the new cli.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoldpd: update .gitignore
Renato Westphal [Wed, 26 Jul 2017 01:39:05 +0000 (22:39 -0300)]
ldpd: update .gitignore

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoldpd: silence coverity scan warning
Renato Westphal [Wed, 26 Jul 2017 01:36:00 +0000 (22:36 -0300)]
ldpd: silence coverity scan warning

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoldpd: add auto-complete for l2vpns
Renato Westphal [Tue, 25 Jul 2017 03:20:56 +0000 (00:20 -0300)]
ldpd: add auto-complete for l2vpns

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoldpd: convert CLI code to use DEFPY
Renato Westphal [Tue, 25 Jul 2017 00:45:33 +0000 (21:45 -0300)]
ldpd: convert CLI code to use DEFPY

Yay :)

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoldpd: restore correct defaults on "no discovery ... interval"
Renato Westphal [Tue, 25 Jul 2017 00:39:55 +0000 (21:39 -0300)]
ldpd: restore correct defaults on "no discovery ... interval"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoldpd: fix missing "no" commands in vtysh
Renato Westphal [Mon, 24 Jul 2017 23:22:17 +0000 (20:22 -0300)]
ldpd: fix missing "no" commands in vtysh

Split the "no" version of some commands into a different DEFUN so that
DEFUN_NOSH doesn't apply to them.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoldpd: fix segfault in "clear mpls ldp neighbor [addr]"
Renato Westphal [Mon, 24 Jul 2017 22:48:08 +0000 (19:48 -0300)]
ldpd: fix segfault in "clear mpls ldp neighbor [addr]"

Bug introduced by the CLI refactoring (c740f7d3678).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoMerge pull request #856 from opensourcerouting/cli-fuzzer-fixes
Quentin Young [Fri, 28 Jul 2017 23:39:15 +0000 (19:39 -0400)]
Merge pull request #856 from opensourcerouting/cli-fuzzer-fixes

bgpd/eigrpd: fix crashes found by the CLI fuzzer

6 years agopimd: fix `show ip msdp...` NPD when vrf unknown
Quentin Young [Wed, 19 Jul 2017 19:02:35 +0000 (15:02 -0400)]
pimd: fix `show ip msdp...` NPD when vrf unknown

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #866 from opensourcerouting/ldpd-config-issues
Daniel Walton [Fri, 28 Jul 2017 12:11:07 +0000 (08:11 -0400)]
Merge pull request #866 from opensourcerouting/ldpd-config-issues

LDP config issues (Issue #858)

6 years agopimd: Fix msdp cleanup issues
Donald Sharp [Fri, 14 Jul 2017 17:16:45 +0000 (13:16 -0400)]
pimd: Fix msdp cleanup issues

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Allow the keepalive time to be per vrf.
Donald Sharp [Thu, 13 Jul 2017 01:16:00 +0000 (21:16 -0400)]
pimd: Allow the keepalive time to be per vrf.

Allow the keepalive period to be per vrf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: use DEFPY for static routes
Renato Westphal [Fri, 28 Jul 2017 00:27:56 +0000 (21:27 -0300)]
zebra: use DEFPY for static routes

Now we have a single command for IPv4 static routes and another one for
IPv6 static routes (+ one command for IPv4 multicast static routes).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agozebra: unify the ipv4/ipv6 static route functions
Renato Westphal [Thu, 27 Jul 2017 22:58:45 +0000 (19:58 -0300)]
zebra: unify the ipv4/ipv6 static route functions

Addresses Issue #655.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agozebra: allow fully specified static ipv4 routes
Renato Westphal [Thu, 27 Jul 2017 21:57:37 +0000 (18:57 -0300)]
zebra: allow fully specified static ipv4 routes

Fully specified routes are useful when you need to ensure that the
nexthop address is reachable through the specified interface.

Addresses Issue #641.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agozebra: refactor zebra_static_ipv4() and static_ipv6_func()
Renato Westphal [Thu, 27 Jul 2017 18:52:52 +0000 (15:52 -0300)]
zebra: refactor zebra_static_ipv4() and static_ipv6_func()

This is a preliminary step to join both functions into one later.

The main idea here is to make these functions have separate arguments
for the nexthop address and the nexthop interface, and adjust the call
sites appropriately. Having an argument that could be a nexthop address
OR a nexthop interface was making the code very hard to follow. With
this simplification, a lot of code duplication was removed and now both
functions look very similar.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agozebra: accept static v6 routes with non-existent nexthop interfaces
Renato Westphal [Thu, 27 Jul 2017 21:01:12 +0000 (18:01 -0300)]
zebra: accept static v6 routes with non-existent nexthop interfaces

We don't need to enforce that the interface exists because the route can
be activated later once the interface becomes available. We already do
this for IPv4 routes and IPv6 routes with both a nexthop address and a
nexthop interface.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agozebra: remove redundant DEFUNs for labeled static routes
Renato Westphal [Thu, 27 Jul 2017 15:16:41 +0000 (12:16 -0300)]
zebra: remove redundant DEFUNs for labeled static routes

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoMerge pull request #857 from devicenull/master
Donald Sharp [Fri, 28 Jul 2017 00:46:22 +0000 (20:46 -0400)]
Merge pull request #857 from devicenull/master

redhat: Make the init script flush routes for all associated protocols

6 years agozebra: remove weird blackhole/reject ipv6 static routes
Renato Westphal [Thu, 27 Jul 2017 14:05:15 +0000 (11:05 -0300)]
zebra: remove weird blackhole/reject ipv6 static routes

This is the v6 counterpart of commit 74d263466b9.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agozebra: use curly braces for optional arguments of static routes
Renato Westphal [Thu, 27 Jul 2017 13:44:55 +0000 (10:44 -0300)]
zebra: use curly braces for optional arguments of static routes

This way the optional arguments can be provided in any order.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoospf6d: New version of GCC with new warnings
Donald Sharp [Thu, 27 Jul 2017 22:19:31 +0000 (18:19 -0400)]
ospf6d: New version of GCC with new warnings

GCC 7.1.1 returned warnings about buffer sizes
not being big enough to handle the full string
that could be generated.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #861 from dwalton76/bgpd-attr-unchanged
Russ White [Thu, 27 Jul 2017 19:59:24 +0000 (15:59 -0400)]
Merge pull request #861 from dwalton76/bgpd-attr-unchanged

bgpd: attribute-unchanged issues with peer-groups

6 years agoMerge pull request #859 from donaldsharp/bgp_ll_global
Russ White [Thu, 27 Jul 2017 19:56:56 +0000 (15:56 -0400)]
Merge pull request #859 from donaldsharp/bgp_ll_global

Bgp -> Allow comparison of correct v6 nexthop

6 years agoMerge pull request #862 from dwalton76/bgpd-update-too-large
Russ White [Thu, 27 Jul 2017 19:56:06 +0000 (15:56 -0400)]
Merge pull request #862 from dwalton76/bgpd-update-too-large

bgpd: UPDATE may be larger than 4096 if addpath is used

6 years agoMerge pull request #863 from dwalton76/zebra-static-reject
Russ White [Thu, 27 Jul 2017 19:54:48 +0000 (15:54 -0400)]
Merge pull request #863 from dwalton76/zebra-static-reject

zebra: static route cleanup

6 years agoMerge pull request #864 from dwalton76/zebra-debug-packet-detail
Russ White [Thu, 27 Jul 2017 19:54:16 +0000 (15:54 -0400)]
Merge pull request #864 from dwalton76/zebra-debug-packet-detail

Zebra debug packet detail

6 years agoMerge pull request #869 from donaldsharp/hash_a_roni
Russ White [Thu, 27 Jul 2017 19:47:48 +0000 (15:47 -0400)]
Merge pull request #869 from donaldsharp/hash_a_roni

lib: Remove expansion of hash table

6 years agolib: correct some node name typos
Quentin Young [Thu, 27 Jul 2017 19:03:31 +0000 (15:03 -0400)]
lib: correct some node name typos

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #868 from LabNConsulting/working/master/patch-set/rfapi-lib+
Donald Sharp [Thu, 27 Jul 2017 18:02:00 +0000 (14:02 -0400)]
Merge pull request #868 from LabNConsulting/working/master/patch-set/rfapi-lib+

Restore rfapi and encap attribute, broken by some recent changes

6 years agobgpd rfapi: use afi_t
Lou Berger [Thu, 27 Jul 2017 17:06:49 +0000 (13:06 -0400)]
bgpd rfapi: use afi_t

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agobgpd rfapi: fix breakage introduced in refactoring
Lou Berger [Thu, 27 Jul 2017 15:01:36 +0000 (11:01 -0400)]
bgpd rfapi: fix breakage introduced in refactoring

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agolib: Remove expansion of hash table
Donald Sharp [Thu, 27 Jul 2017 15:08:40 +0000 (11:08 -0400)]
lib: Remove expansion of hash table

The hash code has the idea of stopping expanding
the hash table when certain criteria are set.
With the recent addition of `show hashtable`
we can now see that when we have a full internet
feed we've stopped expanding the table at 1k
buckets.  This results in some serious performance
issues at scale.

Since we now have the ability to see the statistics
on a hash table, let's allow it to expand.  Doing
so on a full feed showed this:

before:
   Hash table          |  Buckets   Entries   Empty   LF        SD      FLF       SD
 ----------------------+----------------------------------------------------------------
   route table hash    |  1024      1187579   0%      1159.75   34.06   1159.75   35.08
   route table hash    |  32768     76208     10%     2.33      2.80    2.58      4.03
   route table hash    |  1024      1187572   0%      1159.74   34.06   1159.74   35.08
   route table hash    |  2048      76205     0%      37.21     6.13    37.21     7.29

Showing hash table statistics for BGP
-------------------------------------

   Hash table         |  Buckets   Entries   Empty   LF       SD      FLF      SD
 ---------------------+--------------------------------------------------------------
   BGP Attributes     |  131072    251229    15%     1.92     2.48    2.25     3.33
   route table hash   |  4096      1187572   0%      289.93   17.03   289.93   17.87
   route table hash   |  32768     76205     10%     2.33     2.90    2.58     4.21

After:

   Hash table          |  Buckets   Entries   Empty   LF     SD     FLF    SD
 ----------------------+--------------------------------------------------------
   route table hash    |  1048576   1187349   32%     1.13   2.57   1.67   3.16
   route table hash    |  32768     76195     10%     2.33   2.81   2.58   4.03
   route table hash    |  1048576   1187342   32%     1.13   2.58   1.67   3.16
   route table hash    |  32768     76192     10%     2.33   2.68   2.58   3.81

Showing hash table statistics for BGP
-------------------------------------

   Hash table         |  Buckets   Entries   Empty   LF     SD     FLF    SD
 ---------------------+--------------------------------------------------------
   BGP Attributes     |  131072    251222    15%     1.92   2.64   2.25   3.58
   route table hash   |  1048576   1187342   32%     1.13   2.52   1.67   3.07
   route table hash   |  32768     76192     10%     2.33   2.86   2.58   4.12

We should see some significant performance improvements across the board
for full feeds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgp rfapi: use route_table_init and _finish (fixes crash due to recent lib change)
Lou Berger [Thu, 27 Jul 2017 14:05:48 +0000 (10:05 -0400)]
bgp rfapi: use route_table_init and _finish (fixes crash due to recent lib change)

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agoUpdate PR #839 following review
Olivier Dugeon [Thu, 27 Jul 2017 14:09:00 +0000 (16:09 +0200)]
Update PR #839 following review

 * Remove enum status_t opcode in ospfd.h
 * Replace enum status_t opcode by bool enabled in ospf_te.[c,h] and ospf_ri.c
 * Add missign parenthesis '()' around 'if CHECK_FLAG' in ospf_te.c and ospf_ri.c

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agolib, vtysh: add `find COMMAND`
Quentin Young [Tue, 25 Jul 2017 18:20:55 +0000 (14:20 -0400)]
lib, vtysh: add `find COMMAND`

Substring search through all defined commands in all nodes.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agovtysh: fix markfile output for ldpd
Renato Westphal [Wed, 26 Jul 2017 22:37:49 +0000 (19:37 -0300)]
vtysh: fix markfile output for ldpd

Put the "end" marker in the right places. This should fix the
frr-reload.py script because it depends on the output of vtysh -m.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoldpd: add the exit-address-family command
Renato Westphal [Wed, 26 Jul 2017 22:32:55 +0000 (19:32 -0300)]
ldpd: add the exit-address-family command

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agolib: add CLI node names
Quentin Young [Tue, 25 Jul 2017 21:28:19 +0000 (17:28 -0400)]
lib: add CLI node names

Adds an array of descriptive names for each CLI node, plus a runtime
check to make sure folks don't forget to update it.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: Fix nexthop comparison for v6
Donald Sharp [Wed, 26 Jul 2017 13:41:36 +0000 (09:41 -0400)]
bgpd: Fix nexthop comparison for v6

When we have both a LL and a Global address,
use what the attribute wants for comparison
instead of assuming Global than LL.

This was causing BGP to install v6 routes
that used the LL as the nexthop, where
the global address was different and
being used as the basis for comparison.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Set the ifindex to DELETED after we notify zebra
Donald Sharp [Wed, 26 Jul 2017 13:57:35 +0000 (09:57 -0400)]
bgpd: Set the ifindex to DELETED after we notify zebra

The code path for a deleted interface was calling
zebra with a IFINDEX_DELETED, which caused zebra
to bitch and moan about the issue.  Since the
only thing this function does is call zebra
to deregister the RA stuff, don't set the
ifindex to DELETED till afterwords.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge branch 'master' of https://github.com/dwalton76/frr into zebra-debug-packet...
Daniel Walton [Wed, 26 Jul 2017 18:17:33 +0000 (18:17 +0000)]
Merge branch 'master' of https://github.com/dwalton76/frr into zebra-debug-packet-detail

Conflicts:
zebra/debug.c

6 years agobgpd: attribute-unchanged issues with peer-groups
Daniel Walton [Wed, 26 Jul 2017 17:49:20 +0000 (17:49 +0000)]
bgpd: attribute-unchanged issues with peer-groups

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
6 years agobgpd: UPDATE may be larger than 4096 if addpath is used
Daniel Walton [Wed, 26 Jul 2017 16:33:39 +0000 (16:33 +0000)]
bgpd: UPDATE may be larger than 4096 if addpath is used

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
6 years agoMerge pull request #842 from qlyoung/update-style-guide
David Lamparter [Wed, 26 Jul 2017 16:20:17 +0000 (18:20 +0200)]
Merge pull request #842 from qlyoung/update-style-guide

Update COMMUNITY.md

6 years agoredhat: Update documentation about frr-reload
Brian Rak [Wed, 26 Jul 2017 15:47:07 +0000 (11:47 -0400)]
redhat: Update documentation about frr-reload

6 years agobgpd/ospfd: fix json leaks and blank output
Renato Westphal [Wed, 26 Jul 2017 15:27:37 +0000 (12:27 -0300)]
bgpd/ospfd: fix json leaks and blank output

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agobabeld: remove redundant startup message
Renato Westphal [Wed, 26 Jul 2017 14:32:23 +0000 (11:32 -0300)]
babeld: remove redundant startup message

The frr_run() function already logs a startup message (and after reading
the config so the "log" commands are honored).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agobabel: fix crashes and improve the redistribute command
Renato Westphal [Wed, 26 Jul 2017 14:31:54 +0000 (11:31 -0300)]
babel: fix crashes and improve the redistribute command

Fixes the following crashes:
babeld aborted: vtysh -c "configure terminal" -c "router babel" -c "no redistribute pim"
babeld aborted: vtysh -c "configure terminal" -c "router babel" -c "no redistribute eigrp"
babeld aborted: vtysh -c "configure terminal" -c "router babel" -c "no redistribute nhrp"
babeld aborted: vtysh -c "configure terminal" -c "router babel" -c "no redistribute table"
babeld aborted: vtysh -c "configure terminal" -c "router babel" -c "no redistribute vnc"
babeld aborted: vtysh -c "configure terminal" -c "router babel" -c "redistribute pim"
babeld aborted: vtysh -c "configure terminal" -c "router babel" -c "redistribute eigrp"
babeld aborted: vtysh -c "configure terminal" -c "router babel" -c "redistribute nhrp"
babeld aborted: vtysh -c "configure terminal" -c "router babel" -c "redistribute table"
babeld aborted: vtysh -c "configure terminal" -c "router babel" -c "redistribute vnc"

While here, add an option to chose if we want to redistribute IPv4 or
IPv6 routes (e.g. we might want static IPv4 routes only). Also, join the
"no" version of the command in the same DEFUN (Yes We Can).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoeigrpd: minor fix in the redistribute command
Renato Westphal [Wed, 26 Jul 2017 14:30:56 +0000 (11:30 -0300)]
eigrpd: minor fix in the redistribute command

Commands like "redistribute stati" and "redistribute osp" were being
silently ignored.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agozebra: static route cleanup
Daniel Walton [Tue, 25 Jul 2017 20:24:45 +0000 (13:24 -0700)]
zebra: static route cleanup

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
- The 'reject' keyword was being lost
- Hide the "ip route A.B.C.D A.B.C.D" config options since these will be
  displayed as "ip route A.B.C.D/X"

6 years agoCOMMUNITY.md: rewrap paragraphs, update PR section
Quentin Young [Tue, 25 Jul 2017 19:53:05 +0000 (15:53 -0400)]
COMMUNITY.md: rewrap paragraphs, update PR section

* Wrap paragraphs at 80 lines
* Update Github PR section to remove mention of develop branch

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoredhat: Make the init script flush routes for all associated protocols on stop
Brian Rak [Tue, 25 Jul 2017 19:48:02 +0000 (15:48 -0400)]
redhat: Make the init script flush routes for all associated protocols on stop

6 years agoCOMMUNITY.md: minor grammatical fixes
Quentin Young [Tue, 25 Jul 2017 19:39:05 +0000 (15:39 -0400)]
COMMUNITY.md: minor grammatical fixes

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoCOMMUNITY.md: document documentation
Quentin Young [Tue, 25 Jul 2017 19:34:41 +0000 (15:34 -0400)]
COMMUNITY.md: document documentation

Add guidelines for documentation to COMMUNITY.md

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoCOMMUNITY.md: miscellaneous documentation
Quentin Young [Fri, 21 Jul 2017 16:50:59 +0000 (12:50 -0400)]
COMMUNITY.md: miscellaneous documentation

Also:
- Add documentation on mailing list
- Update mentions of unit tests
- Update process description

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoCOMMUNITY.md: s/PROJECT/FRRouting
Quentin Young [Fri, 21 Jul 2017 16:12:52 +0000 (12:12 -0400)]
COMMUNITY.md: s/PROJECT/FRRouting

Also:
* Make headers consistently capitalized
* Some extra backticks where needed

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoCOMMUNITY.md: update style guide
Quentin Young [Fri, 21 Jul 2017 15:33:38 +0000 (11:33 -0400)]
COMMUNITY.md: update style guide

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agozebra: debug cleanup
Daniel Walton [Tue, 25 Jul 2017 19:07:07 +0000 (12:07 -0700)]
zebra: debug cleanup

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>