]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agopimd: Add ability to lookup RP group by table.
Donald Sharp [Thu, 31 Aug 2017 13:08:12 +0000 (09:08 -0400)]
pimd: Add ability to lookup RP group by table.

This feature does this:

Add the ability to store the non-prefix static RP
entries into a table.  Then to lookup the G to
find the RP in that table, finding the longest
prefix match across both prefix-lists and
static RP's.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Match on longest prefix when searching for RP
Donald Sharp [Tue, 29 Aug 2017 13:46:12 +0000 (09:46 -0400)]
pimd: Match on longest prefix when searching for RP

When we are searching for a RP to use, amongst
many RP's and separate prefix-lists, Match on
the longest prefix specified to choose the
correct RP.

Example:
ip pim rp 4.3.2.1 prefix-list A
ip pim rp 4.3.2.2 prefix-list B
ip pim rp 4.3.2.3 prefix-list C

ip prefix-list A seq 5 permit 225.0.0.0/8
ip prefix-list B seq 5 permit 225.1.0.0/16
ip prefix-list C seq 5 permit 225.1.1.0/24

Old behavior:  Group 225.1.1.14 comes in and
we need to find the RP to use, we would match
on the first prefix-list A( since we are searching
based on a sorted link list of RP address ) and
select 4.3.2.1 as our RP

New behavior:  Group 225.1.1.14 comes in and
we need to find theRP to use, we now will
match on C( longest prefix match ) and select
4.3.2.3 as our RP.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Improve handling in pim_rp_init
Donald Sharp [Thu, 31 Aug 2017 13:03:49 +0000 (09:03 -0400)]
pimd: Improve handling in pim_rp_init

When we are starting up improve the error handling of
pim_rp_init and fix some memory leaks.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Smarten up pim_nexthop_lookup
Donald Sharp [Thu, 31 Aug 2017 12:49:10 +0000 (08:49 -0400)]
pimd: Smarten up pim_nexthop_lookup

There exists cases where we have not properly configured
a RP yet, but we are getting callbacks for nocache.
This is generating allot of spam messages in the log.

In the case where we attempt to lookup INADDR_NONE
just say it fails without need to talk to anyone
since we'll never get a real answer from zebra
anyways.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Modify prefix_list_apply to allow retrieval of prefix
Donald Sharp [Tue, 29 Aug 2017 12:29:34 +0000 (08:29 -0400)]
lib: Modify prefix_list_apply to allow retrieval of prefix

Create a new function prefix_list_apply_which_prefix which
will return a pointer to the matching prefix that caused
the acceptance/denial.

This change will be used in future commits.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoconfigure: Modify compiler options with dev build
Donald Sharp [Thu, 31 Aug 2017 12:56:44 +0000 (08:56 -0400)]
configure: Modify compiler options with dev build

When building a dev build, modify the compiler options
to be "-g -O0" to allow for better debugging.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1077 from donaldsharp/ws
Renato Westphal [Thu, 31 Aug 2017 01:26:41 +0000 (22:26 -0300)]
Merge pull request #1077 from donaldsharp/ws

Cleanup some issues in pim

6 years agoMerge pull request #1080 from mgsmith1000/systemd_service_perms
Donald Sharp [Wed, 30 Aug 2017 23:50:06 +0000 (19:50 -0400)]
Merge pull request #1080 from mgsmith1000/systemd_service_perms

Set permissions on systemd service file

6 years agoredhat: Set permissions on systemd service file
Matthew Smith [Wed, 30 Aug 2017 18:36:20 +0000 (13:36 -0500)]
redhat: Set permissions on systemd service file

Systemd on CentOS 7.3 logs a warning about the execute bit being
set every time the frr service file is invoked by systemctl.
Modify the spec file to explicitly set the permissions to 644.

Signed-off-by: Matthew Smith <mgsmith@netgate.com>
6 years agopimd: Fix pim->keep_alive_time missed patch
Donald Sharp [Wed, 30 Aug 2017 11:49:51 +0000 (07:49 -0400)]
pimd: Fix pim->keep_alive_time missed patch

