Commit Graph

202 Commits

Author SHA1 Message Date
David Lamparter
9d303b37d7 Revert "*: reindent pt. 2"
This reverts commit c14777c6bf.

clang 5 is not widely available enough for people to indent with.  This
is particularly problematic when rebasing/adjusting branches.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-22 14:52:33 +02:00
whitespace / reindent
c14777c6bf
*: reindent pt. 2
w/ clang 5

* reflow comments
* struct members go 1 per line
* binpack algo was adjusted
2017-07-17 15:26:02 -04:00
whitespace / reindent
d62a17aede *: reindent
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-17 14:04:07 +02:00
David Lamparter
2d8270596a Merge remote-tracking branch 'frr/master' into newline-redux
Lots of conflicts from CMD_WARNING_CONFIG_FAILED...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 13:07:30 +02:00
David Lamparter
625e016d14 *: remove VTYNL, part 6 of 6
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:20:03 +02:00
David Lamparter
61b7d449bd *: remove VTYNL, part 3 of 6
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:20:03 +02:00
David Lamparter
6d3c2ed4ed *: remove VTYNL, part 1 of 6
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:20:02 +02:00
David Lamparter
181039f3d7 *: ditch vty_outln(), part 2 of 2
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-14 10:19:58 +02:00
Daniel Walton
f1a05de982 vtysh: return non-zero for configuration failures
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>

This allows frr-reload.py (or anything else that scripts via vtysh)
to know if the vtysh command worked or hit an error.
2017-07-13 19:56:08 +00:00
David Lamparter
5c7571d43f *: ditch vty_outln(), part 1 of 2
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-07-13 20:29:22 +02:00
Quentin Young
7111c1a0cd
*: fix excess docstring
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-07-05 15:33:00 -04:00
Quentin Young
e31b6333f4 *: vty_outln (vty, "") --> vty_out (vty, VTYNL)
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29 17:34:56 +00:00
Quentin Young
1318e7c841 *: s/VTY_NEWLINE/VTYNL/g
Should be able to fit more vty_out onto one line now

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29 17:34:54 +00:00
Quentin Young
96ade3ed77 *: use vty_outln
Saves 400 lines

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-06-29 17:31:28 +00:00
Donald Sharp
71007eab71 pimd: Cleanup ifp->info setup
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-06-13 13:28:20 -04:00
David Lamparter
68b2595ec9 Merge pull request #576 from chiragshah6/pim_dev
pimd: pim bfd support
2017-05-30 14:37:08 +02:00
Donald Sharp
4bf6638636 Merge remote-tracking branch 'origin/stable/3.0' 2017-05-19 08:09:42 -04:00
David Lamparter
be1f2d1802 Merge pull request #586 from donaldsharp/msdp_crashalicious
pimd: Fix crash from cli missinterpertation
2017-05-19 13:38:48 +02:00
Donald Sharp
53c438dae2 pimd: Fix crash from cli missinterpertation
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-18 23:06:12 -04:00
David Lamparter
57463530f3 Merge branch 'stable/3.0'
Conflicts:
	ospf6d/ospf6_lsa.c
	ospfd/ospf_vty.c
	zebra/interface.c

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-18 12:28:12 +02:00
David Lamparter
303f85d545 Merge branch 'frr/pull/548' ("Pim dev 3.0 defect fixes")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-18 11:34:50 +02:00
Chirag Shah
ba4eb1bccf pimd: pim bfd support
All PIM Neighbors for a given pim interface is registered with
BFD.
Upon receiving BFD status down event, PIM Neighbor with BFD info is deleted.
Add pim bfd configuraiton (CLI) per interface, '[no] ip pim bfd'

Testing Done:
Configure BFD under PIM interface on all neighbor routers,
check bfd sessions up, remote end unconfigure BFD, results in BFD session down.
Previous state was UP to New state DOWN, results in PIM neighbor delete behind
that particular pim interface.
Pim-smoke Results:
Ran 94 tests in 7409.680s
FAILED (SKIP=8, failures=2)

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-17 22:42:28 -07:00
Donald Sharp
934ec54171 Merge remote-tracking branch 'origin/stable/3.0' 2017-05-17 08:51:25 -04:00
Chirag Shah
30cfe9a291 pimd: fix ip pim hello option does not take in effect
If frr.conf file has pim hello option setup prior to pim sm under an interface, upon frr start/restart hello option cli replayed prior to sm command
from vtysh. Added a code in pim hello option cli handler to create pim vif if it does not exist.

