]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agoBGP "allowas-in" should accept AS paths with "local-as"
Daniel Walton [Fri, 12 Jan 2018 15:31:16 +0000 (15:31 +0000)]
BGP "allowas-in" should accept AS paths with "local-as"

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
For issue #1548

6 years agoMerge pull request #1599 from chiragshah6/mdev
Jafar Al-Gharaibeh [Mon, 8 Jan 2018 17:36:45 +0000 (11:36 -0600)]
Merge pull request #1599 from chiragshah6/mdev

ospfd: Fix no passive interface command parsing

6 years agoMerge pull request #1588 from donaldsharp/msdp_return
Jafar Al-Gharaibeh [Mon, 8 Jan 2018 17:34:36 +0000 (11:34 -0600)]
Merge pull request #1588 from donaldsharp/msdp_return

pimd: Add finer grain return codes for configuration

6 years agoMerge pull request #1590 from chiragshah6/pim_dev
Jafar Al-Gharaibeh [Mon, 8 Jan 2018 17:25:06 +0000 (11:25 -0600)]
Merge pull request #1590 from chiragshah6/pim_dev

lib: Fix no interface cmd vrf parsing

6 years agoospfd: Fix no passive interface command parsing
Chirag Shah [Sat, 6 Jan 2018 16:24:00 +0000 (08:24 -0800)]
ospfd: Fix no passive interface command parsing

Ticket: CM-19365

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoMerge pull request #1606 from bingen/lm_privs
Donald Sharp [Mon, 8 Jan 2018 12:44:02 +0000 (07:44 -0500)]
Merge pull request #1606 from bingen/lm_privs

ldpd: Add privs to label manager

6 years agoMerge pull request #1600 from donaldsharp/more_thread_yield
Lou Berger [Sat, 6 Jan 2018 23:28:46 +0000 (18:28 -0500)]
Merge pull request #1600 from donaldsharp/more_thread_yield

More thread yield

6 years agobgpd: Ensure that io thread is running after start
Donald Sharp [Sat, 6 Jan 2018 19:04:35 +0000 (14:04 -0500)]
bgpd: Ensure that io thread is running after start

The BGP IO thread must be running before other threads
can start using it.  So at startup check to see
that it running once, instead of before every
function call into.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Add pthread_yield
Donald Sharp [Sat, 6 Jan 2018 16:48:11 +0000 (11:48 -0500)]
lib: Add pthread_yield

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1595 from dwiesner/pmsi-tunnel
Donald Sharp [Fri, 5 Jan 2018 19:08:29 +0000 (14:08 -0500)]
Merge pull request #1595 from dwiesner/pmsi-tunnel

bgpd: add PMSI_TUNNEL_ATTRIBUTE to EVPN IMET routes

6 years agoldpd: Add privs to label manager
ßingen [Mon, 13 Nov 2017 20:41:58 +0000 (21:41 +0100)]
ldpd: Add privs to label manager

Signed-off-by: ßingen <bingen@voltanet.io>
6 years agoMerge pull request #1594 from donaldsharp/32_bit_fuckery
Philippe Guibert [Thu, 4 Jan 2018 13:34:51 +0000 (14:34 +0100)]
Merge pull request #1594 from donaldsharp/32_bit_fuckery

bgpd: fix failing to compile on 32 bit systems

6 years agobgpd: add PMSI_TUNNEL_ATTRIBUTE to EVPN IMET routes
Dario Wiesner [Thu, 4 Jan 2018 11:34:24 +0000 (12:34 +0100)]
bgpd: add PMSI_TUNNEL_ATTRIBUTE to EVPN IMET routes

Signed-off-by: Dario Wiesner <dario.wiesner@gmail.com>
6 years agobgpd: fix failing to compile on 32 bit systems
Donald Sharp [Thu, 4 Jan 2018 10:45:28 +0000 (05:45 -0500)]
bgpd: fix failing to compile on 32 bit systems

-Werror=sign-compare is failing with signed/unsigned usage
in the conditional expression.

Fixes: #1593
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1592 from lihongguang/master
Donald Sharp [Thu, 4 Jan 2018 00:45:46 +0000 (19:45 -0500)]
Merge pull request #1592 from lihongguang/master

ospfd: fix [no] area authentication command

6 years agoospfd: fix [no] area authentication command
lihongguang [Wed, 3 Jan 2018 23:01:58 +0000 (07:01 +0800)]
ospfd: fix [no] area authentication command

