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

fixup static routes' ifindexes when interfaces (dis)appear

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

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

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

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

The defines:

ONE_DAY_SECOND
ONE_WEEK_SECOND
ONE_YEAR_SECOND

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

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

ospfd: deprecate `timers lsa arrival ...`

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

rhel: Don't obsolete bird

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

ldpd: use NO_STR

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

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

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

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

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

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

pimd: some pim cli fixes

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

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

Eigrp various

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

Pimble

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

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

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

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

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

vtysh: add missing \n on warning message

6 years agozebra: vrf: remove VRF-move static route updating
David Lamparter [Sun, 6 Aug 2017 05:50:18 +0000 (07:50 +0200)]
zebra: vrf: remove VRF-move static route updating

This was incorrectly implemented to begin with (it only re-added routes,
but didn't remove them) and is now covered in static_ifindex_update.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agozebra: static: update on ifindex changes
David Lamparter [Sun, 6 Aug 2017 03:14:39 +0000 (05:14 +0200)]
zebra: static: update on ifindex changes

Whenever an interface is created or deleted in the system, we need to
check whether we have static routes referencing that interface by name.
If so, we need to [un]install these routes.

This has the unfortunate side effect of making static routes with
non-existent interfaces disappear from "show ip route", but I think
that's acceptable (and I don't see a "good" fix for that).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agozebra: static: rename IFINDEX -> IFNAME
David Lamparter [Sun, 6 Aug 2017 02:32:55 +0000 (04:32 +0200)]
zebra: static: rename IFINDEX -> IFNAME

Static routes are really held by ifname, not ifindex.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agovtysh: add missing \n on warning message
David Lamparter [Sun, 6 Aug 2017 02:17:13 +0000 (04:17 +0200)]
vtysh: add missing \n on warning message

Oops, missed this in review.

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

Fix Multi-Instance OSPF configurations CLIs

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

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

Fix Crash and Convert to ETH_ALEN

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

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

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

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

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

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

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

argv_find when it finds a match, returns 1 not 0

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

bgpd: remove bogus change in attrhash_key_make()

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

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

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

lib: vty: fix config-write fd leak

6 years agoMerge pull request #907 from opensourcerouting/vty-close-3.0
Russ White [Fri, 4 Aug 2017 17:14:18 +0000 (13:14 -0400)]
Merge pull request #907 from opensourcerouting/vty-close-3.0

[3.0] lib: vty: fix config-write fd leak

6 years agoMerge pull request #867 from jbonor/fixes
Donald Sharp [Fri, 4 Aug 2017 16:57:35 +0000 (12:57 -0400)]
Merge pull request #867 from jbonor/fixes

Assorted fixes

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

lib: remove last powl()

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

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

isisd: don't validate dict integrity for regular builds

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

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

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

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

bgpd: Fix safi_t confusion wition iana_safi_t

6 years agoisisd: don't validate dict integrity for regular builds
Christian Franke [Fri, 4 Aug 2017 13:44:45 +0000 (15:44 +0200)]
isisd: don't validate dict integrity for regular builds

This method is intended to be only used for debugging as per the author
and profiling shows we are spending a lot of cycles on it. Remove it for
regular builds by guarding it with a define.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoisisd: Convert to using prefix.h ETH_ALEN
Donald Sharp [Thu, 3 Aug 2017 12:46:00 +0000 (08:46 -0400)]
isisd: Convert to using prefix.h ETH_ALEN

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

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

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

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

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

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

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

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

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

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

IS-IS: improve spf performance

6 years agobgpd: Fix safi_t confusion wition iana_safi_t
Donald Sharp [Fri, 4 Aug 2017 11:45:44 +0000 (07:45 -0400)]
bgpd: Fix safi_t confusion wition iana_safi_t

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: vty: fix config-write fd leak
David Lamparter [Fri, 4 Aug 2017 10:05:38 +0000 (12:05 +0200)]
lib: vty: fix config-write fd leak

Since we were only setting vty->wfd in config_write, vty->fd would
remain 0 and vty_close() wouldn't close vty->wfd.

Clean up the entire fd closing and make it more explicit.  We were even
trying to write to stdin...

[master commit: 10b8a9c]
Reported-by: Jorge Boncompte <jbonor@gmail.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agolib: vty: fix config-write fd leak
David Lamparter [Fri, 4 Aug 2017 10:05:38 +0000 (12:05 +0200)]
lib: vty: fix config-write fd leak

