Commit Graph

9288 Commits

Author SHA1 Message Date
Renato Westphal
f0722791a0 ldpd: add more filtering options in some "show" commands
Being able to filter the output of some "show" commands is super useful
when troubleshooting large MPLS networks.

Examples:

% show mpls ldp ipv4 binding 10.0.0.48/29 longer-prefixes neighbor 192.168.0.5
AF   Destination          Nexthop         Local Label Remote Label  In Use
ipv4 10.0.0.48/30         192.168.0.5     24          26                no
ipv4 10.0.0.52/30         192.168.0.5     25          27                no

% show mpls ldp ipv4 binding 10.0.0.48/29 longer-prefixes neighbor 192.168.0.5 detail json
{
  "10.0.0.48\/30":{
    "localLabel":"24",
    "advertisedTo":[
      {
        "neighborId":"192.168.0.5"
      }
    ],
    "remoteLabels":[
      {
        "neighborId":"192.168.0.5",
        "label":"26",
        "inUse":0
      }
    ]
  },
  "10.0.0.52\/30":{
    "localLabel":"25",
    "advertisedTo":[
      {
        "neighborId":"192.168.0.5"
      }
    ],
    "remoteLabels":[
      {
        "neighborId":"192.168.0.5",
        "label":"27",
        "inUse":0
      }
    ]
  }
}

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-09-28 21:51:05 -03:00
Renato Westphal
9e452e5dd1 ldpd: improve ordering of interfaces on user output
Before:

debian# show mpls ldp interface
AF   Interface   State  Uptime   Hello Timers  ac
ipv4 rt0-eth0    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth1    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth10   ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth11   ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth2    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth3    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth4    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth5    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth6    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth7    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth8    ACTIVE 00:00:05 5/15           1
ipv4 rt0-eth9    ACTIVE 00:00:05 5/15           1

After:

debian# show mpls ldp interface
AF   Interface   State  Uptime   Hello Timers  ac
ipv4 rt0-eth0    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth1    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth2    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth3    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth4    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth5    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth6    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth7    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth8    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth9    ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth10   ACTIVE 00:00:14 5/15           1
ipv4 rt0-eth11   ACTIVE 00:00:14 5/15           1

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-09-28 21:50:46 -03:00
Lou Berger
2d9c2ae397 Merge pull request #1261 from dwalton76/bgpd-4byte-display
bgpd: fix 4-byte AS display in bestpath-from-AS
2017-09-28 17:50:19 -04:00
Quentin Young
91fd1b8d9c
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>
2017-09-28 14:01:05 -04:00
Donald Sharp
45b7b09283 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>
2017-09-28 08:05:20 -04:00
Chirag Shah
3d1c6dc2c6 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>
2017-09-27 17:33:12 -07:00
Daniel Walton
2f52ad9627 tools: frr-reload.py should exit(1) if vtysh config mode is locked
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2017-09-27 18:47:47 +00:00
Renato Westphal
67c0a9206c Merge pull request #1180 from dwalton76/ipv6-static-route-null0
Ipv6 static route null0
2017-09-27 13:42:53 -03:00
Jafar Al-Gharaibeh
78ab711529 Merge pull request #1247 from qlyoung/mcast-boundary-igmp
pimd: add support for boundaries
2017-09-27 11:42:13 -05:00
Daniel Walton
fb2b09347d 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#
2017-09-27 16:07:24 +00:00
Dave Olson
83aadaa68d 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>
2017-09-27 12:02:58 -04:00
Quentin Young
2a19199407
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>
2017-09-27 11:36:22 -04:00
Daniel Walton
1e058f38c2 zebra: split ip route DEFUNs for blackhole, reject, etc
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2017-09-27 15:35:28 +00:00
Renato Westphal
e74339e235 Merge pull request #1201 from dwalton76/bgpd-debug-updates-prefix
Bgpd debug updates prefix
2017-09-27 12:02:54 -03:00
Daniel Walton
b8d6c2c11e Merge branch 'master' of https://github.com/dwalton76/frr into bgpd-debug-updates-prefix 2017-09-27 13:39:13 +00:00
Renato Westphal
40acdd93b2 Merge pull request #1257 from donaldsharp/pim_bp
pimd: Some compilers are complaining about my bp
2017-09-27 10:36:13 -03:00
Daniel Walton
66b8ce1a17 Merge branch 'master' into bgpd-debug-updates-prefix 2017-09-27 09:21:26 -04:00
Daniel Walton
2a67b9150a bgpd: remove clippy references in bgp_debug.c
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2017-09-27 13:18:43 +00:00
Renato Westphal
f5129394ec Merge pull request #1242 from donaldsharp/eigrp_tm
Eigrp tm
2017-09-27 09:20:51 -03:00
Renato Westphal
310f64be93 Merge pull request #1240 from donaldsharp/allow_self_delete
zebra: Do not allow delete of route from kernel in non-startup case
2017-09-27 09:11:11 -03:00
Donald Sharp
4646b86ab1 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>
2017-09-27 07:55:53 -04:00
Quentin Young
e82314b1bf
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>
2017-09-26 22:41:47 -04:00
Renato Westphal
5f3d15f2c3 Merge pull request #1249 from donaldsharp/debugodebug
Debugodebug
2017-09-26 22:21:41 -03:00
Renato Westphal
3ca34bd8ee Merge pull request #1208 from donaldsharp/multiaccess
bgpd: Reduce multiaccess_check_v4 overhead for subgroups
2017-09-26 22:14:40 -03:00
Renato Westphal
63e4c24f2c Merge pull request #1243 from qlyoung/tm-destroy-cond
lib: destroy threadmaster condition variable
2017-09-26 21:58:39 -03:00
Donald Sharp
65d4e0c69b 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>
2017-09-26 20:06:13 -04:00
Donald Sharp
6988ea42d2 Merge pull request #1248 from vjardin6WIND/cleanup
zebra: static ns
2017-09-26 19:59:33 -04:00
Donald Sharp
e92044cd96 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>
2017-09-26 19:57:27 -04:00
Chirag Shah
65536c82c3 ospfd: fix virtual-link config command
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-09-26 16:00:21 -07:00
Donald Sharp
e1c3bf2477 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>
2017-09-26 16:29:31 -04:00
Donald Sharp
07d3f521d2 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>
2017-09-26 16:28:08 -04:00
Vincent JARDIN
337960dded zebra: static ns
it only for local usage, only accessors are used.
2017-09-26 22:12:32 +02:00
Donald Sharp
95744ad864 zebra: Display if we are debugging zebra vxlan or not
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-26 15:43:23 -04:00
Quentin Young
b0f525a84c
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>
2017-09-26 13:00:52 -04:00
Philippe Guibert
5c4dc90307 Merge pull request #1069 from donaldsharp/rfc_plist
PIM: allow overlapping group ranges for prefix-list and static RP's
2017-09-26 17:33:29 +02:00
Renato Westphal
8a38c34b5a Merge pull request #1235 from chiragshah6/ospf_vrf_dev
zebra: Nexthop APIs to use correct vrf_id
2017-09-26 00:34:04 -03:00
Quentin Young
33844bbe43
lib: destroy threadmaster condition variable
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-09-25 16:01:08 -04:00
Donald Sharp
773829844f 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>
2017-09-25 15:43:44 -04:00
Donald Sharp
e5716b1677 lib: Free thread_master pointer after free
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-25 15:43:03 -04:00
Donald Sharp
1a0a92ea3b 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>
2017-09-25 15:41:28 -04:00
Donald Sharp
5176f7b713 Merge pull request #1213 from opensourcerouting/zebra-netlink
Misc RIB/Netlink fixes
2017-09-25 14:33:14 -04:00
Lou Berger
d614440896 Merge pull request #1239 from pguibert6WIND/fixskipas
bgpd: skip run as option can be reused
2017-09-25 14:09:28 -04:00
Donald Sharp
1ae43f88ea bgpd: Fix unused variable
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-25 12:49:10 -04:00
Quentin Young
33fb59c328 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>
2017-09-25 12:47:45 -04:00
Donald Sharp
5039c9d578 Merge pull request #1238 from pguibert6WIND/issue_1185
bgpd: vty command fixup for evpn rt5
2017-09-25 12:41:28 -04:00
Philippe Guibert
ae520fc763 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>
2017-09-25 18:33:56 +02:00
Philippe Guibert
197cb53000 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>
2017-09-25 18:31:11 +02:00
Donald Sharp
5dfeba1904 zebra: Do not allow delete of route from kernel in non-startup case
This is a continuation of 915902cb82.  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>
2017-09-25 12:28:39 -04:00
Donald Sharp
fd289fc83e zebra: Make admin distance a uint8_t
While u_char is technically a uint8_t in size I would
like to treat and think about the admin distance
as an actual integer value from 0-255, instead
of a char.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-25 08:41:33 -04:00
Donald Sharp
25715c7e50 zebra: Modify metric read to be admin distance and metric
For ZEBRA_ROUTE_KERNEL types:

The metric/priority of the route received from the kernel
is a 32 bit number.  We are going to interpret the high
order byte as the Admin Distance and the low order 3 bytes
as the metric.

This will allow us to do two things:
1) Allow the creation of kernel routes that can be
   overridden by zebra.
2) Allow the old behavior for 'most' kernel route types
   if a user enters 'ip route ...' v4 routes get a metric
   of 0 and v6 routes get a metric of 1024.  Both of these
   values will end up with a admin distance of 0, which
   will cause them to win for the purposes of zebra.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-09-25 08:37:04 -04:00