Testing Done:
configure pim hello options before pim sm in frr.conf file and restart frr

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-16 19:30:14 -07:00
Donald Sharp
76ca2fbaa2 pimd: Fix core from json static mroute show
When we have no normal mroutes and only static mroutes
there exists a code path where we attempted to dereference
c_oil when we were showing static mroutes.  Looks like
a cut-n-paste error, we should be using s_route->c_oil there

Ticket: CM-15013
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-16 13:01:14 -04:00
David Lamparter
896014f4bc *: make consistent & update GPLv2 file headers
The FSF's address changed, and we had a mixture of comment styles for
the GPL file header.  (The style with * at the beginning won out with
580 to 141 in existing files.)

Note: I've intentionally left intact other "variations" of the copyright
header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-15 16:37:41 +02:00
Jafar Al-Gharaibeh
54f12d6f77 Merge pull request #435 from chiragshah6/pim_dev
pimd: Introduce show command for protocol counters
2017-05-09 10:50:56 -05:00
Donald Sharp
6281320446 Merge remote-tracking branch 'origin/stable/3.0' 2017-05-08 16:51:21 -04:00
Chirag Shah
0c62a89997 pimd: fix pim ecmp rebalance config write
ip pim ecmp and ip pim ecmp rebalance configuration CLIs were
not adding to Quagga.confg or running configuration.
Added both the configuration write in Config write handler.

Testing Done: Execute configuration cli and verified running config
and Quagga.conf file containing both configuration.

03# show running-config
Building configuration...

Current configuration:
!
ip multicast-routing
ip pim rp 6.0.0.9 230.0.0.0/16
ip pim join-prune-interval 61
ip pim ecmp
ip pim ecmp rebalance
!

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-06 17:38:18 -07:00
Renato Westphal
313605cb92 *: fix a bunch of segfaults detected by a CLI fuzzer
This patch fixes the following segfaults:
zebra aborted: vtysh -c "show ipv6 mroute"
zebra aborted: vtysh -c "configure terminal" -c "debug zebra kernel msgdump"
zebra aborted: vtysh -c "configure terminal" -c "interface eth99" -c "link-params" -c "no packet-loss"
zebra aborted: vtysh -c "configure terminal" -c "interface eth99" -c "link-params" -c "no metric"
zebra aborted: vtysh -c "configure terminal" -c "interface eth99" -c "link-params" -c "no ava-bw"
zebra aborted: vtysh -c "configure terminal" -c "interface eth99" -c "link-params" -c "no res-bw"
zebra aborted: vtysh -c "configure terminal" -c "interface eth99" -c "link-params" -c "no use-bw"
ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "area 1.1.1.1 nssa"
ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "area 4294967295 nssa"
pimd aborted: vtysh -c "show ip msdp sa 1.1.1.1"
pimd aborted: vtysh -c "configure terminal" -c "ip ssmpingd"
pimd aborted: vtysh -c "configure terminal" -c "no ip ssmpingd"
pimd aborted: vtysh -c "configure terminal" -c "no ip msdp mesh-group WORD source"
pimd aborted: vtysh -c "configure terminal" -c "interface eth99" -c "ip pim hello 180"
bgpd aborted: vtysh -c "show bgp l2vpn evpn rd 1:1"
bgpd aborted: vtysh -c "clear vnc nve un *"
bgpd aborted: vtysh -c "clear vnc nve un 1.1.1.1"
bgpd aborted: vtysh -c "clear vnc nve un 2001:db8::1"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 1.1.1.1 lifetime 4294967295"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 1.1.1.1 cost 255 lifetime 4294967295"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 1.1.1.1 cost 255"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 1.1.1.1"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 2001:db8::1 lifetime 4294967295"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 2001:db8::1 cost 255 lifetime 4294967295"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 2001:db8::1 cost 255"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 1.1.1.1 un 2001:db8::1"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 1.1.1.1 lifetime 4294967295"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 1.1.1.1 cost 255 lifetime 4294967295"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 1.1.1.1 cost 255"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 1.1.1.1"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 2001:db8::1 lifetime 4294967295"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 2001:db8::1 cost 255 lifetime 4294967295"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 2001:db8::1 cost 255"
bgpd aborted: vtysh -c "add vnc mac 11:11:11:11:11:11 virtual-network-identifier 4294967295 vn 2001:db8::1 un 2001:db8::1"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export bgp ipv4 prefix-list NAME"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export bgp ipv6 prefix-list NAME"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export bgp route-map NAME"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export zebra ipv4 prefix-list NAME"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export zebra ipv6 prefix-list NAME"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp 1" -c "no vnc export zebra route-map NAME"
bgpd aborted: vtysh -c "configure terminal" -c "route-map RMAP permit 1" -c "no set ipv6 vpn next-hop"
bgpd aborted: vtysh -c "configure terminal" -c "route-map RMAP permit 1" -c "set vpnv4 next-hop"
bgpd aborted: vtysh -c "configure terminal" -c "route-map RMAP permit 1" -c "set vpnv6 next-hop"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp" -c "address-family ipv6 vpn" -c "network 2001:db8::1/128 rd 1:1 tag WORD"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp" -c "address-family vpnv6 unicast" -c "network 2001:db8::1/128 rd 1:1 tag WORD"
bgpd aborted: vtysh -c "configure terminal" -c "router bgp" -c "no neighbor WORD shutdown message MSG..."
bgpd aborted: vtysh -c "configure terminal" -c "router bgp" -c "neighbor WORD shutdown message MSG..."