Since we were only setting vty->wfd in config_write, vty->fd would
remain 0 and vty_close() wouldn't close vty->wfd.

Clean up the entire fd closing and make it more explicit.  We were even
trying to write to stdin...

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

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

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

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

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

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

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
6 years agozebra: cleanup, use RIB_SYSTEM_ROUTE() define where appropiate
Jorge Boncompte [Thu, 27 Jul 2017 10:34:10 +0000 (12:34 +0200)]
zebra: cleanup, use RIB_SYSTEM_ROUTE() define where appropiate

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
6 years agozebra: do not treat kernel routes as implicit withdraws
Jorge Boncompte [Thu, 27 Jul 2017 10:14:32 +0000 (12:14 +0200)]
zebra: do not treat kernel routes as implicit withdraws

Kernel does not send the best route after adding or deleting routes, if
we treat routes for an existing prefix as implicit withdraw the zebra RIB
goes out of sync with FIB and can announce wrong route to protocols.

host:~# vtysh -c 'show ip route'
S>* 0.0.0.0/0 [0/0] via 192.168.1.1, eth0
C>* 192.168.1.0/24 is directly connected, eth0

host:~# ip route add 192.0.2.0/24 via 192.168.1.101 metric 100
host:~# vtysh -c 'show ip route'
S>* 0.0.0.0/0 [0/0] via 192.168.1.1, eth0
K>* 192.0.2.0/24 via 192.168.1.101, eth0
C>* 192.168.1.0/24 is directly connected, eth0

host:~# ip route add 192.0.2.0/24 via 192.168.1.102 metric 50
host:~# vtysh -c 'show ip route'
S>* 0.0.0.0/0 [0/0] via 192.168.1.1, eth0
K>* 192.0.2.0/24 via 192.168.1.102, eth0
C>* 192.168.1.0/24 is directly connected, eth0

host:~# ip route del 192.0.2.0/24 via 192.168.1.102 metric 50
host:~# vtysh -c 'show ip route'
S>* 0.0.0.0/0 [0/0] via 192.168.1.1, eth0
C>* 192.168.1.0/24 is directly connected, eth0
host:~# ip route show 192.0.2.0/24
192.0.2.0/24 via 10.10.1.101 dev eth0 metric 100

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
6 years agozebra: hide netlink warning message
Jorge Boncompte [Tue, 25 Jul 2017 12:49:14 +0000 (14:49 +0200)]
zebra: hide netlink warning message

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
6 years agozebra: do not hide distance and metric for kernel routes
Jorge Boncompte [Tue, 25 Jul 2017 11:24:09 +0000 (13:24 +0200)]
zebra: do not hide distance and metric for kernel routes

There's no reason for not showing this information.

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
6 years agozebra: show nexthop MTU if available on detailed 'show ip route'
Jorge Boncompte [Tue, 25 Jul 2017 09:55:41 +0000 (11:55 +0200)]
zebra: show nexthop MTU if available on detailed 'show ip route'

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
6 years agozebra: copy MTU from non static routes into nexthop
Jorge Boncompte [Tue, 25 Jul 2017 10:26:13 +0000 (12:26 +0200)]
zebra: copy MTU from non static routes into nexthop

Some routing protocols advertise route MTU (e.g. NHRP), with this patch
installed routes in the kernel have the advertised MTU.

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
6 years agozebra: track and compare distance of recursive nexthops
Jorge Boncompte [Tue, 25 Jul 2017 10:17:50 +0000 (12:17 +0200)]
zebra: track and compare distance of recursive nexthops

Fixes routing loops when backup routes with recursive nexthops of other
protocols come and go.

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
6 years agozebra: add missing protocols names to source-protocol route-map match
Jorge Boncompte [Tue, 25 Jul 2017 10:06:31 +0000 (12:06 +0200)]
zebra: add missing protocols names to source-protocol route-map match

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
6 years agozebra: fix compilation in 32bit platform
Jorge Boncompte [Tue, 25 Jul 2017 09:46:01 +0000 (11:46 +0200)]
zebra: fix compilation in 32bit platform

RTA_PAYLOAD() return value depends on the platform bits.

make[5]: Nothing to be done for 'all-am'.
Making all in zebra
  CC       rt_netlink.o
../../zebra/rt_netlink.c: In function 'netlink_macfdb_change':
../../zebra/rt_netlink.c:1695:63: error: format '%ld' expects argument of type 'long int', but argument 7 has type 'unsigned int' [-Werror=format=]
    "%s family %s IF %s(%u) brIF %u - LLADDR is not MAC, len %ld",
                                                               ^
