]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
7 years agoMerge pull request #345 from chiragshah6/pim_dev
Renato Westphal [Mon, 24 Apr 2017 19:59:58 +0000 (16:59 -0300)]
Merge pull request #345 from chiragshah6/pim_dev

pimd: Pim ECMP changes along with nexthop tracking using cached DB

7 years agoMerge remote-tracking branch 'origin/stable/3.0'
Donald Sharp [Wed, 19 Apr 2017 11:43:30 +0000 (07:43 -0400)]
Merge remote-tracking branch 'origin/stable/3.0'

7 years agoMerge pull request #373 from qlyoung/fix-no-pim-rp
Russ White [Wed, 19 Apr 2017 11:16:22 +0000 (07:16 -0400)]
Merge pull request #373 from qlyoung/fix-no-pim-rp

pimd: fix some pim commands

7 years agoMerge pull request #374 from qlyoung/pqueue-linear-remove
Russ White [Wed, 19 Apr 2017 11:04:04 +0000 (07:04 -0400)]
Merge pull request #374 from qlyoung/pqueue-linear-remove

lib: add removal by item to pqueue

7 years agoMerge pull request #379 from pguibert6WIND/frrouting_issue309_2
Russ White [Wed, 19 Apr 2017 10:58:48 +0000 (06:58 -0400)]
Merge pull request #379 from pguibert6WIND/frrouting_issue309_2

vtysh: remove deprecated HAVE_EVPN flag

7 years agovtysh: remove deprecated HAVE_EVPN flag
Philippe Guibert [Wed, 12 Apr 2017 13:22:41 +0000 (15:22 +0200)]
vtysh: remove deprecated HAVE_EVPN flag

This flag prevents from entering into evpn address-family node, when
calling command from vtysh.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agoMerge pull request #315 from LabNConsulting/working/master/patch/bgp-startup
Donald Sharp [Tue, 18 Apr 2017 16:14:58 +0000 (12:14 -0400)]
Merge pull request #315 from LabNConsulting/working/master/patch/bgp-startup

Restore functionality broken/overridden by 857b5446497505f582417e4a5ada029712743cbc

7 years agoMerge remote-tracking branch 'origin/stable/3.0'
Donald Sharp [Mon, 17 Apr 2017 23:12:44 +0000 (19:12 -0400)]
Merge remote-tracking branch 'origin/stable/3.0'

7 years agoMerge pull request #371 from donaldsharp/as_path_fix_3.0
Martin Winter [Mon, 17 Apr 2017 21:47:08 +0000 (14:47 -0700)]
Merge pull request #371 from donaldsharp/as_path_fix_3.0

bgpd: Fix 'set as-path prepend last-as 10'

7 years agopimd: fix 'show ip msdp sa ...'
Quentin Young [Mon, 17 Apr 2017 19:21:06 +0000 (19:21 +0000)]
pimd: fix 'show ip msdp sa ...'

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agolib: add removal by item to pqueue
Quentin Young [Mon, 17 Apr 2017 00:06:02 +0000 (00:06 +0000)]
lib: add removal by item to pqueue

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agopimd: fix off-by-one in `no ip pim rp ...`
Quentin Young [Sat, 15 Apr 2017 06:23:22 +0000 (06:23 +0000)]
pimd: fix off-by-one in `no ip pim rp ...`

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agobgpd: 'show .... bgp regexp WORD' fixed
Donald Sharp [Sat, 15 Apr 2017 00:39:56 +0000 (20:39 -0400)]
bgpd: 'show .... bgp regexp WORD' fixed

The command was always just returning as part of the
bgp_regexp_show function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Fix 'set as-path prepend last-as 10'
Donald Sharp [Sat, 15 Apr 2017 00:13:26 +0000 (20:13 -0400)]
bgpd: Fix 'set as-path prepend last-as 10'

1) Fix missing newline in help string
2) Make the ability to have 10 be consistent with the stable/2.0 branch.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #359 from opensourcerouting/bgpd_largecomm_fix
Donald Sharp [Mon, 10 Apr 2017 23:21:05 +0000 (19:21 -0400)]
Merge pull request #359 from opensourcerouting/bgpd_largecomm_fix