Signed-off-by: lihongguang lhg803@163.com
6 years agolib: Fix no interface cmd vrf parsing
Chirag Shah [Wed, 3 Jan 2018 19:41:45 +0000 (11:41 -0800)]
lib: Fix no interface cmd vrf parsing

For no interface <ifname> vrf VRFNAME,
vrf-name is not parsed properly.

Ticket:CM-19274

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoMerge pull request #1589 from lihongguang/master
Donald Sharp [Wed, 3 Jan 2018 16:12:34 +0000 (11:12 -0500)]
Merge pull request #1589 from lihongguang/master

ospfd: return non-zero for configuration failures

6 years agoospfd: return non-zero for configuration failures
lihongguang [Wed, 3 Jan 2018 14:47:28 +0000 (22:47 +0800)]
ospfd: return non-zero for configuration failures

Signed-off-by: lihongguang <lhg803@163.com>
6 years agopimd: Add finer grain return codes for configuration
Donald Sharp [Wed, 3 Jan 2018 14:06:44 +0000 (09:06 -0500)]
pimd: Add finer grain return codes for configuration

When PIM handles some MSDP commands, a repeated command
was causing a CMD_WARNING_CONFIG_FAILED.  This should
be a CMD_WARNING.  Fix the code to allow vtysh to handle
this appropriately.

Ticket: CM-19053
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1584 from donaldsharp/1575_fix
Russ White [Tue, 2 Jan 2018 16:32:09 +0000 (11:32 -0500)]
Merge pull request #1584 from donaldsharp/1575_fix

zebra: Fix dest dereference

6 years agoMerge pull request #1569 from qlyoung/ringbuf
Russ White [Tue, 2 Jan 2018 14:21:37 +0000 (09:21 -0500)]
Merge pull request #1569 from qlyoung/ringbuf

lib: add ring buffer

6 years agozebra: Fix dest dereference
Donald Sharp [Tue, 2 Jan 2018 14:09:09 +0000 (09:09 -0500)]
zebra: Fix dest dereference

The rn can not have an rn->info pointer and as
such the dest may be NULL.  Don't assign
the old_fib pointer if so.  This is ok
because we know RNODE_FOREACH... will not
iterate if dest is NULL.

Fixes: #1575
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1572 from dslicenc/bgpd-network-defpy-cm16860
Russ White [Tue, 2 Jan 2018 14:02:44 +0000 (09:02 -0500)]
Merge pull request #1572 from dslicenc/bgpd-network-defpy-cm16860

bgpd: convert network statements from DEFUN to DEFPY

6 years agoMerge pull request #1580 from chiragshah6/mdev
Russ White [Tue, 2 Jan 2018 13:55:28 +0000 (08:55 -0500)]
Merge pull request #1580 from chiragshah6/mdev

ospfd: Set filter to unbound debug logs

6 years agoMerge pull request #1582 from chiragshah6/mdev1
Russ White [Tue, 2 Jan 2018 13:26:33 +0000 (08:26 -0500)]
Merge pull request #1582 from chiragshah6/mdev1

ospf6d: Fix ospf6 redist with route-map

6 years agoMerge pull request #1583 from donaldsharp/1558-more
Russ White [Tue, 2 Jan 2018 13:22:06 +0000 (08:22 -0500)]
Merge pull request #1583 from donaldsharp/1558-more

debianpkg: fix indentation and variable name

6 years agodebianpkg: fix indentation and variable name
Raymond P. Burkholder [Sun, 17 Dec 2017 03:48:20 +0000 (23:48 -0400)]
debianpkg: fix indentation and variable name

Signed-off-by: Raymond P. Burkholder <github@oneunified.net>
6 years agoospf6d: Fix ospf6 redist with route-map
Chirag Shah [Thu, 28 Dec 2017 19:12:35 +0000 (11:12 -0800)]
ospf6d: Fix ospf6 redist with route-map

When ospf6 configure with redistribute connected/protocol
with route-map. Upon restart of frr.service, ospf6 receives
redistribute update then route-map update.
During redistribute route update, since route-map info is not
filled, route is suppressed from injected as external route.

Fix: reset redistribute when route-map update received
matches with redistribution (type) and route-map name.