../../zebra/rt_netlink.c: In function 'netlink_ipneigh_change':
../../zebra/rt_netlink.c:2024:57: error: format '%ld' expects argument of type 'long int', but argument 6 has type 'unsigned int' [-Werror=format=]
      "%s family %s IF %s(%u) - LLADDR is not MAC, len %ld",
                                                         ^

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
6 years agowatchfrr: hide systemd message if not systemd available
Jorge Boncompte [Tue, 25 Jul 2017 10:10:17 +0000 (12:10 +0200)]
watchfrr: hide systemd message if not systemd available

Signed-off-by: Jorge Boncompte <jbonor@gmail.com>
6 years agoMerge pull request #891 from Jafaral/portability
David Lamparter [Fri, 4 Aug 2017 06:52:07 +0000 (08:52 +0200)]
Merge pull request #891 from Jafaral/portability

Portability configurations

6 years agoMerge pull request #900 from qlyoung/apply-mask
David Lamparter [Fri, 4 Aug 2017 06:49:20 +0000 (08:49 +0200)]
Merge pull request #900 from qlyoung/apply-mask

lib: add missed apply_mask()

6 years agoMerge pull request #870 from chiragshah6/mdev
David Lamparter [Fri, 4 Aug 2017 06:46:38 +0000 (08:46 +0200)]
Merge pull request #870 from chiragshah6/mdev

Fix various memory leaks in OSPFd and OSPF6d

6 years agopimd: Fix crash on iface down due to secondary address list
Donald Sharp [Thu, 3 Aug 2017 22:05:47 +0000 (18:05 -0400)]
pimd: Fix crash on iface down due to secondary address list

The secondary address list was being added/removed as
we went.  I see no reason to have special bookkeeping
for this list.  Just add it on interface startup and
then remove it on deletion.  Removes some
very specialized coding that was saving a very small
amount of space.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Lookup S,G ifchannel after we create it
Donald Sharp [Thu, 3 Aug 2017 14:56:30 +0000 (10:56 -0400)]
pimd: Lookup S,G ifchannel after we create it

There are situations where we receive a *,G with
a S,G,RPT Prune embedded where we do not actually
have any S,G yet(MSDP with multiple RP's with the
same address).  As such since we only need to
lookup the S,G ifchannel once, do it after
the recv_prune.

Ticket: CM-17230
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #901 from qlyoung/style-fix
ßingen [Thu, 3 Aug 2017 15:27:30 +0000 (17:27 +0200)]
Merge pull request #901 from qlyoung/style-fix

lib: minor style fix

6 years agolib: minor style fixes
Quentin Young [Thu, 3 Aug 2017 15:19:48 +0000 (11:19 -0400)]
lib: minor style fixes

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #897 from donaldsharp/pim_memory_leak
Jafar Al-Gharaibeh [Thu, 3 Aug 2017 15:23:55 +0000 (10:23 -0500)]
Merge pull request #897 from donaldsharp/pim_memory_leak

pimd: Squash some more memory leaks

6 years agolib: add missed apply_mask()
Quentin Young [Thu, 3 Aug 2017 14:57:31 +0000 (10:57 -0400)]
lib: add missed apply_mask()

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoisisd: Use a hashtable to speed up lookups during SPF
Christian Franke [Thu, 3 Aug 2017 12:30:32 +0000 (14:30 +0200)]
isisd: Use a hashtable to speed up lookups during SPF

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agolib: Reformat comment so my eyes don't fall out while reading it
Christian Franke [Thu, 3 Aug 2017 12:30:01 +0000 (14:30 +0200)]
lib: Reformat comment so my eyes don't fall out while reading it

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agolib: move prefix hash key to prefix.c to allow global use
Christian Franke [Thu, 3 Aug 2017 11:37:38 +0000 (13:37 +0200)]
lib: move prefix hash key to prefix.c to allow global use

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoMerge pull request #854 from opensourcerouting/isis-parser
Donald Sharp [Thu, 3 Aug 2017 10:46:00 +0000 (06:46 -0400)]
Merge pull request #854 from opensourcerouting/isis-parser

IS-IS: rewrite TLV deserializer/serializer