More to come later.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-05-04 14:39:58 -03:00
Donald Sharp
d476347d5d Merge remote-tracking branch 'origin/stable/3.0' 2017-05-04 13:35:25 -04:00
Jafar Al-Gharaibeh
b063aa2139 Fix: Off by one error, correct index for hold timer
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2017-05-02 17:23:34 -05:00
Donald Sharp
05ba625af7 Merge remote-tracking branch 'origin/stable/3.0' 2017-05-02 15:52:09 -04:00
Jafar Al-Gharaibeh
6a8badfb9b Merge pull request #440 from donaldsharp/afi_safi3
Afi safi3
2017-05-02 14:20:30 -05:00
Donald Sharp
ebe9474310 pimd: Fix cli uplift mistakes
When we uplifted the cli from old -> new, I did not properly
handle the switch from <1-3> to (1-3) for number ranges.

Also fix some minor variable renaming that happened?

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-02 13:58:07 -04:00
Chirag Shah
c645ca8177 pimd: fix compilation failure.
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-02 10:31:10 -07:00
Chirag Shah
07d7a7641c pimd: fix extra space at the end
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-02 10:19:32 -07:00
Chirag Shah
17d86e5038 pimd: fix help string for intf cntrs show cmd
Fix show interface traffic single command help string.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-02 10:15:23 -07:00
Jafar Al-Gharaibeh
846ef66292 Fix: reverse logic of when to pass the supplied group address
This was causing a crash when no group address was passed
   because a garbage pointer valuse was used. It also was ignoring
   the group address when passing one.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2017-05-02 12:15:06 -05:00
Chirag Shah
a5ae6fbede pimd: fix show command for protocol counter
Fix the command syntex for single interface command

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-02 07:29:59 -07:00
Chirag Shah
394381887e pimd: Introduce show command for protocol counters
For all pim enabled interfaces and single pim enable interface command.
Clear command to clear protocol counters stats.

'show ip pim interface traffic {WORD} {json}'

'clear ip pim interface traffic'

Testing Done: bringup Pim configuration and form RPT and SPT and check
show ip pim interface traffic command output,
perform clear form of interface traffic command and
verified all counters reset via show form of command.
tor-21# show ip pim interface traffic swp2

Interface       HELLO            JOIN            PRUNE            REGISTER        REGISTER-STOP    ASSERT
                Rx/Tx            Rx/Tx           Rx/Tx            Rx/Tx             Rx/Tx           Rx/Tx
