]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
7 years agoMerge pull request #1158 from opensourcerouting/ldpd-label-allocation
Donald Sharp [Wed, 13 Sep 2017 16:24:14 +0000 (12:24 -0400)]
Merge pull request #1158 from opensourcerouting/ldpd-label-allocation

ldpd label allocation

7 years agoMerge pull request #1161 from dslicenc/bgp-vrf-nexthop
Renato Westphal [Wed, 13 Sep 2017 13:46:34 +0000 (10:46 -0300)]
Merge pull request #1161 from dslicenc/bgp-vrf-nexthop

bgpd: fix show ip bgp vrf <vrf> nexthop

7 years agoMerge pull request #1133 from opensourcerouting/shift-sign
Daniel Walton [Tue, 12 Sep 2017 21:48:03 +0000 (17:48 -0400)]
Merge pull request #1133 from opensourcerouting/shift-sign

*: fix be32 reading / 24-bit left shift

7 years agoMerge pull request #1165 from dwalton76/bgpd-vrf-redistribute-static
Renato Westphal [Tue, 12 Sep 2017 18:07:20 +0000 (15:07 -0300)]
Merge pull request #1165 from dwalton76/bgpd-vrf-redistribute-static

zebra: api.vrf_id should be re->vrf_id

7 years agozebra: api.vrf_id should be re->vrf_id
Daniel Walton [Tue, 12 Sep 2017 18:03:07 +0000 (11:03 -0700)]
zebra: api.vrf_id should be re->vrf_id

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
This fixes route redistribution for VRFs

7 years agoMerge pull request #1156 from donaldsharp/cleaner
Renato Westphal [Tue, 12 Sep 2017 15:42:55 +0000 (12:42 -0300)]
Merge pull request #1156 from donaldsharp/cleaner

Some minor cleanups around zebra code

7 years agobgpd: fix show ip bgp vrf <vrf> nexthop
Don Slice [Thu, 7 Sep 2017 19:43:27 +0000 (19:43 +0000)]
bgpd: fix show ip bgp vrf <vrf> nexthop

Problem with not finding the correct bgp instance when doing the command
"show ip bgp vrf <vrf> nexthop" resolved by setting up the arg values
correctly.  Manual testing fine.  bgp-smoke had no new failures.

Ticket: CM-17454
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: CCR-6664
7 years agoldpd: guard the label allocation debug messages
Renato Westphal [Tue, 12 Sep 2017 12:52:20 +0000 (09:52 -0300)]
ldpd: guard the label allocation debug messages

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: fix broken label allocation
Renato Westphal [Tue, 12 Sep 2017 12:46:31 +0000 (09:46 -0300)]
ldpd: fix broken label allocation

Once ldpd allocated label 48 for a given FEC, all subsequent requests
for a new label would return the same value (48). The problem is that
we were left shifting an uint32_t value up to 64 times, losing important
information.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: Fix rib_update_table
Donald Sharp [Mon, 11 Sep 2017 17:29:24 +0000 (13:29 -0400)]
zebra: Fix rib_update_table

We should only be operating RIB_UPDATE_IF_CHANGE on
types that zebra has control of.  We assume that
the calling routing protocol is going to take care
of their own route changes based upon the interface
state change.

Also try to re-organize the code a tiny bit to allow
it to fit better within a tabed world.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Fixup indentation
Donald Sharp [Mon, 11 Sep 2017 17:13:17 +0000 (13:13 -0400)]
zebra: Fixup indentation

RNODE_FOREACH_RE... function calls were not properly being
indented when we switched over to the new format.  Let's fix
this issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Small performance improvement for garbage collection
Donald Sharp [Mon, 11 Sep 2017 15:12:03 +0000 (11:12 -0400)]
zebra: Small performance improvement for garbage collection