bgpd: fixes for the "show bgp large-community" command

7 years agoMerge pull request #351 from donaldsharp/ospf_fix
Renato Westphal [Mon, 10 Apr 2017 22:06:17 +0000 (19:06 -0300)]
Merge pull request #351 from donaldsharp/ospf_fix

Some Issues fixed

7 years agobgpd: fixes for the "show bgp large-community" command
Renato Westphal [Mon, 10 Apr 2017 15:28:45 +0000 (12:28 -0300)]
bgpd: fixes for the "show bgp large-community" command

* Fix a segfault when the "show bgp large-community" command is given
  without any optional large communities;
* Fix parsing of optional large communities. Without this fix a
  "Large-community malformed" error is shown even for valid large
  communities.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #304 from donaldsharp/pim_5549
Jafar Al-Gharaibeh [Mon, 10 Apr 2017 16:07:58 +0000 (11:07 -0500)]
Merge pull request #304 from donaldsharp/pim_5549

Pim 5549 Additions

7 years agoripd: fix argv index numbers in the redistribute command
Renato Westphal [Sat, 8 Apr 2017 20:52:57 +0000 (17:52 -0300)]
ripd: fix argv index numbers in the redistribute command

Fixes Issue#350

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agolib: Fix debugs to be guarded.
Donald Sharp [Sat, 8 Apr 2017 12:55:40 +0000 (08:55 -0400)]
lib: Fix debugs to be guarded.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoospfd: Fix the 'show ip ospf int ...' command
Donald Sharp [Sat, 8 Apr 2017 12:47:59 +0000 (08:47 -0400)]
ospfd: Fix the 'show ip ospf int ...' command

Fixed output:

robot.cumulusnetworks.com# show ip ospf int
enp0s3 is up
  ifindex 2, MTU 1500 bytes, BW 0 Mbit <UP,BROADCAST,RUNNING,MULTICAST>
  Internet Address 10.0.2.15/24, Broadcast 10.0.2.255, Area 0.0.0.0
  MTU mismatch detection:enabled
  Router ID 192.168.0.1, Network Type BROADCAST, Cost: 10
  Transmit Delay is 1 sec, State Waiting, Priority 1
  No backup designated router on this network
  Multicast group memberships: OSPFAllRouters
  Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5
    Hello due in 9.611s
  Neighbor Count is 0, Adjacent neighbor count is 0
enp0s10 is up
  ifindex 7, MTU 1500 bytes, BW 0 Mbit <UP,BROADCAST,RUNNING,MULTICAST>
  Internet Address 192.168.201.146/24, Broadcast 192.168.201.255, Area 0.0.0.0
  MTU mismatch detection:enabled
  Router ID 192.168.0.1, Network Type BROADCAST, Cost: 10
  Transmit Delay is 1 sec, State Waiting, Priority 1
  No backup designated router on this network
  Multicast group memberships: OSPFAllRouters
  Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5
    Hello due in 7.241s
  Neighbor Count is 0, Adjacent neighbor count is 0

robot.cumulusnetworks.com# show ip ospf int enp0s3
enp0s3 is up
  ifindex 2, MTU 1500 bytes, BW 0 Mbit <UP,BROADCAST,RUNNING,MULTICAST>
  Internet Address 10.0.2.15/24, Broadcast 10.0.2.255, Area 0.0.0.0
  MTU mismatch detection:enabled
  Router ID 192.168.0.1, Network Type BROADCAST, Cost: 10
  Transmit Delay is 1 sec, State Waiting, Priority 1
  No backup designated router on this network
  Multicast group memberships: OSPFAllRouters
  Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5
    Hello due in 2.915s
  Neighbor Count is 0, Adjacent neighbor count is 0

