]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
7 years agoospfd: OSPFv2 VRF fixesI
Chirag Shah [Fri, 8 Sep 2017 21:59:12 +0000 (14:59 -0700)]
ospfd: OSPFv2 VRF fixesI

Fix ospf interface running config to display vrf
fix clang warnings

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoospfd: OSPFv2 VRF Changes II
Chirag Shah [Thu, 7 Sep 2017 15:08:09 +0000 (08:08 -0700)]
ospfd: OSPFv2 VRF Changes II

Accomodate review comments

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoospfd: fix clang warning & ci-ospf test
Chirag Shah [Wed, 6 Sep 2017 22:11:41 +0000 (15:11 -0700)]
ospfd: fix clang warning & ci-ospf test

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoospfd: OSPFv2 VRF, fix CLAN SA warning
Chirag Shah [Wed, 6 Sep 2017 18:42:20 +0000 (11:42 -0700)]
ospfd: OSPFv2 VRF, fix CLAN SA warning

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoospfd: OSPFv2 VRF Support
Chirag Shah [Fri, 25 Aug 2017 20:51:12 +0000 (13:51 -0700)]
ospfd: OSPFv2 VRF Support

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoMerge pull request #1278 from chiragshah6/ospf_vrf_dev
Jafar Al-Gharaibeh [Tue, 3 Oct 2017 15:41:00 +0000 (10:41 -0500)]
Merge pull request #1278 from chiragshah6/ospf_vrf_dev

ospfd: Fix maxage_lsa lookup key

7 years agoMerge pull request #1263 from vjardin6WIND/cleanup
Quentin Young [Tue, 3 Oct 2017 15:39:59 +0000 (11:39 -0400)]
Merge pull request #1263 from vjardin6WIND/cleanup

Cleanup - scan-build

7 years agoMerge pull request #1262 from dwalton76/vtysh-conft-available2
Jafar Al-Gharaibeh [Tue, 3 Oct 2017 15:34:33 +0000 (10:34 -0500)]
Merge pull request #1262 from dwalton76/vtysh-conft-available2

tools: frr-reload.py should exit(1) if vtysh config mode is locked

7 years agoospfd: Fix maxage_lsa lookup key 1278/head
Chirag Shah [Mon, 2 Oct 2017 21:07:13 +0000 (14:07 -0700)]
ospfd: Fix maxage_lsa lookup key

maxage_lsa using prefix structure to store in route_table.
The lsa pointer is 4-8 bytes depending on arch, but prefix member field
would be 1 byte. Use ptr field of prefix structure to store lsa pointer.
Also memset to initialize to avoid crash on ARM platform as same LSA is
referenced from multiple times during shutdown of ospf.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoMerge pull request #1259 from qlyoung/vtysh-warn-mi
Jafar Al-Gharaibeh [Mon, 2 Oct 2017 20:19:21 +0000 (15:19 -0500)]
Merge pull request #1259 from qlyoung/vtysh-warn-mi

vtysh: 'x not running' redux

7 years agoMerge pull request #1250 from chiragshah6/ospf_vrf_dev
Jafar Al-Gharaibeh [Mon, 2 Oct 2017 19:03:42 +0000 (14:03 -0500)]
Merge pull request #1250 from chiragshah6/ospf_vrf_dev

ospfd: fix virtual-link config command

7 years agoMerge pull request #1277 from donaldsharp/zebra_crash
Renato Westphal [Mon, 2 Oct 2017 17:05:54 +0000 (14:05 -0300)]
Merge pull request #1277 from donaldsharp/zebra_crash

Zebra crash and valgrind issues

7 years agoospfd: ospf use macro for authentication 1250/head
Chirag Shah [Mon, 2 Oct 2017 16:17:33 +0000 (09:17 -0700)]
ospfd: ospf use macro for authentication

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoMerge pull request #1254 from donaldsharp/irdp_no_crash
Renato Westphal [Mon, 2 Oct 2017 15:41:24 +0000 (12:41 -0300)]
Merge pull request #1254 from donaldsharp/irdp_no_crash

zebra: Fix irdp so it doesn't crash when looked at

7 years agozebra: Cleanup ptm memory *after* we tell the sockets to clean up 1277/head
Donald Sharp [Mon, 2 Oct 2017 14:47:25 +0000 (10:47 -0400)]
zebra: Cleanup ptm memory *after* we tell the sockets to clean up