There is no need to retrieve the zvrf *unless* we are doing
debugs.  So move the retrieval under the debug statement.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #1154 from donaldsharp/bgp_aspath
David Lamparter [Mon, 11 Sep 2017 09:05:08 +0000 (11:05 +0200)]
Merge pull request #1154 from donaldsharp/bgp_aspath

bgpd: Fix AS_PATH size calculation for long paths

7 years agoMerge pull request #1142 from nkukard/lc-docs-master
David Lamparter [Mon, 11 Sep 2017 09:03:20 +0000 (11:03 +0200)]
Merge pull request #1142 from nkukard/lc-docs-master

docs: Added large-community documentation

7 years agoMerge pull request #1084 from donaldsharp/zebra_frame
David Lamparter [Mon, 11 Sep 2017 09:01:39 +0000 (11:01 +0200)]
Merge pull request #1084 from donaldsharp/zebra_frame

zebra: Fix vty_frame usage in zebra

7 years agoMerge pull request #1149 from qlyoung/fix-thread-master-name-leak
David Lamparter [Mon, 11 Sep 2017 08:47:04 +0000 (10:47 +0200)]
Merge pull request #1149 from qlyoung/fix-thread-master-name-leak

lib: free thread master name

7 years ago*: fix be32 reading / 24-bit left shift
David Lamparter [Thu, 7 Sep 2017 13:58:18 +0000 (15:58 +0200)]
*: fix be32 reading / 24-bit left shift

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: free thread master name
Quentin Young [Fri, 8 Sep 2017 20:39:53 +0000 (16:39 -0400)]
lib: free thread master name

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #1143 from dwalton76/frr-reload-vni
David Lamparter [Fri, 8 Sep 2017 15:35:23 +0000 (17:35 +0200)]
Merge pull request #1143 from dwalton76/frr-reload-vni

tools: frr-reload.py support for vni under 'address-family l2vpn evpn'

7 years agoMerge pull request #1137 from subsecond/documentation
Quentin Young [Fri, 8 Sep 2017 14:59:13 +0000 (10:59 -0400)]
Merge pull request #1137 from subsecond/documentation

Typos and formatting

7 years agotools: frr-reload.py support for vni under 'address-family l2vpn evpn'
Daniel Walton [Fri, 8 Sep 2017 13:27:23 +0000 (13:27 +0000)]
tools: frr-reload.py support for vni under 'address-family l2vpn evpn'

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
7 years agodocs: Added large-community documentation
Nigel Kukard [Fri, 8 Sep 2017 12:24:52 +0000 (12:24 +0000)]
docs: Added large-community documentation

Closes #1140

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Fix AS_PATH size calculation for long paths
Andreas Jaggi [Fri, 8 Sep 2017 11:46:20 +0000 (07:46 -0400)]
bgpd: Fix AS_PATH size calculation for long paths

If you have an AS_PATH with more entries than
what can be written into a single AS_SEGMENT_MAX
it needs to be broken up.  The code that noticed
that the AS_PATH needs to be broken up was not
correctly calculating the size of the resulting
message.  This patch addresses this issue.

This patch was built from an email that Andreas
sent to the dev alias for FRRouting.

Fixes: #1114
Signed-off-by: Andreas Jaggi <aj@open.ch>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoTypos and formatting
Manuel Schweizer [Thu, 7 Sep 2017 17:25:24 +0000 (19:25 +0200)]
Typos and formatting

7 years agoMerge pull request #1118 from opensourcerouting/attr-kill-master
Daniel Walton [Thu, 7 Sep 2017 19:23:28 +0000 (15:23 -0400)]
Merge pull request #1118 from opensourcerouting/attr-kill-master

kill bgp attr badness

7 years agoMerge pull request #1127 from opensourcerouting/connected_duplicates
Daniel Walton [Thu, 7 Sep 2017 19:19:56 +0000 (15:19 -0400)]
Merge pull request #1127 from opensourcerouting/connected_duplicates

zebra: allow multiple connected routes for the same prefix