robot.cumulusnetworks.com# show ip ospf int enp0s10 json
{
  "enp0s10":{
    "ifUp":true,
    "ifIndex":7,
    "mtuBytes":1500,
    "bandwidthMbit":0,
    "ifFlags":"<UP,BROADCAST,RUNNING,MULTICAST>",
    "ospfEnabled":true,
    "ipAddress":"192.168.201.146",
    "ipAddressPrefixlen":24,
    "ospfIfType":"Broadcast",
    "localIfUsed":"192.168.201.255",
    "area":"0.0.0.0",
    "routerId":"192.168.0.1",
    "networkType":"BROADCAST",
    "cost":10,
    "transmitDelayMsecs":1000,
    "state":"Waiting",
    "priority":1,
    "mcastMemberOspfAllRouters":true,
    "timerMsecs":100,
    "timerDeadMsecs":25,
    "timerWaitMsecs":25,
    "timerRetransmit":200,
    "timerHelloInMsecs":2106,
    "nbrCount":0,
    "nbrAdjacentCount":0
  }
}
robot.cumulusnetworks.com#

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #347 from qlyoung/ignore-flex-sign-error
Renato Westphal [Fri, 7 Apr 2017 21:48:14 +0000 (18:48 -0300)]
Merge pull request #347 from qlyoung/ignore-flex-sign-error

lib: add #pragma to ignore flex sign cmp error

7 years agolib: add #pragma's to ignore flex sign cmp error
Quentin Young [Fri, 7 Apr 2017 17:40:11 +0000 (17:40 +0000)]
lib: add #pragma's to ignore flex sign cmp error

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge remote-tracking branch 'origin/stable/3.0'
Donald Sharp [Fri, 7 Apr 2017 17:37:01 +0000 (13:37 -0400)]
Merge remote-tracking branch 'origin/stable/3.0'

7 years agopimd: Fix various sizeof and buffer length issues
Donald Sharp [Thu, 6 Apr 2017 21:57:24 +0000 (17:57 -0400)]
pimd: Fix various sizeof and buffer length issues

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #339 from donaldsharp/update_master
Jafar Al-Gharaibeh [Thu, 6 Apr 2017 18:38:44 +0000 (13:38 -0500)]
Merge pull request #339 from donaldsharp/update_master

*: Switchover to 3.1-dev

7 years agoMerge pull request #338 from donaldsharp/3.0_fixes
Jafar Al-Gharaibeh [Thu, 6 Apr 2017 18:38:29 +0000 (13:38 -0500)]
Merge pull request #338 from donaldsharp/3.0_fixes

3.0 fixes

7 years agopimd: Pim Nexthop Tracking support with ECMP
Chirag Shah [Wed, 5 Apr 2017 20:14:12 +0000 (13:14 -0700)]
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>
7 years ago*: Switchover to 3.1-dev
Donald Sharp [Thu, 6 Apr 2017 03:18:12 +0000 (23:18 -0400)]
*: Switchover to 3.1-dev

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years ago*: Switchover to 3.0
Donald Sharp [Thu, 6 Apr 2017 03:18:12 +0000 (23:18 -0400)]
*: Switchover to 3.0

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: Fix missing help strings
Donald Sharp [Thu, 6 Apr 2017 03:08:19 +0000 (23:08 -0400)]
lib: Fix missing help strings

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #337 from donaldsharp/more_spt_more
David Lamparter [Wed, 5 Apr 2017 20:32:46 +0000 (22:32 +0200)]
Merge pull request #337 from donaldsharp/more_spt_more

More spt more

7 years agoMerge pull request #336 from dwalton76/bgpd-allowas-in-removal
David Lamparter [Wed, 5 Apr 2017 20:30:11 +0000 (22:30 +0200)]
Merge pull request #336 from dwalton76/bgpd-allowas-in-removal

bgpd: removing "allowas-in" for peer-group member still allows AS_PATHS

7 years agoMerge pull request #333 from donaldsharp/frr
David Lamparter [Wed, 5 Apr 2017 20:29:39 +0000 (22:29 +0200)]
Merge pull request #333 from donaldsharp/frr

Frr

7 years agoMerge branch 'master' into pim_5549
Donald Sharp [Wed, 5 Apr 2017 16:49:17 +0000 (12:49 -0400)]
Merge branch 'master' into pim_5549