The zebra_ptm_finish() code was being called before the
client_list deletion.  The client_list deletion is
attempting to call the ptm daemon and shut down the connection.
We should not be doing this *after* we shut down memory associated
with it as that we were writing into memory in random spots
in this case.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Properly initialize memory for rtadv
Donald Sharp [Mon, 2 Oct 2017 14:45:30 +0000 (10:45 -0400)]
zebra: Properly initialize memory for rtadv

The adata pointer was not properly being set to
0 before being used.  In addition notice malloc
failure and hard exit.  If we have no memory on
startup something terrible has gone wrong and
we were going to crash shortly here anyways.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #1276 from opensourcerouting/isis-fix-vertex-queue
Donald Sharp [Mon, 2 Oct 2017 14:51:07 +0000 (10:51 -0400)]
Merge pull request #1276 from opensourcerouting/isis-fix-vertex-queue

isisd: fix vertex queue comparator

7 years agozebra: Fix valgrind report of unintialized data
Donald Sharp [Mon, 2 Oct 2017 14:42:53 +0000 (10:42 -0400)]
zebra: Fix valgrind report of unintialized data

When calling the kernel we are not properly initializing
iov and msg on function startup.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoisisd: fix vertex queue comparator 1276/head
Christian Franke [Mon, 2 Oct 2017 14:01:58 +0000 (16:01 +0200)]
isisd: fix vertex queue comparator

While vertizes should be strictly ordered on insertion, deletion
will of course encouter equality.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoscan-build: fix warning 1263/head
Vincent JARDIN [Wed, 27 Sep 2017 22:18:36 +0000 (00:18 +0200)]
scan-build: fix warning

Do not change the implementation, just fix scan-build/clang warning.

7 years agoospf_packet: scan-build/clang clean up
Vincent JARDIN [Wed, 27 Sep 2017 22:05:52 +0000 (00:05 +0200)]
ospf_packet: scan-build/clang clean up

get the code safer using snprintf().

7 years agoscan-build: cleanup some warnings
Vincent JARDIN [Wed, 27 Sep 2017 21:38:19 +0000 (23:38 +0200)]
scan-build: cleanup some warnings

Current cleanup is for unset values or variables that are not used anymore.

Regarding ospfd/ospf_vty.c: argv_find()
  we'll never get it NULL, so get coststr = argv[idx]->arg;

7 years agosha256: fix clang warning
Vincent JARDIN [Wed, 27 Sep 2017 21:29:49 +0000 (23:29 +0200)]
sha256: fix clang warning

t0 and t1 are not used, but want do really want them to be reset to secure
the stack.
Suggested by Quentin: let's use memset() to be consistent.

7 years agoMerge pull request #1260 from donaldsharp/logrotate
Jafar Al-Gharaibeh [Sun, 1 Oct 2017 03:49:27 +0000 (22:49 -0500)]
Merge pull request #1260 from donaldsharp/logrotate

debian: Fix logrotate when FRR is not running

7 years agoMerge pull request #1265 from donaldsharp/pim_fill
Jafar Al-Gharaibeh [Sun, 1 Oct 2017 03:48:37 +0000 (22:48 -0500)]
Merge pull request #1265 from donaldsharp/pim_fill

pimd: Add 'show ip mroute fill' command

7 years agoMerge pull request #1271 from donaldsharp/multiplier
Jafar Al-Gharaibeh [Sun, 1 Oct 2017 03:47:43 +0000 (22:47 -0500)]
Merge pull request #1271 from donaldsharp/multiplier

lib: Fix abbreviation

7 years agoospfd: fix area virtual-link command
Chirag Shah [Sun, 1 Oct 2017 02:14:18 +0000 (19:14 -0700)]
ospfd: fix area virtual-link command

Adjust to review comments

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoospfd: ospf virtual-link fix
Chirag Shah [Fri, 29 Sep 2017 17:52:11 +0000 (10:52 -0700)]
ospfd: ospf virtual-link fix

Initialize idx to 0 and remove reassignment of idx

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoMerge pull request #1255 from qlyoung/vtysh-remove-double-slash
Renato Westphal [Fri, 29 Sep 2017 17:47:48 +0000 (14:47 -0300)]
Merge pull request #1255 from qlyoung/vtysh-remove-double-slash