6 years agoisisd: make isis_spftree non-public
Christian Franke [Thu, 3 Aug 2017 09:45:58 +0000 (11:45 +0200)]
isisd: make isis_spftree non-public

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoisisd: purge LSP correctly on confusion
Christian Franke [Sun, 30 Jul 2017 17:49:19 +0000 (19:49 +0200)]
isisd: purge LSP correctly on confusion

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoisisd: only process overload info from fragment #0
Christian Franke [Sun, 30 Jul 2017 17:27:25 +0000 (19:27 +0200)]
isisd: only process overload info from fragment #0

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoisisd: Limit number of addresses in IPv4 addr TLV to 63
Christian Franke [Sun, 30 Jul 2017 17:03:57 +0000 (19:03 +0200)]
isisd: Limit number of addresses in IPv4 addr TLV to 63

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoisisd: rework complete, move "tlvs2" to "tlvs"
Christian Franke [Sun, 23 Jul 2017 13:06:09 +0000 (15:06 +0200)]
isisd: rework complete, move "tlvs2" to "tlvs"

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoisisd: send/receive LSPs with new parser
Christian Franke [Wed, 5 Jul 2017 16:37:36 +0000 (18:37 +0200)]
isisd: send/receive LSPs with new parser

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoisisd: send/receive *SNPs with new parser
Christian Franke [Fri, 23 Jun 2017 16:47:57 +0000 (18:47 +0200)]
isisd: send/receive *SNPs with new parser

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoisisd: send/receive IIHs with new parser
Christian Franke [Wed, 21 Jun 2017 13:21:00 +0000 (15:21 +0200)]
isisd: send/receive IIHs with new parser

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoisisd: Don't use structs to encode/decode PDU header
Christian Franke [Mon, 12 Jun 2017 12:31:40 +0000 (14:31 +0200)]
isisd: Don't use structs to encode/decode PDU header

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoisisd: add new tlv parser
Christian Franke [Mon, 8 May 2017 11:02:55 +0000 (13:02 +0200)]
isisd: add new tlv parser

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoisisd: add formatter code
Christian Franke [Sat, 22 Jul 2017 11:57:05 +0000 (13:57 +0200)]
isisd: add formatter code

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agolib: add sbuf
Christian Franke [Mon, 8 May 2017 11:18:21 +0000 (13:18 +0200)]
lib: add sbuf

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agozebra: Missing break statement causes crash in zebra
Donald Sharp [Mon, 19 Jun 2017 22:24:24 +0000 (18:24 -0400)]
zebra: Missing break statement causes crash in zebra

Zebra receiving a macip_del message will automatically call
into the set_master function( a pim function ).  Add missing
break statement

Ticket: CM-16841
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
6 years agopimd: Squash some more memory leaks
Donald Sharp [Wed, 2 Aug 2017 17:16:51 +0000 (13:16 -0400)]
pimd: Squash some more memory leaks

When a interface is flapped we were leaking some memory
associated with link lists.  Especially in the jp_agg
code.  If your network was/is stable and you are not
running at any scale you probably would not see this
as impactful at all.

Ticket: CM-16392
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #895 from qlyoung/flush-ready
Jafar Al-Gharaibeh [Wed, 2 Aug 2017 19:24:41 +0000 (14:24 -0500)]
Merge pull request #895 from qlyoung/flush-ready

lib: flush ready queue before poll() again

6 years agoMerge pull request #894 from donaldsharp/sockopt
Jafar Al-Gharaibeh [Wed, 2 Aug 2017 19:22:43 +0000 (14:22 -0500)]
Merge pull request #894 from donaldsharp/sockopt

lib: Remove sockopt_cork functionality

6 years agoMerge pull request #797 from donaldsharp/PIM_VRF
Jafar Al-Gharaibeh [Wed, 2 Aug 2017 19:20:33 +0000 (14:20 -0500)]
Merge pull request #797 from donaldsharp/PIM_VRF

Pim vrf

6 years agolib: flush ready queue before poll() again
Quentin Young [Wed, 2 Aug 2017 18:15:40 +0000 (14:15 -0400)]
lib: flush ready queue before poll() again

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agopimd: Clean back pointer upon deletion
Donald Sharp [Wed, 2 Aug 2017 16:10:50 +0000 (12:10 -0400)]
pimd: Clean back pointer upon deletion

The channel_oil has a back pointer(up) to the upstream data structure.
If we are planning on keeping the channel oil (due to ref count issues)
longer than keeping the upstream, when we delete the upstream we were
not clearing the back pointer to up.  This would result in a situation
where if that memory has started to be used again it will cause a
crash and other fun things.

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