7 years agoMerge pull request #310 from opensourcerouting/thread-prep
Donald Sharp [Wed, 5 Apr 2017 16:39:25 +0000 (12:39 -0400)]
Merge pull request #310 from opensourcerouting/thread-prep

MT preparations

7 years agopimd: Add the ability to never SPT switchover
Donald Sharp [Wed, 5 Apr 2017 16:08:53 +0000 (12:08 -0400)]
pimd: Add the ability to never SPT switchover

Add the ability to allow pim to determine if we should
allow spt-switchover or not on the LHR.

Signed-off-by: Donald Sharp
7 years agopimd: Fix crash when failure to create upstream
Donald Sharp [Thu, 30 Mar 2017 14:50:04 +0000 (10:50 -0400)]
pimd: Fix crash when failure to create upstream

When we have a *,G mroute that starts receiving any particular
S,G, we will get wholepkt callbacks due to the pimreg in the
OIL for the *,G.

So we need to do SPT switchover, but this can fail if we
do not have a path to the S( but we do to the RP!).

In this case fail gracefully.

Ticket: CM-15621
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Allow SPT switchover
Donald Sharp [Thu, 23 Mar 2017 01:07:57 +0000 (21:07 -0400)]
pimd: Allow SPT switchover

This allows SPT switchover for S,G upon receipt of packets
on the LHR.

1) When we create a *,G from a IGMP Group Report, install
the *,G route with the pimreg device on the OIL.

2) When a packet hits the LHR that matches the *,G, we will
get a WHOLEPKT callback from the kernel and if we cannot
find the S,G, that means we have matched it on the LHR via
the *,G mroute.  Create the S,G start the KAT and run
inherited_olist.

3) When the S,G times out, safely remove the S,G via
the KAT expiry

4) When the *,G is removed, remove any S,G associated
with it via the LHR flag.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add # of ifchannels to 'show ip pim int'
Donald Sharp [Fri, 24 Mar 2017 19:10:11 +0000 (15:10 -0400)]
pimd: Add # of ifchannels to 'show ip pim int'

Add the ability to see the number of ifchannels
associated with a particular interface.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: removing "allowas-in" for peer-group member still allows AS_PATHS
Daniel Walton [Wed, 5 Apr 2017 15:19:00 +0000 (15:19 +0000)]
bgpd: removing "allowas-in" for peer-group member still allows AS_PATHS
with our ASN

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
7 years agoMerge pull request #334 from pichuang/typo frr-3.1-dev
Donald Sharp [Wed, 5 Apr 2017 10:08:28 +0000 (06:08 -0400)]
Merge pull request #334 from pichuang/typo

Remove superfluous path and correct groupname

7 years agoRemove superfluous path and correct groupname
Phil Huang [Wed, 5 Apr 2017 08:00:56 +0000 (16:00 +0800)]
Remove superfluous path and correct groupname

Signed-off-by: Phil Huang <phil_huang@edge-core.com>
7 years agodoc: Cleanup 'Build the Software'
Donald Sharp [Wed, 5 Apr 2017 00:36:16 +0000 (20:36 -0400)]
doc: Cleanup 'Build the Software'

The frrouting.org web page:
https://frrouting.org/manual/Build-the-Software.html#Build-the-Software
is built from doc/install.texi.  The output on this page is a bit
missleading, let's clean it up some.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years ago*: Clean up some wrong references
Donald Sharp [Wed, 5 Apr 2017 00:18:24 +0000 (20:18 -0400)]
*: Clean up some wrong references

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #332 from opensourcerouting/snmp-fix
Donald Sharp [Tue, 4 Apr 2017 20:39:56 +0000 (16:39 -0400)]
Merge pull request #332 from opensourcerouting/snmp-fix

fix SNMP build

7 years agoMerge pull request #331 from dwalton76/quagga-reload
David Lamparter [Tue, 4 Apr 2017 19:47:01 +0000 (21:47 +0200)]
Merge pull request #331 from dwalton76/quagga-reload

tools: quagga-reload.py fails to change max-paths