vtysh: remove extra / in config path

7 years agolib: Fix abbreviation 1271/head
Donald Sharp [Fri, 29 Sep 2017 15:53:53 +0000 (11:53 -0400)]
lib: Fix abbreviation

The word Multiplier has been abbreviated to 'Mul' in
the output.  This apparently is causing people
angst.  Write word out.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: remove extra / in other paths 1255/head
Quentin Young [Fri, 29 Sep 2017 15:26:11 +0000 (11:26 -0400)]
lib: remove extra / in other paths

Non-integrated config paths need the treatment as well.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #1236 from donaldsharp/interface_startup
Renato Westphal [Fri, 29 Sep 2017 01:04:02 +0000 (22:04 -0300)]
Merge pull request #1236 from donaldsharp/interface_startup

zebra: Do not allow same rib_dest_t be queued multiple times to meta …

7 years agoMerge pull request #1261 from dwalton76/bgpd-4byte-display
Lou Berger [Thu, 28 Sep 2017 21:50:19 +0000 (17:50 -0400)]
Merge pull request #1261 from dwalton76/bgpd-4byte-display

bgpd: fix 4-byte AS display in bestpath-from-AS

7 years agovtysh: more multi-instance fixing 1259/head
Quentin Young [Thu, 28 Sep 2017 18:01:05 +0000 (14:01 -0400)]
vtysh: more multi-instance fixing

Preexisting code to detect commands targeted at wrong instance didn't
work because a command applied to a disconnected vtysh_client counted as
a successful run overriding wrong instance error message

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agopimd: Add 'show ip mroute fill' command 1265/head
Donald Sharp [Thu, 28 Sep 2017 12:05:20 +0000 (08:05 -0400)]
pimd: Add 'show ip mroute fill' command

When displaying the mroute table, add ability to fill
in all the missing data that for human eyes can be assumed.
This will allow people using grep over the command
can get more information.

sharpd@robot ~> sudo vtysh -c "show ip mroute fill"
Source          Group           Proto  Input      Output     TTL  Uptime
*               229.1.1.1       STATIC dum0       enp3s0     1    00:11:07 Default-IP-Routing-Table
*               229.1.1.1       STATIC dum0       virbr0     1    00:01:47 Default-IP-Routing-Table
sharpd@robot ~>

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoospfd: fix ospf virtual-link command options
Chirag Shah [Wed, 27 Sep 2017 20:51:16 +0000 (13:51 -0700)]
ospfd: fix ospf virtual-link command options

use argv_find to extract ospf area virtual-link command options.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agotools: frr-reload.py should exit(1) if vtysh config mode is locked 1262/head
Daniel Walton [Wed, 27 Sep 2017 18:47:47 +0000 (18:47 +0000)]
tools: frr-reload.py should exit(1) if vtysh config mode is locked

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agoMerge pull request #1180 from dwalton76/ipv6-static-route-null0
Renato Westphal [Wed, 27 Sep 2017 16:42:53 +0000 (13:42 -0300)]
Merge pull request #1180 from dwalton76/ipv6-static-route-null0

Ipv6 static route null0

7 years agoMerge pull request #1247 from qlyoung/mcast-boundary-igmp
Jafar Al-Gharaibeh [Wed, 27 Sep 2017 16:42:13 +0000 (11:42 -0500)]
Merge pull request #1247 from qlyoung/mcast-boundary-igmp

pimd: add support for boundaries

7 years agobgpd: fix 4-byte AS display in bestpath-from-AS 1261/head
Daniel Walton [Wed, 27 Sep 2017 16:07:24 +0000 (16:07 +0000)]
bgpd: fix 4-byte AS display in bestpath-from-AS

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Before
======
cel-redxp-10# show ip bgp 20.1.3.0/24
BGP routing table entry for 20.1.3.0/24
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to non peer-group peers:
  top1(10.1.1.2) bottom0(20.1.2.2)
  4294967292
    20.1.2.2 from bottom0(20.1.2.2) (20.1.1.1)
      Origin IGP, metric 0, localpref 100, valid, external,