Ticket:CM-13800
Testing Done:
Configure ospf6 redistribute with route-map to inject
Type-2 external routes into database. Trigger frr restart
redistribute with route-map happens.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoospfd: Set filter to unbound debug logs
Chirag Shah [Tue, 26 Dec 2017 17:45:25 +0000 (09:45 -0800)]
ospfd: Set filter to unbound debug logs

Ticket:CM-19213

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agolib: add ringbuf_peek()
Quentin Young [Tue, 26 Dec 2017 23:47:19 +0000 (18:47 -0500)]
lib: add ringbuf_peek()

Peek functionality for ring buffers and associated tests.

Also:
* Slight optimization to avoid 0-byte memcpy() by changing > to >=
* Add rv checks for some ringbuf_[put|get] calls that were missing them
  in the test

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: convert network statements from DEFUN to DEFPY
Don Slice [Mon, 18 Dec 2017 15:40:56 +0000 (10:40 -0500)]
bgpd: convert network statements from DEFUN to DEFPY

Problems reported with inconsistent use of parameters for bgp network
statements.  Converted 12 DEFUNs to 2 DEFPY statements, making the
parameter use consistent with the exception of keeping the "backdoor"
keywork ipv4 only.  Also verified that if a route-map or label-index
is specified in the "no" case it matches what had been previously
defined. Manual testing looks good and bgp-smoke will be performed
before pushing.

Ticket: CM-16860
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: CCR-7056
6 years agolib: add ring buffer
Quentin Young [Tue, 19 Dec 2017 21:28:45 +0000 (16:28 -0500)]
lib: add ring buffer

Simple ring buffer implementation useful for fixed size FIFO queues.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1551 from LabNConsulting/working/master/minor-perf
Donald Sharp [Tue, 19 Dec 2017 18:21:09 +0000 (13:21 -0500)]
Merge pull request #1551 from LabNConsulting/working/master/minor-perf

bgpd: minor performance enhancement

6 years agoMerge pull request #1563 from opensourcerouting/isis-bpf-hlen
Donald Sharp [Tue, 19 Dec 2017 17:57:42 +0000 (12:57 -0500)]
Merge pull request #1563 from opensourcerouting/isis-bpf-hlen

Unbreak ISIS Hellos (FreeBSD)

6 years agoMerge pull request #1553 from donaldsharp/bgp_json_routes
Rafael Zalamena [Tue, 19 Dec 2017 16:49:59 +0000 (14:49 -0200)]
Merge pull request #1553 from donaldsharp/bgp_json_routes

bgpd: Speedup vtysh handling of 'show bgp afi safi json' display

6 years agoMerge pull request #1567 from donaldsharp/json_fixes
Renato Westphal [Tue, 19 Dec 2017 16:14:26 +0000 (14:14 -0200)]
Merge pull request #1567 from donaldsharp/json_fixes

Json fixes

6 years agoMerge pull request #1515 from donaldsharp/selected_to_front1
Renato Westphal [Tue, 19 Dec 2017 16:09:03 +0000 (14:09 -0200)]
Merge pull request #1515 from donaldsharp/selected_to_front1

Store selected_fib as a pointer off of rib_dest_t

6 years agoMerge pull request #1533 from donaldsharp/REALMS
Jafar Al-Gharaibeh [Tue, 19 Dec 2017 15:32:11 +0000 (09:32 -0600)]
Merge pull request #1533 from donaldsharp/REALMS

Add Linux Realms and some Pim Documentation

6 years agoMerge pull request #1543 from donaldsharp/pim_sg_rpt
Jafar Al-Gharaibeh [Tue, 19 Dec 2017 15:29:44 +0000 (09:29 -0600)]
Merge pull request #1543 from donaldsharp/pim_sg_rpt

pimd: Really, Actually send S,G rpt prune upstream

6 years agobgpd: Fix double free
Donald Sharp [Tue, 19 Dec 2017 13:20:30 +0000 (08:20 -0500)]
bgpd: Fix double free

The json code was freeing json_paths and then
turning around and free'ing it again.  Newer
versions of json-c have started to assert
this bad behavior.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: fixed '-Werror=maybe-uninitialized' warnings
Raymond P. Burkholder [Sun, 17 Dec 2017 15:53:34 +0000 (11:53 -0400)]
bgpd: fixed '-Werror=maybe-uninitialized' warnings

- used @sharpd's slack patch as a starting point
- fixes compile time issue, but code path not tested