7 years agoMerge pull request #1124 from donaldsharp/pim_igmp_fix
Renato Westphal [Thu, 7 Sep 2017 18:04:54 +0000 (15:04 -0300)]
Merge pull request #1124 from donaldsharp/pim_igmp_fix

pimd: We do not need to BINDTODEVICE for default vrf

7 years agozebra: allow multiple connected routes for the same prefix
Renato Westphal [Thu, 7 Sep 2017 02:54:06 +0000 (23:54 -0300)]
zebra: allow multiple connected routes for the same prefix

With unnumbered interfaces on Linux we have the same IP address configured
on several different interfaces and hence multiple connected routes for
the same prefix.

With that said, add an exception in rib_add() to allow zebra to keep
track of all connected routes. We don't need to worry about the bugs
reported in a3d18ce because connected routes are always added from the
connected_up() function, and connected_update() already takes care of
handling duplicate addresses per interface.

Fixes #1112.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #1122 from opensourcerouting/non-recursive-3
Donald Sharp [Thu, 7 Sep 2017 15:27:18 +0000 (11:27 -0400)]
Merge pull request #1122 from opensourcerouting/non-recursive-3

non-recursive pimd & tools & watchfrr

7 years agopimd: We do not need to BINDTODEVICE for default vrf
Donald Sharp [Thu, 7 Sep 2017 15:14:30 +0000 (11:14 -0400)]
pimd: We do not need to BINDTODEVICE for default vrf

The changes introduced in PR #1044 caused pim to notice
when a setsockopt call failed.  The kicker here is that
this used to just work because we ignored the issue
pre.  So VRF's need to BINDTODEVICE to get igmp callbacks
but the default vrf does not need to do so.

With the fix we now see IGMP group join:
root@dell-s6000-02 ~/frr# vtysh -c "show ip igmp group"
Interface Address         Group           Mode Timer    Srcs V Uptime
br1       20.0.11.1       232.2.3.4       EXCL 00:04:14    1 3 00:00:05

Fixes: #1121
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobuild: non-recursive pimd
David Lamparter [Thu, 7 Sep 2017 14:14:50 +0000 (16:14 +0200)]
build: non-recursive pimd

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobuild: non-recursive watchfrr & tools
David Lamparter [Wed, 2 Aug 2017 08:54:27 +0000 (10:54 +0200)]
build: non-recursive watchfrr & tools

(also forgot to remove AC_SUBST(ISISD) earlier)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: fix compiler warning
David Lamparter [Thu, 7 Sep 2017 13:31:00 +0000 (15:31 +0200)]
bgpd: fix compiler warning

bgp_route.c:6393:7: error: ‘len’ may be used uninitialized in this function
gcc 5.4.0 isn't intelligent enough to notice it's set on all paths.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: add comment on bgp_attr_intern
David Lamparter [Thu, 7 Sep 2017 13:27:12 +0000 (15:27 +0200)]
bgpd: add comment on bgp_attr_intern

This is confusing enough to warrant a comment.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: remove transit_dup() & cluster_dup()
David Lamparter [Thu, 7 Sep 2017 13:28:35 +0000 (15:28 +0200)]
bgpd: remove transit_dup() & cluster_dup()

These are now unused.  route-maps can't modify these attributes, so
there is no need for _dup functions.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: rip out bgp_attr_deep_dup(), fix table-map
David Lamparter [Thu, 7 Sep 2017 13:19:06 +0000 (15:19 +0200)]
bgpd: rip out bgp_attr_deep_dup(), fix table-map

bgp_attr_deep_dup is based on a misunderstanding of how route-maps work.
They never change actual data, just pointers & fields in "struct attr".
The correct thing to do is copy struct attr and call bgp_attr_flush()
afterwards.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: kill bgp_attr_refcount()
David Lamparter [Thu, 7 Sep 2017 12:24:00 +0000 (14:24 +0200)]
bgpd: kill bgp_attr_refcount()