bestpath-from-AS -4, best
      Community: 99:1
      AddPath ID: RX 0, TX 92
      Last update: Wed Sep 27 16:02:34 2017

cel-redxp-10#

After
=====
cel-redxp-10# show ip bgp 20.1.3.0/24
BGP routing table entry for 20.1.3.0/24
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to non peer-group peers:
  bottom0(20.1.2.2)
  4294967292
    20.1.2.2 from bottom0(20.1.2.2) (20.1.1.1)
      Origin IGP, metric 0, localpref 100, valid, external,
bestpath-from-AS 4294967292, best
      Community: 99:1
      AddPath ID: RX 0, TX 2
      Last update: Wed Sep 27 16:07:09 2017

cel-redxp-10#

7 years agodebian: Fix logrotate when FRR is not running 1260/head
Dave Olson [Wed, 27 Sep 2017 16:01:37 +0000 (12:01 -0400)]
debian: Fix logrotate when FRR is not running

Fix the logrotate script to complete successfully even
if FRR is not currently running.

Signed-off-by: Dave Olson <olson@cumulusnetworks.com>
7 years agovtysh: 'x not running' redux
Quentin Young [Wed, 27 Sep 2017 15:36:22 +0000 (11:36 -0400)]
vtysh: 'x not running' redux

when warning about daemons that are not running, make sure to handle the
multi instance case

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agozebra: split ip route DEFUNs for blackhole, reject, etc 1180/head
Daniel Walton [Wed, 27 Sep 2017 15:35:28 +0000 (15:35 +0000)]
zebra: split ip route DEFUNs for blackhole, reject, etc

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agoMerge pull request #1201 from dwalton76/bgpd-debug-updates-prefix
Renato Westphal [Wed, 27 Sep 2017 15:02:54 +0000 (12:02 -0300)]
Merge pull request #1201 from dwalton76/bgpd-debug-updates-prefix

Bgpd debug updates prefix

7 years agoMerge branch 'master' of https://github.com/dwalton76/frr into bgpd-debug-updates... 1201/head
Daniel Walton [Wed, 27 Sep 2017 13:39:13 +0000 (13:39 +0000)]
Merge branch 'master' of https://github.com/dwalton76/frr into bgpd-debug-updates-prefix

7 years agoMerge pull request #1257 from donaldsharp/pim_bp
Renato Westphal [Wed, 27 Sep 2017 13:36:13 +0000 (10:36 -0300)]
Merge pull request #1257 from donaldsharp/pim_bp

pimd: Some compilers are complaining about my bp

7 years agoMerge branch 'master' into bgpd-debug-updates-prefix
Daniel Walton [Wed, 27 Sep 2017 13:21:26 +0000 (09:21 -0400)]
Merge branch 'master' into bgpd-debug-updates-prefix

7 years agobgpd: remove clippy references in bgp_debug.c
Daniel Walton [Wed, 27 Sep 2017 13:18:43 +0000 (13:18 +0000)]
bgpd: remove clippy references in bgp_debug.c

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agoMerge pull request #1242 from donaldsharp/eigrp_tm
Renato Westphal [Wed, 27 Sep 2017 12:20:51 +0000 (09:20 -0300)]
Merge pull request #1242 from donaldsharp/eigrp_tm

Eigrp tm

7 years agoMerge pull request #1240 from donaldsharp/allow_self_delete
Renato Westphal [Wed, 27 Sep 2017 12:11:11 +0000 (09:11 -0300)]
Merge pull request #1240 from donaldsharp/allow_self_delete

zebra: Do not allow delete of route from kernel in non-startup case

7 years agopimd: Some compilers are complaining about my bp 1257/head
Donald Sharp [Wed, 27 Sep 2017 11:55:53 +0000 (07:55 -0400)]
pimd: Some compilers are complaining about my bp

Fix the bp variable possibly ( yeah not really ) be
initialized upon use.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agovtysh: remove extra / in config path
Quentin Young [Wed, 27 Sep 2017 02:41:47 +0000 (22:41 -0400)]
vtysh: remove extra / in config path

before:

frrdev# do wr
Note: this version of vtysh never writes vtysh.conf
Building Configuration...
Integrated configuration saved to /etc/frr//frr.conf
[OK]
frrdev#

after:

frrdev# do wr
Note: this version of vtysh never writes vtysh.conf
Building Configuration...
Integrated configuration saved to /etc/frr/frr.conf
[OK]
frrdev#

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #1249 from donaldsharp/debugodebug
Renato Westphal [Wed, 27 Sep 2017 01:21:41 +0000 (22:21 -0300)]
Merge pull request #1249 from donaldsharp/debugodebug

Debugodebug

7 years agoMerge pull request #1208 from donaldsharp/multiaccess
Renato Westphal [Wed, 27 Sep 2017 01:14:40 +0000 (22:14 -0300)]
Merge pull request #1208 from donaldsharp/multiaccess

bgpd: Reduce multiaccess_check_v4 overhead for subgroups

7 years agoMerge pull request #1243 from qlyoung/tm-destroy-cond
Renato Westphal [Wed, 27 Sep 2017 00:58:39 +0000 (21:58 -0300)]
Merge pull request #1243 from qlyoung/tm-destroy-cond

lib: destroy threadmaster condition variable

7 years agobgpd: Reduce multiaccess_check_v4 overhead for subgroups 1208/head
Donald Sharp [Wed, 27 Sep 2017 00:06:13 +0000 (20:06 -0400)]
bgpd: Reduce multiaccess_check_v4 overhead for subgroups

Perf results at scale( >1k peers) showed a non-trivial
amount of time spent in bgp_multiaccess_check_v4.  Upon
function examination we are looking up the nexthops
connected node in each call as well as having to unlock
it after each iteration.  Rewrite to lookup the nexthop
node once.

This should reduce the node lookup by aproximately 1/2
which should yield some performance results.  There are
probably better things to do here but would require
deeper thought.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #1248 from vjardin6WIND/cleanup
Donald Sharp [Tue, 26 Sep 2017 23:59:33 +0000 (19:59 -0400)]
Merge pull request #1248 from vjardin6WIND/cleanup

zebra: static ns

7 years agozebra: Fix irdp so it doesn't crash when looked at 1254/head
Donald Sharp [Tue, 26 Sep 2017 23:46:02 +0000 (19:46 -0400)]
zebra: Fix irdp so it doesn't crash when looked at

irdp is crashing because it assumes that people have
configured it in a certain way.  Ensure that this
'way' is honored at least enough so that we don't
crash.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoospfd: fix virtual-link config command
Chirag Shah [Tue, 26 Sep 2017 18:29:33 +0000 (11:29 -0700)]
ospfd: fix virtual-link config command

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agowatchfrr: Add a empty 'show debug..' command 1249/head
Donald Sharp [Tue, 26 Sep 2017 20:29:31 +0000 (16:29 -0400)]
watchfrr: Add a empty 'show debug..' command

Allow watchfrr to silently ignore a 'show debug..' command
for the moment.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agovtysh: Remove double display of daemon info for 'show debugging'
Donald Sharp [Tue, 26 Sep 2017 20:28:08 +0000 (16:28 -0400)]
vtysh: Remove double display of daemon info for 'show debugging'

When entering 'show debugging' we were outputting a line
from vtysh and a line from an individual daemon to show
the fact we were debugging.  A bit overkill.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: static ns 1248/head
Vincent JARDIN [Tue, 26 Sep 2017 20:12:32 +0000 (22:12 +0200)]
zebra: static ns

it only for local usage, only accessors are used.

7 years agozebra: Display if we are debugging zebra vxlan or not
Donald Sharp [Tue, 26 Sep 2017 19:43:23 +0000 (15:43 -0400)]
zebra: Display if we are debugging zebra vxlan or not

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: add support for boundaries 1247/head
Quentin Young [Fri, 1 Sep 2017 18:33:00 +0000 (14:33 -0400)]
pimd: add support for boundaries

Adds the ability to filter PIM Joins & IGMP reports on an interface.
Enabling a multicast boundary on an interface for a particular group
will prevent the interface from appearing in the group's OIL.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #1069 from donaldsharp/rfc_plist
Philippe Guibert [Tue, 26 Sep 2017 15:33:29 +0000 (17:33 +0200)]
Merge pull request #1069 from donaldsharp/rfc_plist

PIM: allow overlapping group ranges for prefix-list and static RP's