Signed-off-by: Raymond P. Burkholder <github@oneunified.net>
6 years agoRevert "isisd: bpf: ETHER_HDR_LEN -> ETH_ALEN"
Rafael Zalamena [Mon, 18 Dec 2017 15:19:08 +0000 (13:19 -0200)]
Revert "isisd: bpf: ETHER_HDR_LEN -> ETH_ALEN"

This reverts commit d9e5b009554f99230be1eee62daf098403c3cadf.

ETH_ALEN is not equivalent to ETHER_HDR_LEN. ETHER_HDR_LEN is the
definition for the length of the full ethernet header, meanwhile
ETH_ALEN is just the length of the ethernet address.

Here is the OpenBSD/FreeBSD definition for ETHER_HDR_LEN:
 #define ETHER_ADDR_LEN  6       /* Ethernet address length */
 #define ETHER_TYPE_LEN  2       /* Ethernet type field length */
 #define ETHER_HDR_LEN   ((ETHER_ADDR_LEN * 2) + ETHER_TYPE_LEN)

(OpenBSD's definition is at net/if_ether.h, FreeBSD's is at
 net/ethernet.h)

Linux definitions can be found at: net/ethernet.h
 #define ETHER_ADDR_LEN  ETH_ALEN  /* size of ethernet addr */
 #define ETHER_TYPE_LEN  2         /* bytes in type field */
 #define ETHER_HDR_LEN   ETH_HLEN  /* total octets in header */

net/if_ether.h:
 #define ETH_HLEN       14 /* Total octets in header.       */
 #define ETH_ALEN       6  /* Octets in one ethernet addr   */

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agoMerge pull request #1547 from donaldsharp/sa_from_clang
Rafael Zalamena [Fri, 15 Dec 2017 17:42:38 +0000 (15:42 -0200)]
Merge pull request #1547 from donaldsharp/sa_from_clang

Sa from clang

6 years agoMerge pull request #1549 from lucize/cross
Donald Sharp [Fri, 15 Dec 2017 16:51:45 +0000 (11:51 -0500)]
Merge pull request #1549 from lucize/cross

configure: exclude some checks not needed on clippy host build

6 years agoMerge pull request #1535 from qlyoung/fix-coalesce-time-display
Rafael Zalamena [Fri, 15 Dec 2017 13:46:28 +0000 (11:46 -0200)]
Merge pull request #1535 from qlyoung/fix-coalesce-time-display

bgpd: fix config display of coalesce-time

6 years agobgpd: fix configuration of 0 for coalesce-time
Quentin Young [Thu, 14 Dec 2017 21:43:31 +0000 (16:43 -0500)]
bgpd: fix configuration of 0 for coalesce-time

Was using 0 as a sentinel value, so user couldn't configure 0 as the
value of the coalesce timer.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1554 from opensourcerouting/cover-fix1
Donald Sharp [Thu, 14 Dec 2017 17:24:52 +0000 (12:24 -0500)]
Merge pull request #1554 from opensourcerouting/cover-fix1

bgpd: fix some coverity scan issues

6 years agoMerge pull request #1550 from opensourcerouting/missing-lintian-file
Donald Sharp [Thu, 14 Dec 2017 16:05:29 +0000 (11:05 -0500)]
Merge pull request #1550 from opensourcerouting/missing-lintian-file

debianpkg: Add missing frr-dbg.lintian-overrides to Makefile

6 years agobgpd: handle argv_find_and_parse_afi return value
Rafael Zalamena [Thu, 14 Dec 2017 16:00:58 +0000 (14:00 -0200)]
bgpd: handle argv_find_and_parse_afi return value

Handle the return value of argv_find_and_parse_afi() to avoid passing
along bad values.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobgpd: use buffer size instead of hardcoded value
Rafael Zalamena [Thu, 14 Dec 2017 15:57:03 +0000 (13:57 -0200)]
bgpd: use buffer size instead of hardcoded value

This is a possible buffer overflow.

We should always use the buffer size (whenever possible) to tell
functions what the size of the buffer is, instead of a hardcoded value.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agoospf6d: Don't assign to values that are never read
Donald Sharp [Wed, 13 Dec 2017 15:58:55 +0000 (10:58 -0500)]
ospf6d: Don't assign to values that are never read