The commit '19b807c pimd: Allow the keepalive time to be per vrf.'
is missing some data.  Probably as a result of the indentation
and I accidently dropped it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Add missed frame for vrf based interface
Donald Sharp [Wed, 30 Aug 2017 11:39:46 +0000 (07:39 -0400)]
pimd: Add missed frame for vrf based interface

pim is vrf aware and the interface based line for vrf's was
not being started with a vrf_frame as the non interface
based line was.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Fix indentation issue that slipped in?
Donald Sharp [Wed, 30 Aug 2017 11:35:36 +0000 (07:35 -0400)]
pimd: Fix indentation issue that slipped in?

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1059 from opensourcerouting/oldbits-1
Donald Sharp [Tue, 29 Aug 2017 23:53:30 +0000 (19:53 -0400)]
Merge pull request #1059 from opensourcerouting/oldbits-1

zebra: PtP address configuration support

6 years agoMerge pull request #1056 from opensourcerouting/oldbits-0
Donald Sharp [Tue, 29 Aug 2017 21:48:36 +0000 (17:48 -0400)]
Merge pull request #1056 from opensourcerouting/oldbits-0

"pathspace" options, vtysh-suid-cleanups, "vty_frame()"

6 years agoMerge pull request #1074 from opensourcerouting/ospf6-plist-segv
Donald Sharp [Tue, 29 Aug 2017 21:35:42 +0000 (17:35 -0400)]
Merge pull request #1074 from opensourcerouting/ospf6-plist-segv

ospf6d: fix prefix list name SEGV

6 years agoMerge pull request #1073 from LabNConsulting/working/master/patch/fix-pr939-bgp-race
Donald Sharp [Tue, 29 Aug 2017 21:21:12 +0000 (17:21 -0400)]
Merge pull request #1073 from LabNConsulting/working/master/patch/fix-pr939-bgp-race

Fix bgpd race

6 years agobgp: add asserts to catch unsupported double enqueue of an RN on a bgp_process_queue
Lou Berger [Tue, 29 Aug 2017 19:30:34 +0000 (15:30 -0400)]
bgp: add asserts to catch unsupported double enqueue of an RN on a bgp_process_queue

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agobgp: fix handling of bgp_process_queue to allow for RNs added
Lou Berger [Mon, 28 Aug 2017 22:34:45 +0000 (18:34 -0400)]
bgp: fix handling of bgp_process_queue to allow for RNs added
     during callback.  Issue introduced in PR #939.

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agobgp: refactor bgp_process_queue to be consistent and cleanup related event queuing
Lou Berger [Mon, 28 Aug 2017 22:30:09 +0000 (18:30 -0400)]
bgp: refactor bgp_process_queue to be consistent and cleanup related event queuing

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agoospf6d: fix prefix list name SEGV
David Lamparter [Tue, 29 Aug 2017 19:08:55 +0000 (21:08 +0200)]
ospf6d: fix prefix list name SEGV

Oops, I tested this with prefix lists configured and failed to notice it
blows up when nothing is set...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoRevert "doc: work around weird texinfo bug"
David Lamparter [Tue, 29 Aug 2017 18:43:28 +0000 (20:43 +0200)]
Revert "doc: work around weird texinfo bug"

This reverts commit 50ffbc124bca15b2ca09c1b8b2fd57de6c4d3da4.