7 years agoMerge pull request #1235 from chiragshah6/ospf_vrf_dev
Renato Westphal [Tue, 26 Sep 2017 03:34:04 +0000 (00:34 -0300)]
Merge pull request #1235 from chiragshah6/ospf_vrf_dev

zebra: Nexthop APIs to use correct vrf_id

7 years agolib: destroy threadmaster condition variable 1243/head
Quentin Young [Mon, 25 Sep 2017 20:01:08 +0000 (16:01 -0400)]
lib: destroy threadmaster condition variable

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoeigrpd: Follow other protocol leads and exit when told to 1242/head
Donald Sharp [Mon, 25 Sep 2017 19:43:44 +0000 (15:43 -0400)]
eigrpd: Follow other protocol leads and exit when told to

EIGRP was continuing to run after being told to exit.

Fixes:#1224
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: Free thread_master pointer after free
Donald Sharp [Mon, 25 Sep 2017 19:43:03 +0000 (15:43 -0400)]
lib: Free thread_master pointer after free

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: Set pointer to NULL after free
Donald Sharp [Mon, 25 Sep 2017 19:41:28 +0000 (15:41 -0400)]
lib: Set pointer to NULL after free

list_delete does not set the list pointer to NULL
Thus when we accidently use it later we happily write
off into lala land instead of crashing imediately

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #1213 from opensourcerouting/zebra-netlink
Donald Sharp [Mon, 25 Sep 2017 18:33:14 +0000 (14:33 -0400)]
Merge pull request #1213 from opensourcerouting/zebra-netlink

Misc RIB/Netlink fixes

7 years agoMerge pull request #1239 from pguibert6WIND/fixskipas
Lou Berger [Mon, 25 Sep 2017 18:09:28 +0000 (14:09 -0400)]
Merge pull request #1239 from pguibert6WIND/fixskipas

bgpd: skip run as option can be reused

7 years agobgpd: Fix unused variable
Donald Sharp [Mon, 25 Sep 2017 16:49:10 +0000 (12:49 -0400)]
bgpd: Fix unused variable

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoospf6d: fix heap use after free
Quentin Young [Thu, 21 Sep 2017 20:03:17 +0000 (16:03 -0400)]
ospf6d: fix heap use after free

During the loop we save a pointer to the next route in the table in case
brouter is deleted during the course of the loop iteration. However when
we call ospf6_route_remove this can trigger ospf6_route_remove on other
routes in the table, one of which could be pointed at by said pointer.
Since ospf6_route_next locks the route that it returns, it won't
actually be deleted, instead the refcount will go to 1. In the next loop
iteration, nbrouter becomes brouter, and calling ospf6_route_next on
this one will finally decrement the refcount to 0, resulting in a free,
which causes subsequent reads on brouter to be UAF. Since the route will
have OSPF6_ROUTE_WAS_REMOVED set, provided the memory was not
overwritten before we got there, we'll continue on to the next one so it
is unlikely this will cause a crash in production.

Solution implemented is to check if we've deleted the route and continue
if so.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #1238 from pguibert6WIND/issue_1185
Donald Sharp [Mon, 25 Sep 2017 16:41:28 +0000 (12:41 -0400)]
Merge pull request #1238 from pguibert6WIND/issue_1185

bgpd: vty command fixup for evpn rt5

7 years agobgpd: skip run as option can be reused 1239/head
Philippe Guibert [Mon, 25 Sep 2017 14:13:11 +0000 (16:13 +0200)]
bgpd: skip run as option can be reused

the '-S' option was not usable, whereas it was shown on the vty.
Enable the '-S' option.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agobgpd: vty command fixup for evpn rt5 1238/head
Philippe Guibert [Mon, 25 Sep 2017 16:28:01 +0000 (18:28 +0200)]
bgpd: vty command fixup for evpn rt5

evpn vty command can be used to configure evpn rt5 entries.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agozebra: Do not allow delete of route from kernel in non-startup case 1240/head
Donald Sharp [Mon, 25 Sep 2017 16:28:39 +0000 (12:28 -0400)]
zebra: Do not allow delete of route from kernel in non-startup case