This attempt at optimization has cost us more than a week's worth of
time on several people hunting down the subtle bug that it was missing
an increment on attr->lcommunity.

This is absolutely not worth the maintenance cost.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: add safety check on ATTR_FLAG_BIT
David Lamparter [Thu, 7 Sep 2017 12:54:42 +0000 (14:54 +0200)]
bgpd: add safety check on ATTR_FLAG_BIT

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #1099 from donaldsharp/hashing
David Lamparter [Thu, 7 Sep 2017 09:35:08 +0000 (11:35 +0200)]
Merge pull request #1099 from donaldsharp/hashing

Hashing

7 years agoMerge pull request #1105 from qlyoung/fixup-hashtable-stats-aaa
David Lamparter [Thu, 7 Sep 2017 09:34:18 +0000 (11:34 +0200)]
Merge pull request #1105 from qlyoung/fixup-hashtable-stats-aaa

vtysh: complete 40818cec

7 years agoMerge pull request #1113 from qlyoung/vtysh-pathspace-fix
David Lamparter [Thu, 7 Sep 2017 09:33:32 +0000 (11:33 +0200)]
Merge pull request #1113 from qlyoung/vtysh-pathspace-fix

vtysh: fix pathspace

7 years agovtysh: fix pathspace
Quentin Young [Wed, 6 Sep 2017 21:33:40 +0000 (17:33 -0400)]
vtysh: fix pathspace

It didn't work

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #1092 from donaldsharp/unreachable
Renato Westphal [Wed, 6 Sep 2017 00:57:44 +0000 (21:57 -0300)]
Merge pull request #1092 from donaldsharp/unreachable

Grab bag of issues

7 years agobgpd: Cleanup rmap name memory leak
Donald Sharp [Fri, 1 Sep 2017 11:58:26 +0000 (07:58 -0400)]
bgpd: Cleanup rmap name memory leak

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoeigrpd: Clean up some new coverity issues
Donald Sharp [Thu, 31 Aug 2017 17:01:35 +0000 (13:01 -0400)]
eigrpd: Clean up some new coverity issues

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add usage of vty_frame for vrf configuration
Donald Sharp [Thu, 31 Aug 2017 16:52:46 +0000 (12:52 -0400)]
pimd: Add usage of vty_frame for vrf configuration

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Allow zebra to delete self originated routes
Donald Sharp [Fri, 1 Sep 2017 14:28:19 +0000 (10:28 -0400)]
zebra: Allow zebra to delete self originated routes

With the change to make zebra pass routes to the kernel
with the 'correct' proto name, it caused zebra to
not properly recognize them on startup again
the next time such that the route would not
be deleted.

Modify rt_netlink.c to notice that we have a
self originated route and to properly mark
the type of route it was.

Modify rib_table_sweep to mark the nexthops
as active so that when we go to delete the
self originated routes it would properly
delete from the kernel.

Fixes: #1061
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agonhrpd: Add hash table names
Donald Sharp [Sun, 3 Sep 2017 23:12:15 +0000 (19:12 -0400)]
nhrpd: Add hash table names

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Add various hash optimizations
Donald Sharp [Sun, 3 Sep 2017 22:57:30 +0000 (18:57 -0400)]
bgpd: Add various hash optimizations

1) Add hash names to all hash_create calls

2) Fix community_hash, ecommunity_hash and lcommunity_hash key
creation

3) Fix output of community and lcommunity iterators( why would
we want to see the memory location of the backet? ).

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Add hash name to mpls hash
Donald Sharp [Sun, 3 Sep 2017 22:55:44 +0000 (18:55 -0400)]
zebra: Add hash name to mpls hash

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: Hash creation cleanup
Donald Sharp [Sun, 3 Sep 2017 22:50:35 +0000 (18:50 -0400)]
lib: Hash creation cleanup

1) Some hash key functions where converting pointers
directly to a 32 bit value via downcasting.  Pointers
are 64 bit on a majority of our platforms.