The workaround stopped working :(

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agodoc: add "ip address LOCAL peer PEER/SUBNET"
David Lamparter [Tue, 29 Aug 2017 18:40:46 +0000 (20:40 +0200)]
doc: add "ip address LOCAL peer PEER/SUBNET"

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge pull request #998 from mkanjari/dev-master
David Lamparter [Tue, 29 Aug 2017 18:03:48 +0000 (20:03 +0200)]
Merge pull request #998 from mkanjari/dev-master

Dev master

6 years agoMerge pull request #1072 from opensourcerouting/isisd-fix-confusion-purge
Donald Sharp [Tue, 29 Aug 2017 17:07:45 +0000 (13:07 -0400)]
Merge pull request #1072 from opensourcerouting/isisd-fix-confusion-purge

isisd: keep original TLVs when purging in response to confusion

6 years agoMerge pull request #1071 from opensourcerouting/isis-spf-debug-guard
Donald Sharp [Tue, 29 Aug 2017 17:05:18 +0000 (13:05 -0400)]
Merge pull request #1071 from opensourcerouting/isis-spf-debug-guard

isisd: guard SPF warning by debug flag

6 years agoMerge pull request #1060 from opensourcerouting/oldbits-2
Donald Sharp [Tue, 29 Aug 2017 13:07:19 +0000 (09:07 -0400)]
Merge pull request #1060 from opensourcerouting/oldbits-2

zebra: clean up blackhole support

6 years agodoc: new frr-args(8) man page with general options
David Lamparter [Mon, 28 Aug 2017 21:48:51 +0000 (23:48 +0200)]
doc: new frr-args(8) man page with general options

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobgpd: remove some deep nesting
David Lamparter [Sun, 27 Aug 2017 20:51:35 +0000 (22:51 +0200)]
bgpd: remove some deep nesting

Some of this was so egregiously stupid, I couldn't look at it without
gouging my eyes out...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobgpd: get rid of afi_header_vty_out() & co.
David Lamparter [Sun, 27 Aug 2017 20:18:32 +0000 (22:18 +0200)]
bgpd: get rid of afi_header_vty_out() & co.

afi_header_vty_out() is easily replaced with vty_frame(), which means we
can drop a whole batch of "int *write" args as well as the entirety of
bgp_config_write_family_header().

=> AFI/SAFI config writing is now a lot simpler.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years ago*: remove empty "interface XYZ" config blocks
David Lamparter [Fri, 5 Feb 2010 08:48:45 +0000 (09:48 +0100)]
*: remove empty "interface XYZ" config blocks

Using the previously-added vty_frame() support, this gets rid of all the
pointless empty "interface XYZ" blocks that get added for any interface
that shows up in the system (e.g. dummys, tunnels, etc.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agolib: add vty_frame() to get rid of unneeded config
David Lamparter [Fri, 5 Feb 2010 08:48:45 +0000 (09:48 +0100)]
lib: add vty_frame() to get rid of unneeded config

vty_frame() can be used to reduce the amount of output produced by "show
running-config" and "write ...".  It buffers output in struct vty->frame
(1024 bytes) and outputs it when vty_out is called.  If vty_out isn't
called, it can be removed with vty_endframe() later.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge branch 'master' into dev-master
Mitesh Kanjariya [Tue, 29 Aug 2017 01:19:03 +0000 (18:19 -0700)]
Merge branch 'master' into dev-master

6 years agolib: new APIs for get/set system hostname/domainname
Mitesh Kanjariya [Mon, 28 Aug 2017 23:52:29 +0000 (16:52 -0700)]
lib: new APIs for get/set system hostname/domainname

1. Change hostname_get to cmd_hostname_get
2. Change domainname_get to cmd_domainname_get
3. New API to set domainname
3. Provide a CLI command to set domainname

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agoMerge pull request #1041 (-funwind-tables)
David Lamparter [Mon, 28 Aug 2017 23:05:05 +0000 (01:05 +0200)]
Merge pull request #1041 (-funwind-tables)

6 years agoconfigure: Add `-funwind-tables`
Donald Sharp [Thu, 24 Aug 2017 16:16:24 +0000 (12:16 -0400)]
configure: Add `-funwind-tables`

Certain platforms( ARM comes to mind ) in order
to get a proper stack trace on crash you need
to compile with this value.  Since it only
slightly increases the size of the binary for
other platforms, I would consider it worthwhile
to include this directive.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1065 from qlyoung/no-ospf6-router-id
David Lamparter [Mon, 28 Aug 2017 22:37:26 +0000 (00:37 +0200)]
Merge pull request #1065 from qlyoung/no-ospf6-router-id

no ospf6 router-id

6 years agoisisd: guard SPF warning by debug flag
Christian Franke [Mon, 28 Aug 2017 22:23:53 +0000 (00:23 +0200)]
isisd: guard SPF warning by debug flag

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoisisd: keep original TLVs when purging in response to confusion
Christian Franke [Mon, 28 Aug 2017 22:14:43 +0000 (00:14 +0200)]
isisd: keep original TLVs when purging in response to confusion

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agovtysh: add -N/--pathspace option
David Lamparter [Sun, 27 Aug 2017 19:03:32 +0000 (21:03 +0200)]
vtysh: add -N/--pathspace option

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agolib: add -N/--pathspace option
David Lamparter [Sun, 27 Aug 2017 19:03:12 +0000 (21:03 +0200)]
lib: add -N/--pathspace option

This allows running the daemons inside of Linux network namespaces
without messing with an additional mount/fs namespace (or a ton of
options).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agovtysh: simplify path handling
David Lamparter [Sun, 27 Aug 2017 18:57:34 +0000 (20:57 +0200)]
vtysh: simplify path handling

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agovtysh: cleanup SUID handling
David Lamparter [Sun, 27 Aug 2017 18:38:54 +0000 (20:38 +0200)]
vtysh: cleanup SUID handling

Eliminate several more SUID problems (VTYSH_LOG, history file) and make
the whole SUID approach more robust.  Still possibly unsafe to use, but
much better.

[v2: wrap seteuid/setegid calls]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge pull request #1066 from nkukard/fix-ordering-of-large-community-config
Donald Sharp [Mon, 28 Aug 2017 20:15:27 +0000 (16:15 -0400)]
Merge pull request #1066 from nkukard/fix-ordering-of-large-community-config

vtysh: Fix for the ordering of large-community lists in config output

6 years agovtysh: Fix for the ordering of large-community lists in config output
Nigel Kukard [Mon, 28 Aug 2017 18:35:15 +0000 (18:35 +0000)]
vtysh: Fix for the ordering of large-community lists in config output

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
6 years agoMerge pull request #1019 from opensourcerouting/zeromq2
ßingen [Mon, 28 Aug 2017 17:55:30 +0000 (19:55 +0200)]
Merge pull request #1019 from opensourcerouting/zeromq2

lib: ZeroMQ read handler, v2

6 years agoospf6d, ospfd: add `no ospf6 router-id ...`
Quentin Young [Mon, 28 Aug 2017 17:38:42 +0000 (13:38 -0400)]
ospf6d, ospfd: add `no ospf6 router-id ...`

* Deprecate `router-id A.B.C.D` for ospf6d
* Add `ospf6 router-id A.B.C.D`
* Add `no ospf6 router-id [A.B.C.D]`
* Add deprecation notices for previously deprecated ospf commands

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: document frrzmq in its header file
David Lamparter [Mon, 28 Aug 2017 15:59:54 +0000 (17:59 +0200)]
lib: document frrzmq in its header file

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agotests: fix & run ZeroMQ test
David Lamparter [Mon, 28 Aug 2017 15:20:38 +0000 (17:20 +0200)]
tests: fix & run ZeroMQ test

add reference output & run the test with proper libs and such.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agotests: add ZeroMQ test
David Lamparter [Thu, 24 Aug 2017 16:13:31 +0000 (18:13 +0200)]
tests: add ZeroMQ test

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agolib: ZeroMQ read handler, v2
David Lamparter [Wed, 17 May 2017 16:27:54 +0000 (18:27 +0200)]
lib: ZeroMQ read handler, v2

This uses zmq_getsockopt(ZMQ_FD) to create a libfrr read event, which
then wraps zmq_poll and calls an user-specified ZeroMQ read handler.
It's wrapped in a separate library in order to make ZeroMQ support an
installation-time option instead of build-time.

Extended to support per-message and per-fragment callbacks as discussed
with Bingen in PR #566.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agolib, zebra: carry blackhole type over ZAPI
David Lamparter [Mon, 28 Aug 2017 04:01:13 +0000 (06:01 +0200)]
lib, zebra: carry blackhole type over ZAPI

Allow daemons to add blackholes of specific types (reject/drop.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agozebra: dont have vxlan as default iface type
David Lamparter [Mon, 28 Aug 2017 02:42:25 +0000 (04:42 +0200)]
zebra: dont have vxlan as default iface type

... make it so zero (unset) is "other"

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agozebra: kernel_socket: read extra attributes
David Lamparter [Mon, 28 Aug 2017 03:06:56 +0000 (05:06 +0200)]
zebra: kernel_socket: read extra attributes

This is just to silence the "didn't read all data" warning.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agozebra: drop IPv6 "broadcast" and "peer" addr code
David Lamparter [Mon, 28 Aug 2017 02:39:18 +0000 (04:39 +0200)]
zebra: drop IPv6 "broadcast" and "peer" addr code

There is no such thing as an IPv6 "broadcast" or "peer" address.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agozebra: netlink: get blackhole routes from kernel
David Lamparter [Fri, 5 Feb 2010 03:58:46 +0000 (04:58 +0100)]
zebra: netlink: get blackhole routes from kernel

support processing of RTN_BLACKHOLE et al. from kernel and dump them
into appropriate blackhole rib entries.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agozebra: cleanup blackhole support
David Lamparter [Fri, 5 Feb 2010 03:31:56 +0000 (04:31 +0100)]
zebra: cleanup blackhole support

blackhole support was horribly broken. cleanup by removing blackhole
stuff from ZEBRA_FLAG_*

introduces support for "prohibit" routes (Linux/netlink only)
also clean up blackhole options on "ip route" vty commands.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agozebra: rib: use nexthop ptr in rib_add/delete
David Lamparter [Sun, 27 Aug 2017 23:30:16 +0000 (01:30 +0200)]
zebra: rib: use nexthop ptr in rib_add/delete

This simplifies the API for the following blackhole rework.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years ago*: remove ZEBRA_FLAG_{BLACKHOLE,REJECT} from API
David Lamparter [Wed, 11 Apr 2012 21:52:46 +0000 (23:52 +0200)]
*: remove ZEBRA_FLAG_{BLACKHOLE,REJECT} from API

FLAG_BLACKHOLE is used for different things in different places. remove
it from the zclient API, instead indicate blackholes as proper nexthops
inside the message.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agozebra: configure PtP address on ifaliasreq systems
David Lamparter [Wed, 3 Feb 2010 06:36:04 +0000 (06:36 +0000)]
zebra: configure PtP address on ifaliasreq systems

support configuring a point-to-point address on systems using ioctl
/ struct ifaliasreq. error out when interface/address type mismatch.

tested on FreeBSD 8.0-RELEASE.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agozebra: add '[no] ip address A.B.C.D peer A.B.C.D/M'
David Lamparter [Sat, 30 Jan 2010 10:26:59 +0000 (11:26 +0100)]
zebra: add '[no] ip address A.B.C.D peer A.B.C.D/M'

introduce a new command to configure a Point-to-Point address on an
interface.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agozebra: netlink backend support setting a P-t-P address
David Lamparter [Wed, 20 Jan 2010 17:27:16 +0000 (18:27 +0100)]
zebra: netlink backend support setting a P-t-P address

add a few bits to properly set a pointopoint address via netlink. the
structures have all the neccessary support, just need to send the proper
message bits to the kernel.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agozebra: fix interface deletion bug introduced by ptp address support
David Lamparter [Sat, 27 Mar 2010 17:31:42 +0000 (18:31 +0100)]
zebra: fix interface deletion bug introduced by ptp address support

meh. forgot to even look at the interface deletion path. this doesn't
really work well when looking for the local address in the subnet list
which has the connected prefix in it... loop ensues.

fix by using the connected prefix when looking at the list of connected
prefixes. duh.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agozebra: add connected_check_ptp infrastructure
David Lamparter [Sat, 30 Jan 2010 11:10:23 +0000 (12:10 +0100)]
zebra: add connected_check_ptp infrastructure

add a connected_check_ptp function which does the same as
connected_check, but takes an additional peer prefix argument.

also fix related prefixlen mixup in PtP addresses (the local part of a
PtP address always is /32, but previously the peer mask got copied.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoMerge pull request #1054 from dslicenc/eigrp-connected
David Lamparter [Sun, 27 Aug 2017 17:21:55 +0000 (19:21 +0200)]
Merge pull request #1054 from dslicenc/eigrp-connected

eigrpd: add correct interface metrics when interface comes up

6 years agoMerge pull request #1046 from qlyoung/fix-cli-ambiguous
David Lamparter [Sun, 27 Aug 2017 17:20:14 +0000 (19:20 +0200)]
Merge pull request #1046 from qlyoung/fix-cli-ambiguous

fix handling of ambiguous cli

6 years agoMerge pull request #1034 from dwalton76/bgpd-mpls-fec-allocate
David Lamparter [Sun, 27 Aug 2017 17:18:58 +0000 (19:18 +0200)]
Merge pull request #1034 from dwalton76/bgpd-mpls-fec-allocate

Bgpd mpls fec allocate

6 years agoeigrpd: add correct interface metrics when interface comes up
Don Slice [Sat, 26 Aug 2017 19:51:43 +0000 (15:51 -0400)]
eigrpd: add correct interface metrics when interface comes up

Problem noticed where we were not sending the correct metric values
to our peers for connected interfaces.  Found that we were not storing
these values on the structure used to send the update packets.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
6 years agoMerge pull request #1049 from opensourcerouting/openbsd-warnings
Donald Sharp [Sat, 26 Aug 2017 12:05:36 +0000 (08:05 -0400)]
Merge pull request #1049 from opensourcerouting/openbsd-warnings

fix warnings on OpenBSD

6 years agoisisd: bpf: ETHER_HDR_LEN -> ETH_ALEN
David Lamparter [Fri, 25 Aug 2017 23:52:12 +0000 (01:52 +0200)]
isisd: bpf: ETHER_HDR_LEN -> ETH_ALEN

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agozebra: remove RT_ROUNDUP warning
David Lamparter [Fri, 25 Aug 2017 23:41:07 +0000 (01:41 +0200)]
zebra: remove RT_ROUNDUP warning

This warning is at odds with how the world works.  Also, the code is
correct on all platforms we care about.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agolib: prefix: fix char value size
David Lamparter [Fri, 25 Aug 2017 23:38:10 +0000 (01:38 +0200)]
lib: prefix: fix char value size

There are 16 bytes here, not 8.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agobgpd: encap: fix extension sizing
David Lamparter [Fri, 25 Aug 2017 23:27:22 +0000 (01:27 +0200)]
bgpd: encap: fix extension sizing

Variably-sized struct tails are done as [0], not [1].  The latter
triggers compiler warnings and mis-sizes "sizeof(struct) + n"
expressions.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years ago*: fix compiler warnings
David Lamparter [Fri, 25 Aug 2017 23:14:25 +0000 (01:14 +0200)]
*: fix compiler warnings

Specifically, gcc 4.2.1 on OpenBSD 6.0 warns about these;  they're bogus
(gcc 4.2, being rather old, isn't quite as "intelligent" as newer
versions; the newer ones apply more logic and less warnings.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoHandle hostname/domainname properly for FreeBSD
Mitesh Kanjariya [Fri, 25 Aug 2017 23:36:31 +0000 (16:36 -0700)]
Handle hostname/domainname properly for FreeBSD

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agoFix compilation errors for domainname
Mitesh Kanjariya [Fri, 25 Aug 2017 22:51:16 +0000 (15:51 -0700)]
Fix compilation errors for domainname

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agolib: Fix make check failures
Mitesh Kanjariya [Fri, 25 Aug 2017 22:26:33 +0000 (15:26 -0700)]
lib: Fix make check failures

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agolib: remove static variable from cli matcher
Quentin Young [Fri, 25 Aug 2017 18:08:16 +0000 (14:08 -0400)]
lib: remove static variable from cli matcher

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: fix rare bug in ambiguous command resolution
Quentin Young [Fri, 25 Aug 2017 17:39:13 +0000 (13:39 -0400)]
lib: fix rare bug in ambiguous command resolution

In certain situations, the CLI matcher would not handle ambiguous
commands properly. If it found an ambiguous result in a lower subgraph,
the ambiguous result would not correctly propagate up to previous frames
in the resolution DFS as ambiguous; instead it would propagate up as a
non-match, which could subsequently be overridden by a partial match.

Example CLI space:

  show ip route summary
  show ip route supernet-only
  show ipv6 route summary

Entering `show ip route su` would result in an ambiguous resolution for
the `show ip route` subgraph but would propagate up to the `show ip`
subgraph as a no-match, allowing `ip` to partial-match `ipv6` and
execute that command.

In this example entering `show ip route summary` would disambiguate the
`show ip` subgraph. So this bug would only appear when entering input
that caused ambiguities in at least two parallel subgraphs.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1045 from opensourcerouting/clippy-coverity
Donald Sharp [Fri, 25 Aug 2017 17:51:46 +0000 (13:51 -0400)]
Merge pull request #1045 from opensourcerouting/clippy-coverity

clippy: disable unneeded autogenerated code

6 years agoclippy: disable unneeded autogenerated code
David Lamparter [Fri, 25 Aug 2017 16:54:13 +0000 (18:54 +0200)]
clippy: disable unneeded autogenerated code

Coverity is generating a lot of warnings about unused stuff being
around.  Disabling these bits is most easily done by just putting a few
preprocessor directives into the template.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
6 years agoprovide/use API to get hostname/domainname
Mitesh Kanjariya [Mon, 21 Aug 2017 21:56:06 +0000 (14:56 -0700)]
provide/use API to get hostname/domainname

Set default hostname in frr to unix hostname.
Provide APIs to get the hostname/domaninanme
Use this APIs where needed

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agolib/bgpd: provide/use API to get hostname/domainname
Mitesh Kanjariya [Mon, 21 Aug 2017 21:56:06 +0000 (14:56 -0700)]
lib/bgpd: provide/use API to get hostname/domainname

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agoMerge pull request #1037 from donaldsharp/eigrp_split_horizon
Donnie Savage [Thu, 24 Aug 2017 19:39:46 +0000 (15:39 -0400)]
Merge pull request #1037 from donaldsharp/eigrp_split_horizon

Eigrp split horizon and ipv4 to prefix changes approved

6 years agoMerge pull request #1040 from donaldsharp/sgrpt
Jafar Al-Gharaibeh [Thu, 24 Aug 2017 16:41:38 +0000 (11:41 -0500)]
Merge pull request #1040 from donaldsharp/sgrpt

Sgrpt

6 years agopimd: Cleanup S,GRPt prune handling on Mroute Loss
Donald Sharp [Thu, 24 Aug 2017 13:55:19 +0000 (09:55 -0400)]
pimd: Cleanup S,GRPt prune handling on Mroute Loss

1) Clean up display of S,GRPt prune state to be more meaningful
2) Upon receipt of a S,GRPt prune make sure we transition to
   the correct state
3) Upon loss of a S,GRPt prune make sure we transition to
   the correct state as well as immediately send a *,G
   join upstream to propagate the loss of the prune.
4) Removal of a weird S,G state being installed upon
   loss of a S,G RPt prune.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Cleanup a debug for vrf
Donald Sharp [Thu, 24 Aug 2017 13:53:05 +0000 (09:53 -0400)]
pimd: Cleanup a debug for vrf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1038 from donaldsharp/zserv
Renato Westphal [Thu, 24 Aug 2017 13:26:31 +0000 (10:26 -0300)]
Merge pull request #1038 from donaldsharp/zserv

zebra: Fix compiler warnings

6 years agoMerge pull request #1031 from opensourcerouting/small-bits
Donald Sharp [Thu, 24 Aug 2017 12:58:46 +0000 (08:58 -0400)]
Merge pull request #1031 from opensourcerouting/small-bits

small bits

6 years agolib: Fix nexthop num
Donald Sharp [Thu, 24 Aug 2017 12:30:08 +0000 (08:30 -0400)]
lib: Fix nexthop num

If we assign MULTIPATH_NUM to be 256, this causes issues
for us since 256 is bigger than a u_char.  So let's make
the api's multipath_num to be a u_int16_t and pass it
around as a word.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Fix distance comparison
Donald Sharp [Thu, 24 Aug 2017 11:34:21 +0000 (07:34 -0400)]
eigrpd: Fix distance comparison

The distance comparison for when we received an
internal and we already had an internal was
overriding the metrics of the connected.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Fix compiler warning introduced
Donald Sharp [Thu, 24 Aug 2017 00:26:19 +0000 (20:26 -0400)]
eigrpd: Fix compiler warning introduced

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Remove 'struct prefix_ipv4' from eigrp_network.c
Donald Sharp [Wed, 23 Aug 2017 19:39:30 +0000 (15:39 -0400)]
eigrpd: Remove 'struct prefix_ipv4' from eigrp_network.c

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Remove 'struct prefix_ipv4' from eigrp_interface.c
Donald Sharp [Wed, 23 Aug 2017 19:38:29 +0000 (15:38 -0400)]
eigrpd: Remove 'struct prefix_ipv4' from eigrp_interface.c

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Refactor eigrp_network_[un]set to use prefix
Donald Sharp [Wed, 23 Aug 2017 19:35:27 +0000 (15:35 -0400)]
eigrpd: Refactor eigrp_network_[un]set to use prefix

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Refactor eigrp_topoloy_table_lookup_ipv4
Donald Sharp [Wed, 23 Aug 2017 19:31:02 +0000 (15:31 -0400)]
eigrpd: Refactor eigrp_topoloy_table_lookup_ipv4

Allow eigrp_topology_table_lookup_ipv4 to use
'struct prefix'

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Refactor to use 'struct prefix' for eigrp_zebra.h
Donald Sharp [Wed, 23 Aug 2017 18:36:06 +0000 (14:36 -0400)]
eigrpd: Refactor to use 'struct prefix' for eigrp_zebra.h

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Convert pe->destination_ipv4 to pe->destination
Donald Sharp [Wed, 23 Aug 2017 18:19:45 +0000 (14:19 -0400)]
eigrpd: Convert pe->destination_ipv4 to pe->destination

Convert the destination_ipv4 to a struct prefix and just
call it destination.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Use FSM for interface pe already known.
Donald Sharp [Wed, 23 Aug 2017 17:26:50 +0000 (13:26 -0400)]
eigrpd: Use FSM for interface pe already known.

There exists a case where a switch already has
a eigrp_prefix_entry for a interface that is
coming up.

In this situation, we need to use the FSM
to let the connected route take precedence
instead of blindly just updating the world
about it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: No need to create TLV type
Donald Sharp [Tue, 22 Aug 2017 23:48:23 +0000 (19:48 -0400)]
eigrpd: No need to create TLV type

There is no need to create a TLV type to pass in for the
FSM message.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Remove union from FSM msg
Donald Sharp [Tue, 22 Aug 2017 23:19:10 +0000 (19:19 -0400)]
eigrpd: Remove union from FSM msg

Remove the union of passing the TLV and just pass the metric in.

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