This is a continuation of 915902cb82cfd.  Basically the netlink
read of messages up from the kernel is now noticing the proper
owner of the route.  As such when rib_delete was being called
as part of the upcall from the kernel we were not noticing that
we were the originator and not diss-allowing the rib_delete
from happening.  This restores this behavior that we were getting
pre-915902cb82cfd

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Do not allow same rib_dest_t be queued multiple times to meta queue 1236/head
Donald Sharp [Mon, 25 Sep 2017 12:10:24 +0000 (08:10 -0400)]
zebra: Do not allow same rib_dest_t be queued multiple times to meta queue

If we have already scheduled a node to be on the meta_queue, there is no
need to schedule it up again.

On startup we are calling rib_update() multiple times per connected route.
Due to the multiple ways we can get callbacks for adding a connected route
I decided it was best to just improve meta_queue performance as opposed
to trying to figure out all the different ways across all the platforms
that we can decide that a connected route has changed.  This appears
to solve the issue with a very large # of interfaces coming up
at the same time on startup.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Nexthop APIs to use correct vrf_id 1235/head
Chirag Shah [Sat, 23 Sep 2017 17:44:16 +0000 (10:44 -0700)]
zebra: Nexthop APIs to use correct vrf_id

For unnumbered interface lookup vrf aware interface
info.
Pass vrf aware interface info for route entry's nexthop
ifindex in route add path.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoMerge pull request #1227 from qlyoung/pim-cli-npd
Jafar Al-Gharaibeh [Sun, 24 Sep 2017 03:17:38 +0000 (22:17 -0500)]
Merge pull request #1227 from qlyoung/pim-cli-npd

pimd: fix some null pointer derefs in cli

7 years agoMerge pull request #1231 from opensourcerouting/isis-fixes
Donald Sharp [Sat, 23 Sep 2017 20:47:38 +0000 (16:47 -0400)]
Merge pull request #1231 from opensourcerouting/isis-fixes

Isisd: assorted fixes

7 years agoisisd: ensure fragments get always linked 1231/head
Christian Franke [Sat, 23 Sep 2017 18:01:43 +0000 (20:01 +0200)]
isisd: ensure fragments get always linked

When we receive or generate new versions of fragments which are
curently pending for age out, we need to ensure that they are correctly
linked to their lsp0.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoisisd: cleanup unused variables
Christian Franke [Sat, 23 Sep 2017 17:32:12 +0000 (19:32 +0200)]
isisd: cleanup unused variables

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoisisd: always trigger spf run asynchronously
Christian Franke [Sat, 23 Sep 2017 17:28:48 +0000 (19:28 +0200)]
isisd: always trigger spf run asynchronously

isis_spf_schedule gets called in states where an immediate spf run
will lead to crashes, e.g. from lsp_destroy. Delay the spf execution
until the event calling isis_spf_schedule has run to completion to
avoid this.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoisisd: use only one IP of neighbor as nexthop
Christian Franke [Sat, 23 Sep 2017 17:27:29 +0000 (19:27 +0200)]
isisd: use only one IP of neighbor as nexthop

There is no point in building a multipath route via one neighbor
if there is only one link to the neighbor, but the neighbor has
multiple IPs on that link. So only create one nexthop per link.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoMerge pull request #1222 from opensourcerouting/isis-spf-improvements
Donald Sharp [Sat, 23 Sep 2017 12:06:57 +0000 (08:06 -0400)]
Merge pull request #1222 from opensourcerouting/isis-spf-improvements

isisd: spf improvements

7 years agoMerge pull request #1215 from opensourcerouting/zapi_nexthops
Donald Sharp [Fri, 22 Sep 2017 21:50:06 +0000 (17:50 -0400)]
Merge pull request #1215 from opensourcerouting/zapi_nexthops

*: fix segfault when sending more than MULTIPATH_NUM nexthops

7 years agoMerge pull request #1226 from opensourcerouting/isis-fix-fragment-overflow
Donald Sharp [Fri, 22 Sep 2017 21:44:29 +0000 (17:44 -0400)]
Merge pull request #1226 from opensourcerouting/isis-fix-fragment-overflow

isisd: Don't corrupt generated LSPs if information exceeds capacity

7 years agopimd: fix some null pointer derefs in cli 1227/head
Quentin Young [Fri, 22 Sep 2017 21:15:33 +0000 (17:15 -0400)]
pimd: fix some null pointer derefs in cli