2) Some hashes were being created with 256 entries,
downsize the hash creation size to more appropriate
values.

3) Add hash names to hash creation so we can watch
the hash via 'show debugging hashtable'

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #1108 from donaldsharp/rip
Renato Westphal [Tue, 5 Sep 2017 18:27:15 +0000 (15:27 -0300)]
Merge pull request #1108 from donaldsharp/rip

ripd: Fix warning about metric value less than 0

7 years agoripd: Fix warning about metric value less than 0
Donald Sharp [Tue, 5 Sep 2017 17:17:47 +0000 (13:17 -0400)]
ripd: Fix warning about metric value less than 0

RIP is testing to ensure that the metric returned
isn't negative.  We should be looking at the returned
value from the cli strtol.

If we get a metric value that is less than zero that
means that we shouldn't use this value in RIP currently.
So signify that by returning mod here.

Fixes: #1107
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #1093 from opensourcerouting/static_blackhole_display
Daniel Walton [Tue, 5 Sep 2017 16:54:05 +0000 (12:54 -0400)]
Merge pull request #1093 from opensourcerouting/static_blackhole_display

zebra: display static blackhole routes consistently

7 years agoMerge pull request #1087 from qlyoung/fix-weirdness
David Lamparter [Tue, 5 Sep 2017 16:19:45 +0000 (18:19 +0200)]
Merge pull request #1087 from qlyoung/fix-weirdness

lib: fix thread scheduling weirdness

7 years agoMerge pull request #1075 from donaldsharp/rip_metric
David Lamparter [Tue, 5 Sep 2017 16:17:52 +0000 (18:17 +0200)]
Merge pull request #1075 from donaldsharp/rip_metric

lib, ospfd, ripd, ripngd:  Fix 'set metric'

7 years agoMerge pull request #1058 from chiragshah6/mdev
David Lamparter [Tue, 5 Sep 2017 16:15:51 +0000 (18:15 +0200)]
Merge pull request #1058 from chiragshah6/mdev

ospfd: fix route_node_get

7 years agovtysh: complete 40818cec
Quentin Young [Tue, 5 Sep 2017 15:50:26 +0000 (11:50 -0400)]
vtysh: complete 40818cec

I missed this in review; the old vtysh command should have been removed
when adding the new one.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agozebra: accept Null0 again in addition to null0
Renato Westphal [Mon, 4 Sep 2017 14:09:35 +0000 (11:09 -0300)]
zebra: accept Null0 again in addition to null0

Restore behavior before commit a830942.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: display static blackhole routes consistently
Renato Westphal [Fri, 1 Sep 2017 17:43:24 +0000 (14:43 -0300)]
zebra: display static blackhole routes consistently

If we configure a static route pointing to null0 and zebra displays
it with the 'blackhole' keyword in the running configuration, the
frr-reload.py script will have issues. Fix this by introducing the
'static_blackhole_type' enum.

Fixes #1091.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #1102 from donaldsharp/eigrp_compile
Renato Westphal [Tue, 5 Sep 2017 13:47:48 +0000 (10:47 -0300)]
Merge pull request #1102 from donaldsharp/eigrp_compile

eigrp: Fix missing neighbor->nexthop changes?

7 years agoMerge pull request #1047 from dwalton76/bgpd-draft-ietf-grow-bgp-gshut-10
Renato Westphal [Tue, 5 Sep 2017 13:20:49 +0000 (10:20 -0300)]
Merge pull request #1047 from dwalton76/bgpd-draft-ietf-grow-bgp-gshut-10

bgpd: implement draft-ietf-grow-bgp-gshut-10

7 years agoMerge pull request #1020 from opensourcerouting/ferr
Donald Sharp [Tue, 5 Sep 2017 11:52:18 +0000 (07:52 -0400)]
Merge pull request #1020 from opensourcerouting/ferr

"ferr" error reporting extensions