offset and offsetlen are never used without reassigning
in the code.  So comment out the assignments and
in case we want to start using the code for snmp
changes in the future.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Fix memory allocation error
Donald Sharp [Wed, 13 Dec 2017 15:36:53 +0000 (10:36 -0500)]
pimd: Fix memory allocation error

When creating the pim_ifp, and we run out of memory there
existed a chance that we would dereference the failed memory
pointer.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Remove possible NULL dereference in if_delete_connected
Donald Sharp [Wed, 13 Dec 2017 15:32:54 +0000 (10:32 -0500)]
zebra: Remove possible NULL dereference in if_delete_connected

It is technically possible to attempt to use a NULL pointer.
Remove this from happening.

Additionally cleanup code indentation a small bit.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1546 from pguibert6WIND/issue__1537
Donald Sharp [Thu, 14 Dec 2017 15:23:54 +0000 (10:23 -0500)]
Merge pull request #1546 from pguibert6WIND/issue__1537

Issue  1537

6 years agodoc: Cleanup the doc Makefile some
Donald Sharp [Sat, 9 Dec 2017 00:40:30 +0000 (19:40 -0500)]
doc: Cleanup the doc Makefile some

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc: Add some PIM documentation
Donald Sharp [Sat, 9 Dec 2017 00:38:24 +0000 (19:38 -0500)]
doc: Add some PIM documentation

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Display if a taged route is being used as a realm
Donald Sharp [Fri, 8 Dec 2017 20:02:46 +0000 (15:02 -0500)]
zebra: Display if a taged route is being used as a realm

When displaying a specific route and if it has a tag
and if we have turned on realm support notify the user
that a tag value of (1-255) is installed into the kernel
with the realm set.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc: Add documentation for the tag/realm commands
Donald Sharp [Fri, 8 Dec 2017 19:55:58 +0000 (14:55 -0500)]
doc: Add documentation for the tag/realm commands

Add some documentation for the tag and realm commands.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Add ability to support tags -> realms in linux
Kaloyan Kovachev [Fri, 8 Dec 2017 19:44:15 +0000 (14:44 -0500)]
zebra: Add ability to support tags -> realms in linux

Linux has the ability to support a concept of 'realms'.
This concept allows you to mark routes with a realm id
value of 1-255.  If you have marked the realm
of a route then you can use the tc program to
apply policy to the routes.

This commit adds the ability of FRR to interpret
a tag from (1-255) as a realm when installing into
the kernel.  Please note that at this point in time
there is no way to set policy from within FRR.  This
must be done outside of it.

The normal methodology for setting tags is valid here
via a route-map.

Finally this is only applied if the --enable-realms configure
option is applied.

Signed-off-by: Kaloyan Kovachev <kkovachev@varna.net>
6 years agobgpd: Speedup vtysh handling of 'show bgp afi safi json' display
Donald Sharp [Thu, 14 Dec 2017 14:31:26 +0000 (09:31 -0500)]
bgpd: Speedup vtysh handling of 'show bgp afi safi json' display

When bgp has a metric butt-load of routes w/ ecmp, this command
can take an inordinate amount of time to run and complete via
vtysh.

Converting the bgp route output in this case back to not
using the json pretty-print drops ~2 minutes of runtime
off.

It is assumed that if users would like pretty output they
can run it through an appropriate tool via a pipe command.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1527 from donaldsharp/zserv_thread
Renato Westphal [Thu, 14 Dec 2017 14:23:37 +0000 (12:23 -0200)]
Merge pull request #1527 from donaldsharp/zserv_thread

Zserv.h modifications

6 years agobgpd: minor performance enhancement
Lou Berger [Tue, 12 Dec 2017 13:26:20 +0000 (08:26 -0500)]
bgpd: minor performance enhancement

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agoMerge pull request #1521 from donaldsharp/bufsiz
Rafael Zalamena [Thu, 14 Dec 2017 13:21:40 +0000 (11:21 -0200)]
Merge pull request #1521 from donaldsharp/bufsiz

Cleanup Some Code Issues

6 years agoMerge pull request #1536 from opensourcerouting/isis-l2conv
Donald Sharp [Thu, 14 Dec 2017 12:40:23 +0000 (07:40 -0500)]
Merge pull request #1536 from opensourcerouting/isis-l2conv

Fix ISIS L2 formations