7 years agoMerge pull request #330 from dwalton76/ospf-no-log-adjacency-changes-detail
David Lamparter [Tue, 4 Apr 2017 19:45:14 +0000 (21:45 +0200)]
Merge pull request #330 from dwalton76/ospf-no-log-adjacency-changes-detail

ospfd: "no log-adjacency-changes detail" disables log-adjacency-changes

7 years agoMerge pull request #329 from dwalton76/debug-zebra-nht
David Lamparter [Tue, 4 Apr 2017 19:44:28 +0000 (21:44 +0200)]
Merge pull request #329 from dwalton76/debug-zebra-nht

zebra: "debug zebra nht" is not in the config

7 years agovtysh: Fix build for non-snmp case
Donald Sharp [Tue, 4 Apr 2017 19:20:52 +0000 (15:20 -0400)]
vtysh: Fix build for non-snmp case

The snmp code is being included in the build of the vtysh_cmd.c
irrelevant of whether or not it is needed.  Be a bit smarter
about what files to include.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobuild: fix CFLAGS for snmp modules
David Lamparter [Tue, 4 Apr 2017 19:25:19 +0000 (21:25 +0200)]
build: fix CFLAGS for snmp modules

The SNMP modules include <net-snmp/net-snmp-config.h>, which won't be
found in off-searchpath directories without SNMP_CFLAGS.  Unfortunately
in my tests the files were on the search path even without the flags.