7 years agoeigrp: Fix missing neighbor->nexthop changes?
Donald Sharp [Tue, 5 Sep 2017 11:48:52 +0000 (07:48 -0400)]
eigrp: Fix missing neighbor->nexthop changes?

I'm not sure how this was missed or why master
is not failing to compile.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #1051 from donaldsharp/plists
David Lamparter [Tue, 5 Sep 2017 02:41:17 +0000 (04:41 +0200)]
Merge pull request #1051 from donaldsharp/plists

Refactor Access and Prefix Lists application

7 years agoMerge pull request #1086 from donaldsharp/zebra_import
Renato Westphal [Mon, 4 Sep 2017 19:16:53 +0000 (16:16 -0300)]
Merge pull request #1086 from donaldsharp/zebra_import

Zebra import

7 years agoMerge pull request #1095 from LabNConsulting/working/master/patch/grammer
Donald Sharp [Mon, 4 Sep 2017 11:12:59 +0000 (07:12 -0400)]
Merge pull request #1095 from LabNConsulting/working/master/patch/grammer

bgpd rfapi: fixup vnc l2_group config

7 years agoMerge pull request #1096 from opensourcerouting/isisd-fix-solaris-tests
Donald Sharp [Mon, 4 Sep 2017 11:11:08 +0000 (07:11 -0400)]
Merge pull request #1096 from opensourcerouting/isisd-fix-solaris-tests

tests: skip isis tlv fuzztest on SunOS

7 years agoMerge pull request #1090 from opensourcerouting/rib_issues
Donald Sharp [Sun, 3 Sep 2017 21:59:14 +0000 (17:59 -0400)]
Merge pull request #1090 from opensourcerouting/rib_issues

RIB issues

7 years agoMerge pull request #1098 from nkukard/lcommunity-cleanup
Donald Sharp [Sun, 3 Sep 2017 15:29:19 +0000 (11:29 -0400)]
Merge pull request #1098 from nkukard/lcommunity-cleanup

Large community critical fixes and misc cleanups

7 years agobgpd: Fixed some comments in bgp_lcommunity.h
Nigel Kukard [Sun, 3 Sep 2017 06:35:35 +0000 (06:35 +0000)]
bgpd: Fixed some comments in bgp_lcommunity.h

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Fixed incorrect MTYPE being used for large communites
Nigel Kukard [Sun, 3 Sep 2017 05:20:48 +0000 (05:20 +0000)]
bgpd: Fixed incorrect MTYPE being used for large communites

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: rfapi - fix vestige from gratuitous grammar change.
Lou Berger [Sat, 2 Sep 2017 13:41:09 +0000 (09:41 -0400)]
bgpd: rfapi - fix vestige from gratuitous grammar change.

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agobgpd: Fixed pointer calculation issue in lcommunity
Nigel Kukard [Fri, 1 Sep 2017 23:36:11 +0000 (23:36 +0000)]
bgpd: Fixed pointer calculation issue in lcommunity

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agotests: skip isis tlv fuzztest on SunOS
Christian Franke [Thu, 31 Aug 2017 20:45:01 +0000 (22:45 +0200)]
tests: skip isis tlv fuzztest on SunOS

7 years agozebra: add an exception for link-local connected routes
Renato Westphal [Fri, 1 Sep 2017 14:44:22 +0000 (11:44 -0300)]
zebra: add an exception for link-local connected routes

Link-local routes are unique in the sense that they all have the same
prefix but have different nexthops (local interfaces). Add an exception
in rib_add() to allows us to keep track of all of them.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #1088 from opensourcerouting/isis-show-topo-format
Donald Sharp [Fri, 1 Sep 2017 11:49:25 +0000 (07:49 -0400)]
Merge pull request #1088 from opensourcerouting/isis-show-topo-format

isisd: cleanup output of show isis topology