---------------------------------------------------------------------------------------------------------------
swp2             22/22             0/10            0/0             0/0             0/0             0/0

leaf-22# show ip pim interface traffic swp3

Interface       HELLO            JOIN            PRUNE            REGISTER        REGISTER-STOP    ASSERT
                Rx/Tx            Rx/Tx           Rx/Tx            Rx/Tx             Rx/Tx           Rx/Tx
---------------------------------------------------------------------------------------------------------------
swp3             23/22            10/0             0/0             0/0             0/0             0/0

spine-1#show ip pim interface traffic

Interface       HELLO            JOIN            PRUNE            REGISTER        REGISTER-STOP    ASSERT
                Rx/Tx            Rx/Tx           Rx/Tx            Rx/Tx             Rx/Tx           Rx/Tx
---------------------------------------------------------------------------------------------------------------
br1               0/1              0/0             0/0             0/0             0/0             0/0
lo                0/0              0/0             0/0             0/0             0/0             0/0
swp1              0/1              0/0             0/0             0/0             0/0             0/0
swp2              0/1              0/0             0/0             0/0             0/0             0/0

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-05-01 18:47:00 -07:00
Jafar Al-Gharaibeh
71d702a85e Merge branch 'stable/3.0' into pim_dev_3_0 2017-04-28 10:38:05 -05:00
Chirag Shah
36b1fa8631 pimd: Enable igmp on igmp version change cli
Execute ip igmp version 3 under swp interface,
verified show running displayed 'ip igmp' configuration.
Continuous sending group membership, performed 'no ip igmp'
and verified, group membership flushed. Performed
'ip igmp version 3', verified 'show ip igmp groups'
displaying igmp membership re-populated.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-04-25 12:51:48 -07:00
Chirag Shah
633988a70d pimd: Pim Nexthop Tracking support with ECMP
In this patch, PIM nexthop tracking uses locally populated nexthop cached list
to determine ECMP based nexthop (w/ ECMP knob enabled), otherwise picks
the first nexthop as RPF.
Introduced '[no] ip pim ecmp' command to enable/disable PIM ECMP knob.
By default, PIM ECMP is disabled.
Intorudced '[no] ip pim ecmp rebalance' command to provide existing mcache
entry to switch new path based on hash chosen path.
Introduced, show command to display pim registered addresses and respective nexthops.
Introuduce, show command to find nexthop and out interface for (S,G) or (RP,G).
Re-Register an address with nexthop when Interface UP event received,
to ensure the PIM nexthop cache is updated (being PIM enabled).
During PIM neighbor UP, traverse all RPs and Upstreams nexthop and determine, if
any of nexthop's IPv4 address changes/resolves due to neigbor UP event.

Testing Done: Run various LHR, RP and FHR related cases to resolve RPF using
nexthop cache with ECMP knob disabled, performed interface/PIM neighbor flap events.
Executed pim-smoke with knob disabled.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
(cherry picked from commit cba4448178)
2017-04-25 12:51:18 -07:00
Renato Westphal
94f6a203b7 Merge pull request #345 from chiragshah6/pim_dev
pimd: Pim ECMP changes along with nexthop tracking using cached DB
2017-04-24 16:59:58 -03:00
Donald Sharp
df94f9a91d pimd: Add prefix list handling to spt-switchover
To the 'ip pim spt-switchover infinity-and-beyond' command
add 'prefix-list <PLIST>'. To the command.

Use this as the basis to deny (Not immediate switchover)
or permit (Immediate switchover), based upon matching
the group address and the prefix-list.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-04-20 15:55:50 -04:00
Quentin Young
9ea49d61d2 pimd: fix 'show ip msdp sa ...'
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-04-17 19:24:28 +00:00
Quentin Young
529aa94e24 pimd: fix off-by-one in no ip pim rp ...
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-04-15 06:23:22 +00:00
Jafar Al-Gharaibeh
b43d5ea330 Merge pull request #304 from donaldsharp/pim_5549
Pim 5549 Additions
2017-04-10 11:07:58 -05:00
Donald Sharp
4390fb9991 pimd: Fix various sizeof and buffer length issues
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-04-06 17:57:24 -04:00