6 years agodebianpkg: Add missing frr-dbg.lintian-overrides to Makefile
Martin Winter [Thu, 14 Dec 2017 02:58:33 +0000 (18:58 -0800)]
debianpkg: Add missing frr-dbg.lintian-overrides to Makefile

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoisisd: fix l2 neighbor formations
Rafael Zalamena [Mon, 11 Dec 2017 20:25:06 +0000 (18:25 -0200)]
isisd: fix l2 neighbor formations

Add a timestamp information for level 2 circuits, otherwise if the
circuit is marked as already processed on level 1 we will not process
level 2 areas.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agoconfigure: exclude some checks not needed on clippy host build
Lucian Cristian [Wed, 13 Dec 2017 21:13:59 +0000 (23:13 +0200)]
configure: exclude some checks not needed on clippy host build

from David Lamparter

Signed-off-by: Lucian Cristian <lucian.cristian@gmail.com>
6 years agozebra: remove useless iotcl linux calls
Philippe Guibert [Wed, 13 Dec 2017 15:50:16 +0000 (16:50 +0100)]
zebra: remove useless iotcl linux calls

As netlink is available for all linux systems ( old linux distributions
are not considered), this commit removes the ipv6 ioctl support for
linux.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: ipv6 addressing uses netlink socket instead of standard ioctl
Philippe Guibert [Mon, 11 Dec 2017 14:21:04 +0000 (15:21 +0100)]
zebra: ipv6 addressing uses netlink socket instead of standard ioctl

It is possible to configure IPv6 addresses from interfaces by using
netlink socket, intead of using standard sockets.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agozebra: Make zserv.h the true api for zapi northbound
Donald Sharp [Thu, 7 Dec 2017 23:35:29 +0000 (18:35 -0500)]
zebra: Make zserv.h the true api for zapi northbound

zserv.c had a grab bag of function declarations that
did not belong in it.  Move those to where they better
belong.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Try to move non zapi cli commands from zserv.c
Donald Sharp [Thu, 7 Dec 2017 15:47:30 +0000 (10:47 -0500)]
zebra: Try to move non zapi cli commands from zserv.c

zserv.c has become a bit of a dumping ground for zebra cli.
I'd like to focus the zserv.c code into it's core functionality
which is handling the zapi interface.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Move zebrad initialization outside of cli init
Donald Sharp [Wed, 6 Dec 2017 01:21:37 +0000 (20:21 -0500)]
zebra: Move zebrad initialization outside of cli init

The zebrad initialization does not need to be part of cli
initialization and should be done separately.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1478 from bingen/zeromq4
Donald Sharp [Wed, 13 Dec 2017 12:36:57 +0000 (07:36 -0500)]
Merge pull request #1478 from bingen/zeromq4

lib: Address ZMQ lib TODOs

6 years agopimd: Really, Actually send S,G rpt prune upstream
Donald Sharp [Wed, 13 Dec 2017 01:29:38 +0000 (20:29 -0500)]
pimd: Really, Actually send S,G rpt prune upstream

When we receive a S,G rpt prune message for a mroute,
really, absolutely, guarantee the send upstream immediately.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1540 from opensourcerouting/isis-spfperf1
Donald Sharp [Tue, 12 Dec 2017 17:41:07 +0000 (12:41 -0500)]
Merge pull request #1540 from opensourcerouting/isis-spfperf1

isisd: save a clock_gettime() call

6 years agoMerge pull request #1539 from LabNConsulting/working/master/community-decisions
Donald Sharp [Tue, 12 Dec 2017 16:59:07 +0000 (11:59 -0500)]
Merge pull request #1539 from LabNConsulting/working/master/community-decisions

COMMUNITY.md: add paragraph on use of development list and discussing…

6 years agoMerge pull request #1514 from donaldsharp/watchfrr
Martin Winter [Tue, 12 Dec 2017 16:51:25 +0000 (08:51 -0800)]
Merge pull request #1514 from donaldsharp/watchfrr

tools, watchfrr: Modify timeout to 90 seconds

6 years agoisisd: save a clock_gettime() call
Rafael Zalamena [Tue, 12 Dec 2017 13:47:04 +0000 (11:47 -0200)]
isisd: save a clock_gettime() call

Use the thread cached clock to use as start time. It will save a call to
clock_gettime() and also provide a more 'accurate' time measurement from
the start of the procedure.