7 years agobgpd: Use lcommunity_new() to allocate new lcommunity
Nigel Kukard [Fri, 1 Sep 2017 02:01:55 +0000 (02:01 +0000)]
bgpd: Use lcommunity_new() to allocate new lcommunity

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agozebra: allow blackhole routes from the kernel to be deleted
Renato Westphal [Fri, 1 Sep 2017 00:13:23 +0000 (21:13 -0300)]
zebra: allow blackhole routes from the kernel to be deleted

Fixes the following bug:
% ip -6 route add unreachable 4000::/64
% ip -6 route del unreachable 4000::/64
% vtysh -c "show ipv6 route"
[snip]
K>* 4000::/64 [0/1024] unreachable (ICMP unreachable)

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: fix detection of duplicate system routes
Renato Westphal [Thu, 31 Aug 2017 20:28:05 +0000 (17:28 -0300)]
zebra: fix detection of duplicate system routes

Fixes the following bugs:

1)
% ip -6 route add 5000::/64 via 3000::2
% ip -6 route replace 5000::/64 via 3000::2
% ip -6 route replace 5000::/64 via 3000::2
% ip -6 route replace 5000::/64 via 3000::2
% ip -6 route replace 5000::/64 via 3000::2
%
% vtysh -c "show ipv6 route"
[snip]
K * 5000::/64 [0/1024] via 3000::2, rt1-eth0
K * 5000::/64 [0/1024] via 3000::2, rt1-eth0
K * 5000::/64 [0/1024] via 3000::2, rt1-eth0
K * 5000::/64 [0/1024] via 3000::2, rt1-eth0
K>* 5000::/64 [0/1024] via 3000::2, rt1-eth0

2)
% ip -6 route add 7000::/64 via 3000::2
% ip -6 route replace 7000::/64 via 3000::3
% ip -6 ro | grep 7000
7000::/64 via 3000::3 dev rt1-eth0 metric 1024  pref medium
%
% vtysh -c "show ipv6 route"
[snip]
K * 7000::/64 [0/1024] via 3000::3, rt1-eth0
K>* 7000::/64 [0/1024] via 3000::2, rt1-eth0

NOTE: the check for ROUTE_ENTRY_REMOVED was redundant as it was already
performed at the beginning of the loop.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: remove refcnt from the route_entry structure
Renato Westphal [Thu, 31 Aug 2017 23:36:14 +0000 (20:36 -0300)]
zebra: remove refcnt from the route_entry structure

This reference counter was introduced in 2001, apparently to solve a
problem with connected routes being added/removed multiple times. The RIB
code changed a lot since then, and giving the current callers of rib_add()
and rib_delete() it's safe to assume that we don't need this anymore.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #1089 from opensourcerouting/zebra-fix-build
Donald Sharp [Fri, 1 Sep 2017 00:02:05 +0000 (20:02 -0400)]
Merge pull request #1089 from opensourcerouting/zebra-fix-build

zebra: fix compiler error introduced by previous commit

7 years agozebra: fix compiler error introduced by previous commit
Renato Westphal [Thu, 31 Aug 2017 23:58:16 +0000 (20:58 -0300)]
zebra: fix compiler error introduced by previous commit

Lesson learned: always wait for the CI tests to finish before merging :)

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #1083 from donaldsharp/unreachable
Renato Westphal [Thu, 31 Aug 2017 23:47:37 +0000 (20:47 -0300)]
Merge pull request #1083 from donaldsharp/unreachable

zebra: Allow bh_type to override nexthop selection

7 years agobgpd: Fixed pointer arithmatic miscalculation
Nigel Kukard [Thu, 31 Aug 2017 09:27:46 +0000 (09:27 +0000)]
bgpd: Fixed pointer arithmatic miscalculation