If pim/igmp is not enabled on an interface, the ->info pointer will be
null. Need to check that before dereferencing it.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoisisd: Don't corrupt generated LSPs if information exceeds capacity 1226/head
Christian Franke [Fri, 22 Sep 2017 20:17:20 +0000 (22:17 +0200)]
isisd: Don't corrupt generated LSPs if information exceeds capacity

Standard IS-IS only supports up to 256 fragments per router. Recognize
when the information we want to advertise exceeds 256 fragments and
print a warning in this case instead of overflowing the fragment counter
and overwriting existing LSP fragments.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoisisd: SPF doesn't need to maintain children 1222/head
Christian Franke [Fri, 22 Sep 2017 19:20:26 +0000 (21:20 +0200)]
isisd: SPF doesn't need to maintain children

SPF maintains a datastructure which is never actually read. I think
we can spend CPU more sensibly.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agoisisd: use skiplist to implement ordered list for SPF
Christian Franke [Fri, 22 Sep 2017 19:20:03 +0000 (21:20 +0200)]
isisd: use skiplist to implement ordered list for SPF

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agotests: verify isis_vertex_queue correctness
Christian Franke [Fri, 22 Sep 2017 18:51:40 +0000 (20:51 +0200)]
tests: verify isis_vertex_queue correctness

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agozebra: make rib_add() a simple wrapper for rib_add_multipath() 1213/head
Renato Westphal [Wed, 20 Sep 2017 23:14:38 +0000 (20:14 -0300)]
zebra: make rib_add() a simple wrapper for rib_add_multipath()

Both function were very similar, and as we know code duplication is not
good. As an example, in the past couple of weeks some fixes were made
on rib_add() but not on rib_add_multipath(), causing known bugs to still
exist in a different form.

Instead of merging the two functions into one, let's make rib_add()
call rib_add_multipath() with the appropriate parameters. This way we
remove the code duplication but still keep the easy-to-use rib_add()
function for single-path routes.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: fix detection of duplicate kernel routes (ECMP version)
Renato Westphal [Wed, 20 Sep 2017 22:04:26 +0000 (19:04 -0300)]
zebra: fix detection of duplicate kernel routes (ECMP version)

Fixes the following bug:
% ip route add 50.0.0.0/8 nexthop via 10.0.1.2 nexthop via 10.0.2.2
% ip route replace 50.0.0.0/8 nexthop via 10.0.1.3 nexthop via 10.0.2.3
% ip route replace 50.0.0.0/8 nexthop via 10.0.1.4 nexthop via 10.0.2.4
%
% vtysh -c "show ip route"
[snip]
K * 50.0.0.0/8 [0/0] via 10.0.1.4, rt1-eth1, 00:00:00
  *                  via 10.0.2.4, rt1-eth2, 00:00:00
K * 50.0.0.0/8 [0/0] via 10.0.1.3, rt1-eth1, 00:00:10
  *                  via 10.0.2.3, rt1-eth2, 00:00:10
K>* 50.0.0.0/8 [0/0] via 10.0.1.2, rt1-eth1, 00:00:24
  *                  via 10.0.2.2, rt1-eth2, 00:00:24

Commit a3d18ce6 fixed a similar problem for single-path routes.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agolib: log error details if F_SETLK fails
Renato Westphal [Wed, 20 Sep 2017 17:02:44 +0000 (14:02 -0300)]
lib: log error details if F_SETLK fails

Somehow F_SETLK was failing for me a couple of days ago, and not being
able to see the errno value was frustrating.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: fix multihop/multipath confusion
Renato Westphal [Wed, 20 Sep 2017 16:59:30 +0000 (13:59 -0300)]
zebra: fix multihop/multipath confusion

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: install MPLS LSPs with appropriate protocol type
Renato Westphal [Sat, 16 Sep 2017 00:25:32 +0000 (21:25 -0300)]
zebra: install MPLS LSPs with appropriate protocol type

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agozebra: pay attention to metric from kernel (ECMP version)
Renato Westphal [Tue, 5 Sep 2017 14:38:25 +0000 (11:38 -0300)]
zebra: pay attention to metric from kernel (ECMP version)

Commit f19435a8 fixed rib_add() but didn't fix rib_add_multipath().

While here, remove the unnecessary 'same->table == re->table' check as
it always evaluate to true.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>