6 years agoCOMMUNITY.md: add paragraph on use of development list and discussing/documenting...
Lou Berger [Tue, 12 Dec 2017 13:42:54 +0000 (08:42 -0500)]
COMMUNITY.md: add paragraph on use of development list and discussing/documenting decisions

6 years agoisisd: fix debug message
Rafael Zalamena [Wed, 6 Dec 2017 21:23:55 +0000 (19:23 -0200)]
isisd: fix debug message

Show the actual timer instead of doing the arithmetic operation again.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agoMerge pull request #1526 from chiragshah6/ospfv3_dev
Jafar Al-Gharaibeh [Mon, 11 Dec 2017 17:51:43 +0000 (11:51 -0600)]
Merge pull request #1526 from chiragshah6/ospfv3_dev

ospf6d: Fix multi nexthop route remove

6 years agobgpd: Fixup buffer sizes for prefix_rd2str
Donald Sharp [Mon, 11 Dec 2017 17:38:26 +0000 (12:38 -0500)]
bgpd: Fixup buffer sizes for prefix_rd2str

The prefix_rd2str uses a buffer size of RD_ADDRSTRLEN.
Modify the code to consistently use this for all of BGP.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Modify prefix_rd2str to return "Unknown" when unknown
Donald Sharp [Mon, 11 Dec 2017 13:48:59 +0000 (08:48 -0500)]
bgpd: Modify prefix_rd2str to return "Unknown" when unknown

Make prefix_rd2str return an "Unknown" string when something
goes wrong.  This will allow for simplification of the
code that uses prefix_rd2str.

Additionally ensure that size is big enough with an assert.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1524 from dslicenc/zebra-ra-display-cm18702
Renato Westphal [Mon, 11 Dec 2017 17:37:26 +0000 (15:37 -0200)]
Merge pull request #1524 from dslicenc/zebra-ra-display-cm18702

zebra: do not display ipv6 ra commands created by bgpd

6 years agobgpd: Cleanup SA error in ignoring return from function
Donald Sharp [Tue, 5 Dec 2017 15:09:36 +0000 (10:09 -0500)]
bgpd: Cleanup SA error in ignoring return from function

Ignoring the return from argv_find_and_parse_afi
makes the SA system assume that you could pass a AFI_MAX
value to bgp_show_route.  Which in turn would cause
an array out of bounds read.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Fixup some SA issues
Donald Sharp [Tue, 5 Dec 2017 14:52:16 +0000 (09:52 -0500)]
eigrpd: Fixup some SA issues

1) strlen(buf) on an uninted value is the wrong thing to do
we should be getting sizeof(buf)

2) tlv is not freed in this error case, so let's free it up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Fix prefix2str using BUFSIZ to PREFIX_STRLEN
Donald Sharp [Tue, 5 Dec 2017 14:44:11 +0000 (09:44 -0500)]
bgpd: Fix prefix2str using BUFSIZ to PREFIX_STRLEN

PREFIX_STRLEN is the correct length for buffers needed to output
a prefix2str.  Additionally cleanup some setting of the last
value to a `\0` this is handled by prefix2str.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1531 from chiragshah6/ospf_vrf_dev
Renato Westphal [Mon, 11 Dec 2017 12:55:03 +0000 (10:55 -0200)]
Merge pull request #1531 from chiragshah6/ospf_vrf_dev

ospfd: prevent passive interface cmd crash

6 years agoMerge pull request #1528 from donaldsharp/ldp_macro
Renato Westphal [Mon, 11 Dec 2017 00:38:02 +0000 (22:38 -0200)]
Merge pull request #1528 from donaldsharp/ldp_macro

ldpd: Switch over to new debug style

6 years agoospfd: prevent passive interface cmd crash
Chirag Shah [Fri, 8 Dec 2017 17:33:53 +0000 (09:33 -0800)]
ospfd: prevent passive interface cmd crash

Current OSPF VRF configuration are allow pre-provisining even if
VRF is not configured. In such case ospf->vrf_id would VRF_UNKNOWN,
when passive interface configuration done under such ospf instance,
it would lookup all vrf_device and try to create ifp with unknown
vrf_id.

for passive interface config command lookup ifp for vrf_id is within range.

Ticket:CM-19156
Testing Done:
Configure
Cumulus#: router ospf vrf vrf1
Cumulus(config-router)#: passive interface swp16
 interface swp16 not found.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoldpd: Switch over to new debug style