If we increment PTR by i * size each time, we end up doing 1, 3, 6
etc.

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Fixed incorrect large community pointer calculation
Nigel Kukard [Wed, 30 Aug 2017 07:35:31 +0000 (07:35 +0000)]
bgpd: Fixed incorrect large community pointer calculation

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Fixed incorrect calculation of pointer location
Nigel Kukard [Wed, 30 Aug 2017 09:39:36 +0000 (09:39 +0000)]
bgpd: Fixed incorrect calculation of pointer location

com_index_to_delete[i] holds the location in lcom->val of where the
value is stored, we cannot just increment it by this value on each
iteration as we'll overflow the size of lcom->val.

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Fixed potential memory leak if additive is false
Nigel Kukard [Wed, 30 Aug 2017 07:37:19 +0000 (07:37 +0000)]
bgpd: Fixed potential memory leak if additive is false

The else portion of the IF dups the lc, but doesn't free old

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Fixed potential memory leak if additive is false in normal communities
Nigel Kukard [Wed, 30 Aug 2017 08:27:15 +0000 (08:27 +0000)]
bgpd: Fixed potential memory leak if additive is false in normal communities

The else portion of the IF dups the community, but doesn't free old

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Cleaned up some comments
Nigel Kukard [Wed, 30 Aug 2017 09:29:57 +0000 (09:29 +0000)]
bgpd: Cleaned up some comments

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Fixed typo in comment
Nigel Kukard [Wed, 30 Aug 2017 08:31:45 +0000 (08:31 +0000)]
bgpd: Fixed typo in comment

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Fixed typo in the lc list type being matched on
Nigel Kukard [Wed, 30 Aug 2017 07:44:18 +0000 (07:44 +0000)]
bgpd: Fixed typo in the lc list type being matched on

This should be EXPANDED, not STANDARD.

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: Cleaned up the lcom->size * LCOMMUNITY_SIZE with lcom_length()
Nigel Kukard [Wed, 30 Aug 2017 05:53:37 +0000 (05:53 +0000)]
bgpd: Cleaned up the lcom->size * LCOMMUNITY_SIZE with lcom_length()

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agobgpd: The large community size is easier to read if its using the constant
Nigel Kukard [Wed, 30 Aug 2017 05:40:54 +0000 (05:40 +0000)]
bgpd: The large community size is easier to read if its using the constant

Signed-off-by: Nigel Kukard <nkukard@lbsd.net>
7 years agozebra: Allow bh_type to override nexthop selection
Donald Sharp [Wed, 30 Aug 2017 23:38:22 +0000 (19:38 -0400)]
zebra: Allow bh_type to override nexthop selection

If we've set the bh_type to something besides BLACKHOLE_UNSPEC
due to the received route type being RTN_BLACKHOLE,
RTN_UNREACHABLE or RTN_PROHIBIT then just trust that
the nexthop is just what it is and set accordingly.

Fixes: #1082
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: fix thread scheduling weirdness
Quentin Young [Tue, 29 Aug 2017 18:58:43 +0000 (14:58 -0400)]
lib: fix thread scheduling weirdness

Restores 3.0 behavior in terms of thread scheduling & prioritization.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoisisd: cleanup output of show isis topology
Christian Franke [Thu, 31 Aug 2017 22:57:57 +0000 (00:57 +0200)]
isisd: cleanup output of show isis topology

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agozebra: Add v6 support for import-table
Donald Sharp [Thu, 31 Aug 2017 20:07:36 +0000 (16:07 -0400)]
zebra: Add v6 support for import-table

Now that all rib functions are afi/safi independent,
allow import-table to work with v6 routes too.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years ago*: Cleanup multiple is_default... code
Donald Sharp [Thu, 31 Aug 2017 19:58:31 +0000 (15:58 -0400)]
*: Cleanup multiple is_default... code

There are 3 different implementations of is_prefix.
Standardize on is_prefix_default and fix it's implementation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Clean up indentation
Donald Sharp [Thu, 31 Aug 2017 19:25:54 +0000 (15:25 -0400)]
zebra: Clean up indentation

Code was hard to look at.  Clean up a bit
since I'm going to be in there.

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