(SNMP_LIBS is not needed because only libfrrsnmp calls into net-snmp
functions.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agotools: quagga-reload.py fails to change max-paths
Daniel Walton [Tue, 4 Apr 2017 18:51:32 +0000 (18:51 +0000)]
tools: quagga-reload.py fails to change max-paths

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoospfd: "no log-adjacency-changes detail" disables log-adjacency-changes
Daniel Walton [Tue, 4 Apr 2017 18:13:43 +0000 (18:13 +0000)]
ospfd: "no log-adjacency-changes detail" disables log-adjacency-changes

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: "debug zebra nht" is not in the config
Daniel Walton [Tue, 4 Apr 2017 18:11:04 +0000 (18:11 +0000)]
zebra: "debug zebra nht" is not in the config

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge branch 'master'
David Lamparter [Tue, 4 Apr 2017 18:04:07 +0000 (20:04 +0200)]
Merge branch 'master'

7 years agobuild: remove wildcards from snapcraft/Makefile.am
David Lamparter [Tue, 4 Apr 2017 16:37:47 +0000 (18:37 +0200)]
build: remove wildcards from snapcraft/Makefile.am

automake does not support globs.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'stable/2.0'
David Lamparter [Tue, 4 Apr 2017 16:34:08 +0000 (18:34 +0200)]
Merge branch 'stable/2.0'

Fixed minor conflicts from "defaults" change on stable.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #294 from opensourcerouting/modules
Donald Sharp [Tue, 4 Apr 2017 15:55:00 +0000 (11:55 -0400)]
Merge pull request #294 from opensourcerouting/modules

Loadable module support

7 years agovtysh: handle "show modules" like "show memory"
David Lamparter [Tue, 4 Apr 2017 14:12:59 +0000 (16:12 +0200)]
vtysh: handle "show modules" like "show memory"

Preface with line identifying which daemon it applies to.
[Also fixes a missed "plugin" -> "module" replace.]

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #322 from qlyoung/fix-distance-commands
David Lamparter [Tue, 4 Apr 2017 13:59:12 +0000 (15:59 +0200)]
Merge pull request #322 from qlyoung/fix-distance-commands

ospfd, ospf6d: fix distance commands

7 years agoMerge pull request #321 from donaldsharp/speed
David Lamparter [Tue, 4 Apr 2017 13:58:11 +0000 (15:58 +0200)]
Merge pull request #321 from donaldsharp/speed

Speedy McSpeederson

7 years agoMerge pull request #314 from donaldsharp/scan-build
David Lamparter [Tue, 4 Apr 2017 13:57:00 +0000 (15:57 +0200)]
Merge pull request #314 from donaldsharp/scan-build

Scan build

7 years agoMerge pull request #324 from opensourcerouting/zebra-v4v6-typos
Donald Sharp [Tue, 4 Apr 2017 13:55:58 +0000 (09:55 -0400)]
Merge pull request #324 from opensourcerouting/zebra-v4v6-typos

zebra: fix v4/v6 typos in some show commands

7 years agozebra: Fix printf formatting
Donald Sharp [Tue, 4 Apr 2017 11:50:31 +0000 (07:50 -0400)]
zebra: Fix printf formatting

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: fix v4/v6 typos in some show commands
Renato Westphal [Tue, 4 Apr 2017 00:14:18 +0000 (21:14 -0300)]
zebra: fix v4/v6 typos in some show commands

This fixes a few problems like this one:
vtysh# show ipv6 route ospf6
Unknown route type

Also, replace SAFI_UNICAST with SAFI_MULTICAST in the "show ipv6 mroute
vrf all" command.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #323 from LabNConsulting/working/master/patch/install1
Donald Sharp [Mon, 3 Apr 2017 22:55:30 +0000 (18:55 -0400)]
Merge pull request #323 from LabNConsulting/working/master/patch/install1

Fix a couple of centos related install issues

7 years agolib, zebra: Fix CR comments
Donald Sharp [Mon, 3 Apr 2017 22:28:26 +0000 (18:28 -0400)]
lib, zebra: Fix CR comments

lib -> Add a bit of documentation about what units we are in.
zebra -> Fix failure case to be a bit better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoredhat/frr.spec.in: fix typo
Lou Berger [Mon, 3 Apr 2017 21:32:03 +0000 (17:32 -0400)]
redhat/frr.spec.in: fix typo

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agodoc: fix some omissions in centos instructions
Lou Berger [Mon, 3 Apr 2017 21:30:31 +0000 (17:30 -0400)]
doc: fix some omissions in centos instructions

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agoospfd, ospf6d: fix distance commands
Quentin Young [Mon, 3 Apr 2017 20:17:12 +0000 (20:17 +0000)]
ospfd, ospf6d: fix distance commands

OSPF distance commands were broken in a variety of ways. Fix 'em.

* `distance ospf` and `distance ospf6` were accepted commands
* Inconsistent doc strings
* Make use of {keyword|tokens}
* Add ability to reset specific distance without specifying a value
  Ex: ~# no distance ospf6 intra

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #316 from qlyoung/fix-logc
Jafar Al-Gharaibeh [Mon, 3 Apr 2017 19:43:50 +0000 (14:43 -0500)]
Merge pull request #316 from qlyoung/fix-logc

lib: fix proto_redistnum() oversight from #257

7 years agozebra: Display new speed information in 'show int..' command
Donald Sharp [Thu, 30 Mar 2017 20:54:15 +0000 (16:54 -0400)]
zebra: Display new speed information in 'show int..' command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Retrieve interface speed when creating interface
Donald Sharp [Thu, 30 Mar 2017 19:51:29 +0000 (15:51 -0400)]
zebra: Retrieve interface speed when creating interface

When we get notification from the kernel about the creation
of a new interface, retrieve the speed of it from the kernel

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib, zebra: Add ability to pass interface speed up from zebra
Donald Sharp [Thu, 30 Mar 2017 19:37:22 +0000 (15:37 -0400)]
lib, zebra: Add ability to pass interface speed up from zebra

This is a prepatory commit for future improvements.

Add a change to the zapi to pass the interface speed up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #311 from opensourcerouting/ldpd-vty-simpl
Donald Sharp [Mon, 3 Apr 2017 17:49:30 +0000 (13:49 -0400)]
Merge pull request #311 from opensourcerouting/ldpd-vty-simpl

ldpd: simplify CLI code + small fixes

7 years agolib: fix proto_redistnum() oversight from #257
Quentin Young [Sun, 2 Apr 2017 23:21:09 +0000 (23:21 +0000)]
lib: fix proto_redistnum() oversight from #257

proto_redistnum() now accepts full protocol strings and not partial
names per #10

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agobgpd: restore -S, --skip_runas options
Lou Berger [Sun, 2 Apr 2017 19:34:55 +0000 (15:34 -0400)]
bgpd: restore  -S, --skip_runas options

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agolib/frr: fix reference to zsuid before it is set
Lou Berger [Sun, 2 Apr 2017 17:57:10 +0000 (13:57 -0400)]
lib/frr: fix reference to zsuid before it is set

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agobgp: fix a couple of instances of bm being used before init'ed
Lou Berger [Sun, 2 Apr 2017 17:55:58 +0000 (13:55 -0400)]
bgp: fix a couple of instances of bm being used before init'ed

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agoRelease: FRR-2.0 frr-2.0
Martin Winter [Sun, 2 Apr 2017 05:22:47 +0000 (22:22 -0700)]
Release: FRR-2.0

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoisisd: Fix some various clang warnings
Donald Sharp [Sat, 1 Apr 2017 12:42:19 +0000 (08:42 -0400)]
isisd: Fix some various clang warnings

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge branch 'master' into pim_5549
Donald Sharp [Sat, 1 Apr 2017 11:58:05 +0000 (07:58 -0400)]
Merge branch 'master' into pim_5549

7 years agolib: fix usage of getgrouplist() in *BSD
Mike Tancsa [Fri, 31 Mar 2017 20:50:35 +0000 (17:50 -0300)]
lib: fix usage of getgrouplist() in *BSD

On BSD systems, the getgrouplist() function returns 0 if successful and
-1 on error.

Linux in the other hand returns *ngroups (the number of groups of which
user is a member) on success and -1 on error.

Given this difference, the most portable way to use getgrouplist()
is use its return value only for checking if it succeeded or not.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agonhrpd: Fix value set but never used.
Donald Sharp [Fri, 31 Mar 2017 21:00:26 +0000 (17:00 -0400)]
nhrpd: Fix value set but never used.

The nbma_addr value is set but never used.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Cleanup termination to avoid possible null ptr deref
Donald Sharp [Fri, 31 Mar 2017 20:56:26 +0000 (16:56 -0400)]
pimd: Cleanup termination to avoid possible null ptr deref

When terminating pim, there existed( albeit small ) the chance
to cause a crash.  Cleanup the termination to not have
that chance.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix incorrect indentation
Donald Sharp [Fri, 31 Mar 2017 20:50:08 +0000 (16:50 -0400)]
pimd: Fix incorrect indentation

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Remove impossible conditions from test
Donald Sharp [Fri, 31 Mar 2017 20:43:36 +0000 (16:43 -0400)]
pimd: Remove impossible conditions from test

It is impossible for the list->cmp function to
ever be handed NULL values as the arguments.

Clean up this in the code.

Additionally consolidate the exact same two functions
into 1 function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Cleanup api and stop crash
Donald Sharp [Fri, 31 Mar 2017 20:38:29 +0000 (16:38 -0400)]
pimd: Cleanup api and stop crash

There is no need for a function that calls another function.

Additionally, nexthop_updates from zebra can be either
ZEBRA_NEXTHOP_UPDATE -or-
ZEBRA_IMPORT_CHECK_UPDATE

If we were to receive a IMPORT_CHECK_UPDATE the code
would cause a immediate crash.  Fix this

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Cleanup unused variable write
Donald Sharp [Fri, 31 Mar 2017 20:28:22 +0000 (16:28 -0400)]
pimd: Cleanup unused variable write

There exists a common pattern in pim where we were setting
a variable to a value in the error case when we would no
longer need it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoldpd: do not consume vty_conf when updating the configuration
Renato Westphal [Thu, 30 Mar 2017 14:33:08 +0000 (11:33 -0300)]
ldpd: do not consume vty_conf when updating the configuration

David Lamparter gave the idea of keeping vty_conf as a permanent copy of
ldpd_conf in order to simplify the CLI code and facilitate the integration
with his cap'n proto framework in the future. Doing this demanded quite
some effort but it was worth it as the code looks much better now.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agobuild: find & use threading library
David Lamparter [Sat, 25 Apr 2015 11:10:36 +0000 (13:10 +0200)]
build: find & use threading library

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: Linux indentation on memory.[ch]
David Lamparter [Fri, 31 Mar 2017 14:37:23 +0000 (16:37 +0200)]
lib: Linux indentation on memory.[ch]

The fact that I originally wrote this in Linux Kernel style and then
reindented it to GNU makes me want to gouge my eyes out every time I
look at it.  Restore original indentation.

[This patch is whitespace-only.]

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: memtypes: restore atomicity
David Lamparter [Wed, 26 Oct 2016 15:19:56 +0000 (17:19 +0200)]
lib: memtypes: restore atomicity

the original version of this code already used _Atomic and atomic_*().
Restore this functionality for future multithreading.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobuild: try to find some kind of atomic ops
David Lamparter [Fri, 29 May 2015 07:56:51 +0000 (09:56 +0200)]
build: try to find some kind of atomic ops

Either one of:
- ISO C11
- gcc __atomic_*
- gcc/clang __sync_*

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoldpd: extend the ldp_config_normalize() function
Renato Westphal [Fri, 31 Mar 2017 01:15:33 +0000 (22:15 -0300)]
ldpd: extend the ldp_config_normalize() function

* remove superfluous parts of the configuration when possible
  (e.g. interfaces that are disabled for both IPv4 and IPv6);
* move the check of whether the pseudowire is active or not from
  merge_l2vpns() to ldp_config_normalize() where it belongs.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: fix configuration of non-existing VPLS interfaces and pseudowires
Renato Westphal [Fri, 31 Mar 2017 00:58:47 +0000 (21:58 -0300)]
ldpd: fix configuration of non-existing VPLS interfaces and pseudowires

If we don't know the ifindex, flags, etc of an interface at the time it's
configured, we should make sure that once this information is available
the appropriate structures are updated.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: remove the interface vty node
Renato Westphal [Thu, 30 Mar 2017 23:26:17 +0000 (20:26 -0300)]
ldpd: remove the interface vty node

ldpd uses a hierarchical configuration model where all commands are
defined inside the "mpls ldp" node and its subnodes. The idea is to keep
all LDP configuration in a single place to keep things simple. With that
said, we can remove the "config-if" node from ldpd because we already
have a separate node ("config-ldp-af-if") for LDP-related interface
specific commands.

Example:
vtysh(config)# mpls ldp
vtysh(config-ldp)# address-family ipv4
vtysh(config-ldp-af)# interface eth1
vtysh(config-ldp-af-if)# discovery hello ?
  holdtime  Hello holdtime
  interval  Hello interval

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agobuild: bump to C11
David Lamparter [Sat, 28 Jan 2017 23:51:45 +0000 (00:51 +0100)]
build: bump to C11

Funnily enough, "gnu11" is gcc's default in 5.x if you don't specify
anything, yet there is no "AC_PROG_CC_C11" in autoconf.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobuild: disable autoconf "-g -O2" default CFLAGS
David Lamparter [Fri, 29 May 2015 00:22:48 +0000 (02:22 +0200)]
build: disable autoconf "-g -O2" default CFLAGS

We have AC_C_FLAG and try -Os before -O2.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: make sure SEGV handler cannot lock up
David Lamparter [Mon, 11 Jan 2016 15:02:49 +0000 (16:02 +0100)]
lib: make sure SEGV handler cannot lock up

Just adding -pthread to gcc options changes libc's behaviour, e.g.
making malloc() use proper locking.  This means a SEGV inside malloc()
(e.g. because malloc bookkeeping structures have been damaged by writing
to a broken pointer) can lead to a lockup by the following chain:

- random_function()
- malloc()
--- SEGV
- core_handler()
- zlog_backtrace_sigsafe()
- backtrace()
- malloc()

This will hang forever waiting for the malloc() lock to be released.

Another failure mode is dynamic linking with lazy binding (-z lazy,
default).  Since backtrace() is seldomly used, this means the call to
backtrace() in the core handler can in fact result in the dynamic linker
trying to resolve the "backtrace" symbol, which can also deadlock.

Add several safeguards to prevent any of this from happening.

(Unfortunately, these are not theoretical issues - I found them by
running into them headfirst.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>