Donald Sharp [Thu, 7 Dec 2017 23:59:54 +0000 (18:59 -0500)]
ldpd: Switch over to new debug style

When compiling ldpd on a mac, there exists a #define MSG_SEND
which conflicts with a define in ldp_debug.h.

During discussion about this we decided that it would be
better to remove the macro massaging that was going on and
to just call our own #define for it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1519 from donaldsharp/ptm
Rafael Zalamena [Thu, 7 Dec 2017 14:37:10 +0000 (12:37 -0200)]
Merge pull request #1519 from donaldsharp/ptm

Ptm

6 years agoMerge pull request #1520 from donaldsharp/vrf_leaking
Rafael Zalamena [Thu, 7 Dec 2017 13:43:38 +0000 (11:43 -0200)]
Merge pull request #1520 from donaldsharp/vrf_leaking

Cleanup a bunch of code

6 years agobgpd: fix config display of coalesce-time
Quentin Young [Wed, 6 Dec 2017 22:35:21 +0000 (17:35 -0500)]
bgpd: fix config display of coalesce-time

Since coalesce time is now heuristically adjusted based on peer count,
we need to separate out specific configuration by the user from the
current value. Behavior established is to not adjust if the user has a
value set.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoospf6d: Fix multi nexthop route remove
Chirag Shah [Fri, 1 Dec 2017 01:45:12 +0000 (17:45 -0800)]
ospf6d: Fix multi nexthop route remove

Fix sorting of route storage to DB.
Fix two list comparison which allows route with
multiple nexthop to updates.

Ticket:CM-19025
Testing Done:
Configured a topology where ospf6 learn
ecmp route via one neighbor and upon removal
of intra-prefix route from origin, DUT removes
ECMP intra-prefix route from RIB.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agozebra: do not display ipv6 ra commands created by bgpd
Don Slice [Wed, 6 Dec 2017 17:00:48 +0000 (09:00 -0800)]
zebra: do not display ipv6 ra commands created by bgpd

If the frr.conf file contains bgp unnumbered peering but the associated
interfaces do not have the commands "no ipv6 nd suppress-ra" and
"ipv6 nd ra-interval 10" configured, when frr-reload.py is issued the
interface commands are removed from the running config, causing peers to
got down and stay down after a link flap.  This situation can occur if
the frr.conf file is created manually or via automation (like ansible)
but a subsequent "wr mem" has not been performed.

This fix changes the behavior so that the interface ipv6 nd ra commands
created by bgp are not displayed.  Therefore, when the above condition
occurs, there is no difference between the running and stored configs
and peers work fine.

Ticket: CM-18702
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: CCR-7004
Testing-done:  Manual testing successful.  L3-smoke has no new failures

6 years ago*: Remove cvs control points
Donald Sharp [Mon, 4 Dec 2017 15:12:36 +0000 (10:12 -0500)]
*: Remove cvs control points

The $Id: lines would allow code kept in cvs to substitute
the file version upon checkout.  Since we are not using
cvs there is no need to keep these lines anymore.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoconfigure, zebra: Kame is not responsible for on/off of v6 forwarding
Donald Sharp [Mon, 4 Dec 2017 14:29:08 +0000 (09:29 -0500)]
configure, zebra: Kame is not responsible for on/off of v6 forwarding

The KAME flag should not be used to turn on/of v6 forwarding on
*bsd systems.  Create a configure #define to better describe
what we are doing and the why of it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Replace SELECTED_FIB flag with a rib_dest_t pointer
Donald Sharp [Thu, 30 Nov 2017 19:03:07 +0000 (14:03 -0500)]
zebra: Replace SELECTED_FIB flag with a rib_dest_t pointer

The SELECTED_FIB flag was placed upon the entry that we
have inserted into the kernel.  Remove this flag and replace
with a `rib_dest_t` *selected_fib.  Just keep track of the
selected_fib as we modify it.  This removes allot of
FOREACH_RE loops as that we do not need to find the
entry anymore.

At this point in time I think this is a very minor performance
boost.  Most `rib_dest_t` structures do not typically carry
more than 1 route_entry, but the minute you start having more
than one entry you can and will start having significant processing
time spent finding the selected_fib.

A future commit may re-order the route entries and possibly
keep more pointers on `rib_dest_t` to avoid lookup.  This
is a bit tricky because of the FIB_OVERRIDE code.

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