]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
8 years agobgpd: Fix startup a bit more
Donald Sharp [Fri, 9 Sep 2016 20:01:27 +0000 (16:01 -0400)]
bgpd: Fix startup a bit more

There were several issues here.  The zprivs_init is being
called *before* the cli is read in to influence the user
we are running as.  This needs to be rectified.  Additionally
we need to move the log creation till after cli arguments
are read.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoospfd: Fix crash with usage of incorrect command
Donald Sharp [Fri, 9 Sep 2016 16:41:35 +0000 (12:41 -0400)]
ospfd: Fix crash with usage of incorrect command

Entering 'show ip ospf interface json' causes ospf
to crash.

Entering 'show ip ospf interface <intf> json' causes
ospf to crash if intf has no neighbors on the otherside

Modify the code to not crash in these cases.

Ticket: CM-12776
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agovrf: add a runtime check before playing with netns
Nicolas Dichtel [Thu, 3 Sep 2015 08:47:43 +0000 (10:47 +0200)]
vrf: add a runtime check before playing with netns

This patch adds a runtime check to determine if netns are available. Some
systems like OpenWRT have the system call setns() but don't have the kernel
option CONFIG_NET_NS enabled.

Reported-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Tested-by: Christian Franke <chris@opensourcerouting.org>
(cherry picked from commit 04a3aabf58d95d01c4c8168eeff43cf9d9892eee)

8 years agolib, vtysh: support multiple VRFs by using linux netns
Feng Lu [Thu, 3 Jul 2014 10:24:34 +0000 (18:24 +0800)]
lib, vtysh: support multiple VRFs by using linux netns

We realize VRFs with linux netns by default. The main job is
to associate a VRF with a netns. Currently this is done by
the configuration:

  [no] vrf N netns <netns-name>

This command is also available in vtysh and goes to only
zebra, because presently only zebra supports multiple VRF.

A file descriptor is added to "struct vrf". This is for the
associated netns file. Once the command "vrf N netns NAME"
is executed, the specified file is opened and the file
descriptor is stored in the VRF N. In this way the
association is formed.

In vrf_socket(), we first switch to the specified VRF by
using the stored file descriptor, and then can allocate
a socket which is working in the associated netns.

Signed-off-by: Feng Lu <lu.feng@6wind.com>
Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
(cherry picked from commit 55cfa2f190620f7c711944637659bc208970324d)

8 years agolib: Create ns.c
Donald Sharp [Sun, 4 Sep 2016 00:45:35 +0000 (20:45 -0400)]
lib: Create ns.c

Create the ns.c files from the original vrf.c code
to allow us to create the 'logical-router' command
to work within namespaces.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: assorted parts of 0abf6796c
Christian Franke [Wed, 24 Aug 2016 15:09:14 +0000 (17:09 +0200)]
zebra: assorted parts of 0abf6796c

    Author: Timo Teräs <timo.teras@iki.fi>
    Date:   Fri Jan 15 17:36:29 2016 +0200

        zebra: atomic FIB updates

        This commit updates the kernel API so that route changes are
        atomically updated using change/replaces messages instead
        of first sending a withdraw followed with update.

        Same for zclient updates, changes are sent as single ADD
        instead of DELETE + ADD.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
8 years agozebra: remove unused code from zebra netlink
Christian Franke [Wed, 24 Aug 2016 13:32:00 +0000 (15:32 +0200)]
zebra: remove unused code from zebra netlink

8 years agobgpd: Allow connections with no v4|6 addr's in some conditions
Donald Sharp [Fri, 9 Sep 2016 15:02:54 +0000 (11:02 -0400)]
bgpd: Allow connections with no v4|6 addr's in some conditions

When compiling/running in with --enable-bgp-standalone=yes allow
v4 sessions to be established with no v4 address configured.
Additionally allow v6 connections with no v6 addresses
configured.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Display 'no neighbor 192.168.33.44 activate'
Donald Sharp [Fri, 9 Sep 2016 13:46:28 +0000 (09:46 -0400)]
bgpd: Display 'no neighbor 192.168.33.44 activate'

Since the default for ipv4 unicast is to now assume
that the neighbor is activated, print out the
no neighbor 192.168.33.44 activate
line when it is explicitly turned off.

Ticket: CM-12809
Reported-by: Lou Berger <lberger@labn.net>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:

8 years agobgpd: Fix standalone to better handle getsockopt failure
Donald Sharp [Fri, 9 Sep 2016 12:48:23 +0000 (08:48 -0400)]
bgpd: Fix standalone to better handle getsockopt failure

When getsockopt(...,SO_BINDTODEVICE,...); fails
assume the bgp instance we are interested is the default
one.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoquagga: remove refix directory from git status
Donald Sharp [Fri, 19 Aug 2016 18:46:34 +0000 (14:46 -0400)]
quagga: remove refix directory from git status

During one of our build processes we are getting
a refix directory in some places.  Remove these
from files that git considers

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 844cbf5d6cdfc6961e99e1c9ed35b826f3aa7562)

8 years agoMerge remote-tracking branch 'origin/cmaster' into cmaster-next
Donald Sharp [Thu, 8 Sep 2016 23:37:42 +0000 (19:37 -0400)]
Merge remote-tracking branch 'origin/cmaster' into cmaster-next

8 years agobgpd: Allow bgp to work standalone
Donald Sharp [Thu, 8 Sep 2016 22:48:02 +0000 (18:48 -0400)]
bgpd: Allow bgp to work standalone

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoquagga-reload.py fails for "net add debug ospf6 lsa as-ext"
Daniel Walton [Thu, 8 Sep 2016 13:16:25 +0000 (13:16 +0000)]
quagga-reload.py fails for "net add debug ospf6 lsa as-ext"

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-12773

- change "as-ext" to "as-external"
- drop "grp-mbr" option, it does not have a handler
- drop "type7" option, it does not have a handler

(cherry picked from commit 51f2d198c24107a91a32764bf0930c2d50954574)

8 years agobgpd: Process directly connected IBGP peers upon interface down
vivek [Thu, 8 Sep 2016 17:03:30 +0000 (10:03 -0700)]
bgpd: Process directly connected IBGP peers upon interface down

When we have a single-hop BFD session for any peering, it really means
that the peering is directly connected (maybe over a L2 network), whether
it is IBGP or EBGP. In such a case, upon link down, immediately process
IBGP peers too (and bring them down), not just EBGP peers.

This change eliminates some peculiar state transitions in specific IBGP
topologies, thus getting rid of the problem of nexthops remaining inactive
in the zebra RIB.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Ticket: CM-12390
Reviewed By: CCR-5156
Testing Done: Manual, bgp-smoke

8 years agolib, bgpd: Log next hops
vivek [Thu, 8 Sep 2016 16:38:53 +0000 (09:38 -0700)]
lib, bgpd: Log next hops

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Ticket: CM-12390
Reviewed By: CCR-5156
Testing Done: Manual

8 years agoquagga-reload.py fails for "net add debug ospf6 lsa as-ext"
Daniel Walton [Thu, 8 Sep 2016 13:16:25 +0000 (13:16 +0000)]
quagga-reload.py fails for "net add debug ospf6 lsa as-ext"

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-12773

- change "as-ext" to "as-external"
- drop "grp-mbr" option, it does not have a handler
- drop "type7" option, it does not have a handler

8 years agobgpd: Enhance path selection logs
vivek [Mon, 5 Sep 2016 17:53:06 +0000 (10:53 -0700)]
bgpd: Enhance path selection logs

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Ticket: CM-12390
Reviewed By: CCR-5136
Testing Done: Manual

(cherry picked from commit a6086ad4084a9dfbf930ef48e2987772767063bd)

8 years agobgpd: Fix route install upon multipath nexthop change
vivek [Mon, 5 Sep 2016 17:49:16 +0000 (10:49 -0700)]
bgpd: Fix route install upon multipath nexthop change

In multipath selection, there can be a scenario where the set of route
entries selected as multipath can be the same (i.e., from the same peers)
but one or more of these may have a change to the BGP next hop. In this
case, the route needs to be installed again in zebra even if the best
route entry selected has not changed, otherwise the zebra RIB may have
a different set of next hops (and first hops) than what the routing
protocol selected.

This patch handles this scenario by re-installing the route if any BGP
attribute has changed for any of the multipaths. Not all BGP attributes
are of relevance to the zebra RIB, but this approach follows existing
logic used in the code (e.g., when BGP attributes for the best route
entry has changed).

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Sid Khot <sidkhot@cumulusnetworks.com>
Ticket: CM-12390
Reviewed By: CCR-5135
Testing Done: Manual, bgp-smoke

(cherry picked from commit e10720512ef744483ffed8a6ef3b529ec97e130d)

8 years agobgpd: Fix route install upon non-best nexthop change
vivek [Mon, 5 Sep 2016 17:35:19 +0000 (10:35 -0700)]
bgpd: Fix route install upon non-best nexthop change

After BGP path selection, even if the best route entry selected has not
changed, ensure that the route is installed again in zebra if any non-best
but multipath route entry has a nexthop resolution change.

In the absence of this fix, if a non-best multipath route entry had a
nexthop resolution change (such as being resolved over two first hops instead
of one), the route would get reinstalled into zebra only in some situations
(i.e., when the best route entry had its IGP change flag set). If the route
does not get reinstalled by BGP, the corresponding route in the zebra RIB
would not have all the first hops.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Sid Khot <sidkhot@cumulusnetworks.com>
Ticket: CM-12390
Reviewed By: CCR-5134
Testing Done: Manual, bgp-smoke

(cherry picked from commit 3064bf43a7d8162dadada2934132f915a45d2bcb)

8 years agoQuagga won't advertise 0.0.0.0/0 with network statement
Daniel Walton [Wed, 31 Aug 2016 12:31:47 +0000 (12:31 +0000)]
Quagga won't advertise 0.0.0.0/0 with network statement

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-12561
(cherry picked from commit 337299a936d9db8951825dcbf3acc4bd3b89ac32)

8 years agozebra: Line up help output better
Donald Sharp [Tue, 6 Sep 2016 19:31:24 +0000 (15:31 -0400)]
zebra: Line up help output better

The -g, --group   line of help didn't line up properly with
the other help output of zebra.  Fix this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agojson support for "show ip route" for "show ipv6 route"
Daniel Walton [Mon, 29 Aug 2016 19:59:53 +0000 (19:59 +0000)]
json support for "show ip route" for "show ipv6 route"

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-12633
(cherry picked from commit 18a4ded2a72cc5613f54845dd29c1ee7d05bbf04)

8 years agobgpd: Fix call of bgp_address_destroy
Donald Sharp [Tue, 6 Sep 2016 00:03:19 +0000 (20:03 -0400)]
bgpd: Fix call of bgp_address_destroy

We were prematurely deleting the bgp->address_hash.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Enhance path selection logs
vivek [Mon, 5 Sep 2016 17:53:06 +0000 (10:53 -0700)]
bgpd: Enhance path selection logs

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Ticket: CM-12390
Reviewed By: CCR-5136
Testing Done: Manual

8 years agobgpd: Fix route install upon multipath nexthop change
vivek [Mon, 5 Sep 2016 17:49:16 +0000 (10:49 -0700)]
bgpd: Fix route install upon multipath nexthop change

In multipath selection, there can be a scenario where the set of route
entries selected as multipath can be the same (i.e., from the same peers)
but one or more of these may have a change to the BGP next hop. In this
case, the route needs to be installed again in zebra even if the best
route entry selected has not changed, otherwise the zebra RIB may have
a different set of next hops (and first hops) than what the routing
protocol selected.

This patch handles this scenario by re-installing the route if any BGP
attribute has changed for any of the multipaths. Not all BGP attributes
are of relevance to the zebra RIB, but this approach follows existing
logic used in the code (e.g., when BGP attributes for the best route
entry has changed).

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Sid Khot <sidkhot@cumulusnetworks.com>
Ticket: CM-12390
Reviewed By: CCR-5135
Testing Done: Manual, bgp-smoke

8 years agobgpd: Fix route install upon non-best nexthop change
vivek [Mon, 5 Sep 2016 17:35:19 +0000 (10:35 -0700)]
bgpd: Fix route install upon non-best nexthop change

After BGP path selection, even if the best route entry selected has not
changed, ensure that the route is installed again in zebra if any non-best
but multipath route entry has a nexthop resolution change.

In the absence of this fix, if a non-best multipath route entry had a
nexthop resolution change (such as being resolved over two first hops instead
of one), the route would get reinstalled into zebra only in some situations
(i.e., when the best route entry had its IGP change flag set). If the route
does not get reinstalled by BGP, the corresponding route in the zebra RIB
would not have all the first hops.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Sid Khot <sidkhot@cumulusnetworks.com>
Ticket: CM-12390
Reviewed By: CCR-5134
Testing Done: Manual, bgp-smoke

8 years agoisisd: Remove impossible code
Donald Sharp [Mon, 5 Sep 2016 00:13:43 +0000 (20:13 -0400)]
isisd: Remove impossible code

te->sub_tlvs can never be NULL as that it is an
array.  Remove dead code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Fix crash in 'show ip nexthop'
Donald Sharp [Mon, 5 Sep 2016 00:05:16 +0000 (20:05 -0400)]
bgpd: Fix crash in 'show ip nexthop'

With the addition of the AFI_ETHER we need
to initialize the appropriate tables for
nexthop's.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Remove unnecessary log
Donald Sharp [Sun, 4 Sep 2016 22:46:27 +0000 (18:46 -0400)]
zebra: Remove unnecessary log

Removing unnecessary zlog_info line from
zebra.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: fix bug in ecommunity_match
Renato Westphal [Wed, 27 Jun 2012 20:18:08 +0000 (17:18 -0300)]
bgpd: fix bug in ecommunity_match

The offset used to compare extended communities should be increased by
steps of ECOMMUNITY_SIZE and not one by one.

8 years agobgpd: Addition of bgp dampening configuration commands under IPv4 Multicast address...
Balaji [Wed, 20 Jan 2016 17:29:27 +0000 (22:59 +0530)]
bgpd: Addition of bgp dampening configuration commands under IPv4 Multicast address family mode.

Signed-off-by: Balaji Gurudoss <balajig81@gmail.com>
Signed-off-by: Balaji Gurudoss <balajig81@gmail.com>
Tested-by: NetDEF CI System <cisystem@netdef.org>
8 years agobgpd: Addition of dampening show commands under v4 unicast/multicast tree
Balaji [Wed, 20 Jan 2016 17:29:26 +0000 (22:59 +0530)]
bgpd: Addition of dampening show commands under v4 unicast/multicast tree

Patch contains addition of show ip bgp ipv4 (unicast| multicast)
dampening tree.

Signed-off-by: Balaji Gurudoss <balajig81@gmail.com>
Signed-off-by: Balaji Gurudoss <balajig81@gmail.com>
8 years agobuild: detect and create AM_SILENT_RULES macro if needed
Pawel Wieczorkiewicz [Fri, 1 Apr 2016 10:54:38 +0000 (12:54 +0200)]
build: detect and create AM_SILENT_RULES macro if needed

Older libs have problem with that:
configure.ac:17: warning: macro `AM_SILENT_RULES'
  not found in library
...
configure.ac:24: error: possibly undefined macro:
   AM_SILENT_RULES
Tested-by: NetDEF CI System <cisystem@netdef.org>
8 years agobgpd: Add new configuration cli for graceful restart.
Philippe Guibert [Tue, 24 May 2016 14:52:02 +0000 (16:52 +0200)]
bgpd: Add new configuration cli for graceful restart.

There is support to configure graceful restart timer. This is the
time to wait to delete stale routes before a BGP open message is
received.

bgp graceful-restart restart-time <1-3600>
no bgp graceful-restart [<1-255>]

* bgpd/bgp_vty.c
  * Define command strings for above CLI
* bgpd/bgpd.c
  * bgp_config_write(): Output graceful restart-time configuration

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Tested-by: NetDEF CI System <cisystem@netdef.org>
8 years agobgpd: fix wrong help strings of "match peer" and "no match peer" commands
Igor Ryzhov [Wed, 11 May 2016 12:26:39 +0000 (15:26 +0300)]
bgpd: fix wrong help strings of "match peer" and "no match peer" commands

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Tested-by: NetDEF CI System <cisystem@netdef.org>
8 years agolib: add AF_ETHERNET/AFI_ETHER
Lou Berger [Tue, 19 Apr 2016 20:08:59 +0000 (16:08 -0400)]
lib: add AF_ETHERNET/AFI_ETHER

8 years agolib: dump memory stats on core
Lou Berger [Tue, 19 Apr 2016 16:42:25 +0000 (12:42 -0400)]
lib: dump memory stats on core

8 years agobgp: add "debug bgp allow-martians" next hops and related code/commands
Lou Berger [Sat, 7 May 2016 14:35:21 +0000 (10:35 -0400)]
bgp: add "debug bgp allow-martians" next hops and related code/commands

8 years agobgpd: cleanup clang uninitialized variable warning
Lou Berger [Wed, 20 Apr 2016 12:11:05 +0000 (08:11 -0400)]
bgpd: cleanup clang uninitialized variable warning

8 years agolib: fix memory leak in zprivs_caps_init
Lou Berger [Fri, 6 May 2016 21:20:25 +0000 (17:20 -0400)]
lib: fix memory leak in zprivs_caps_init

8 years agoAdd support Router Capabilities support to OSPF
Olivier Dugeon [Tue, 19 Apr 2016 17:21:17 +0000 (19:21 +0200)]
Add support Router Capabilities support to OSPF

This is an implementation of RFC4970 (Router Information) and
RFC5088 (PCE Capabilities announcement)

* ospfd/Makefile.am: Add new file ospf_ri.c and ospf_ri.h
* ospfd/ospf_opaque.c: Add new Router Capabilities code point
* ospfd/ospf_ri.[c,h]: Implementation of RFC4970 & RFC5088

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
8 years agoUpdate documentation for Traffic Engineering
Olivier Dugeon [Tue, 19 Apr 2016 17:18:18 +0000 (19:18 +0200)]
Update documentation for Traffic Engineering

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
8 years agoAdd support of Traffic Engineering to IS-IS
Olivier Dugeon [Tue, 19 Apr 2016 17:03:05 +0000 (19:03 +0200)]
Add support of Traffic Engineering to IS-IS

These patches is an implementation of RFC5305 that enable the
support of Traffic Engineering in IS-IS

* isisd/Makefile.am: Add new files isis_te.c and isis_te.h
* isisd/isis_circuit.[c,h]: Add new mpls_te_circuit structure to isis_circuit
structure to handle new Traffic Engineering TLVs
* isisd/isis_lsp.c: Update LSP handler to mux/demux Traffic Engineering TLVs
* isisd/isis_main.c: Add initialisation of ISIS TE
* isisd/isis_pdu.c: Update function process_p2p_hello() to retrieve remote IP
address to populate Traffic Engineering TLV.
* isisd/isis_te.[c,]: Implementation of RFC5305
* isisd/isis_tlv.[c,h]: Update TLV definition and function to handle
Traffic Engineering ones
* isisd/isis_zebra.c: Add new function isis_zebra_link_params() to retrieve
the link parameters of interfaces from ZBus to populate the Traffic Engineering
TLVs
* isisd/isisd.[c,h]: Add Traffic Engineering support with new debug command

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
8 years agoUpdate Traffic Engineering Support for OSPFD
Olivier Dugeon [Tue, 19 Apr 2016 14:21:46 +0000 (16:21 +0200)]
Update Traffic Engineering Support for OSPFD

NOTE: I am squashing several commits together because they
do not independently compile and we need this ability to
do any type of sane testing on the patches.  Since this
series builds together I am doing this. -DBS

This new structure is the basis to get new link parameters for
Traffic Engineering from Zebra/interface layer to OSPFD and ISISD
for the support of Traffic Engineering

* lib/if.[c,h]: link parameters struture and get/set functions
* lib/command.[c,h]: creation of a new link-node
* lib/zclient.[c,h]: modification to the ZBUS message to convey the
link parameters structure
* lib/zebra.h: New ZBUS message

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Add support for IEEE 754 format

* lib/stream.[c,h]: Add stream_get{f,d} and stream_put{f,d}) demux and muxers to
  safely convert between big-endian IEEE-754 single and double binary
  format, as used in IETF RFCs, and C99.  Implementation depends on host
  using __STDC_IEC_559__, which should be everything we care about.  Should
  correctly error out otherwise.
* lib/network.[c,h]: Add ntohf and htonf converter
* lib/memtypes.c: Add new memeory type for Traffic Engineering support

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Add link parameters support to Zebra

* zebra/interface.c:
   - Add new link-params CLI commands
   - Add new functions to set/get link parameters for interface
* zebra/redistribute.[c,h]: Add new function to propagate link parameters
to routing daemon (essentially OSPFD and ISISD) for Traffic Engineering.
* zebra/redistribute_null.c: Add new function
zebra_interface_parameters_update()
* zebra/zserv.[c,h]: Add new functions to send link parameters

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Add support of new link-params CLI to vtysh

In vtysh_config.c/vtysh_config_parse_line(), it is not possible to continue
to use the ordered version for adding line i.e. config_add_line_uniq() to print
Interface CLI commands as it completely break the new LINK_PARAMS_NODE.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Update Traffic Engineering support for OSPFD

These patches update original code to RFC3630 (OSPF-TE) and add support of
RFC5392 (Inter-AS v2) & RFC7471 (TE metric extensions) and partial support
of RFC6827 (ASON - GMPLS).

* ospfd/ospf_dump.[c,h]: Add new dump functions for Traffic Engineering
* ospfd/ospf_opaque.[c,h]: Add new TLV code points for RFC5392
* ospfd/ospf_packet.c: Update checking of OSPF_OPTION
* ospfd/ospf_vty.[c,h]: Update ospf_str2area_id
* ospfd/ospf_zebra.c: Add new function ospf_interface_link_params() to get
Link Parameters information from the interface to populate Traffic Engineering
metrics
* ospfd/ospfd.[c,h]: Update OSPF_OPTION flags (T -> MT and new DN)
* ospfd/ospf_te.[c,h]: Major modifications to update the code to new
link parameters structure and new RFCs

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
tmp

8 years agolib, zebra: unify link layer type and hardware address handling
Timo Teräs [Fri, 15 Jan 2016 15:36:33 +0000 (17:36 +0200)]
lib, zebra: unify link layer type and hardware address handling

This removes the BSD specific usage of struct sockaddr_dl
hardware address. This unifies to use explict hw_addr member for
the address, and zebra specific enumeration for the link layer
type.

Additionally the zapi is updated to never send platform specific
structures over the wire, but the ll_type along with hw_addr_len
and hw_addr are now sent for all platforms.

Based on initial work by Paul Jakma.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
# Please enter the commit message for your changes. Lines starting
# with '#' will be kept; you may remove them yourself if you want to.
# An empty message aborts the commit.
#
# Author:    Timo Teräs <timo.teras@iki.fi>
#
# rebase in progress; onto 9c2f85d
# You are currently editing a commit while rebasing branch 'renato' on '9c2f85d'.
#
# Changes to be committed:
# modified:   isisd/isis_circuit.c
# modified:   lib/if.c
# modified:   lib/if.h
# modified:   lib/zclient.c
# modified:   zebra/interface.c
# modified:   zebra/interface.h
# modified:   zebra/kernel_socket.c
# modified:   zebra/rt_netlink.c
# modified:   zebra/rtadv.c
# modified:   zebra/zserv.c
#
# Untracked files:
# "\033\033OA\033OB\033"
# 0001-bgpd-fix-build-on-Solaris.patch
# ldpd/
# redhat/ldpd.init
# redhat/ldpd.service
# tags
#

8 years agoconfig: Give the option of disabling run as user/group
Jafar Al-Gharaibeh [Thu, 28 Jul 2016 19:41:20 +0000 (14:41 -0500)]
config: Give the option of disabling run as user/group

Leave "user/group" unset when explicitly configuring with
"--disable-user" / "--enable-user=no" and
"--disable-group" / "--enable-group=no"
This allows quagga to skip unsupported system calls such
as setuid() on certain platfroms.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Tested-by: NetDEF CI System <cisystem@netdef.org>
8 years agovtysh: Fix, guard against NULL pointer dereference
Jafar Al-Gharaibeh [Mon, 1 Aug 2016 23:14:38 +0000 (18:14 -0500)]
vtysh: Fix, guard against NULL pointer dereference

getpwuid() may fail returning a null value leaving subsequent
code vulnerable to a null pointer dereference.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
Tested-by: NetDEF CI System <cisystem@netdef.org>
8 years agolib/memory: fix indirect static link with zlib
Baruch Siach [Fri, 2 Sep 2016 03:42:08 +0000 (06:42 +0300)]
lib/memory: fix indirect static link with zlib

quagga SNMP support depends on netsnmp, that optionally depends on OpenSSL,
which in turn requires zlib. zlib exports the 'zcalloc' symbol, which collides
with a function of the same name in memory.c. This is not a problem when
linking dynamically, since quagga does not use zlib directly. But static
linking fails with the error:

  CCLD     ospfd
.../output/host/usr/mips64el-buildroot-linux-uclibc/sysroot/usr/lib/libz.a(zutil.o): In function `zcalloc':
zutil.c:(.text+0x48): multiple definition of `zcalloc'
.../output/build/quagga-1.0.20160315/lib/.libs/libzebra.a(memory.o):memory.c:(.text+0x1a0): first defined here

Rename 'zcalloc' to 'zzcalloc' to avoid symbol collision.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
8 years agoconfigure: fix static linking with readline
Thomas Petazzoni [Fri, 2 Sep 2016 03:42:07 +0000 (06:42 +0300)]
configure: fix static linking with readline

When static linking is used, the order of the libraries is important,
and the libraries using a symbol from another library should be listed
*before* the library providing that symbol (see
http://eli.thegreenplace.net/2013/07/09/library-order-in-static-linking)
for details.

When vtysh is linked statically, the command line contains "-lcurses
-lreadline", which causes a build failure due to unresolved
symbols. This is because readline is using symbols from the curses
library: the order should be the opposite.

This patch fixes that problem by putting the -lreadline at the
beginning of the LIBREADLINE variable calcualted by the configure
script.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
8 years agobgpd, lib, ospfd, pimd, zebra: Use nexthop_types_t
Donald Sharp [Fri, 2 Sep 2016 14:32:14 +0000 (10:32 -0400)]
bgpd, lib, ospfd, pimd, zebra: Use nexthop_types_t

Use the 'enum nexthop_types_t' instead of
the zebra.h #defines.  And remove code from
zebra.h that does not belong there.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agolib: Remove unused ZEBRA_NEXTHOP_IPV4_ONLINK type
Donald Sharp [Fri, 2 Sep 2016 13:38:28 +0000 (09:38 -0400)]
lib: Remove unused ZEBRA_NEXTHOP_IPV4_ONLINK type

Remove the unused ZEBRA_NEXTHOP_IPV4_ONLINK type
from the system.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoquagga-reload.py should be importable
Daniel Walton [Wed, 31 Aug 2016 12:58:46 +0000 (12:58 +0000)]
quagga-reload.py should be importable

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-12686
(cherry picked from commit a782e613dd44a4447e4a9ef08cfe014e09da2b2f)

8 years agozebra: stack overrun in IPv6 RA receive code (CVE ##TBA##)
David Lamparter [Wed, 31 Aug 2016 11:31:16 +0000 (13:31 +0200)]
zebra: stack overrun in IPv6 RA receive code (CVE ##TBA##)

The IPv6 RA code also receives ICMPv6 RS and RA messages.
Unfortunately, by bad coding practice, the buffer size specified on
receiving such messages mixed up 2 constants that in fact have different
values.

The code itself has:
 #define RTADV_MSG_SIZE 4096
While BUFSIZ is system-dependent, in my case (x86_64 glibc):
 /usr/include/_G_config.h:#define _G_BUFSIZ 8192
 /usr/include/libio.h:#define _IO_BUFSIZ _G_BUFSIZ
 /usr/include/stdio.h:# define BUFSIZ _IO_BUFSIZ

As the latter is passed to the kernel on recvmsg(), it's possible to
overwrite 4kB of stack -- with ICMPv6 packets that can be globally sent
to any of the system's addresses (using fragmentation to get to 8k).

(The socket has filters installed limiting this to RS and RA packets,
but does not have a filter for source address or TTL.)

Issue discovered by trying to test other stuff, which randomly caused
the stack to be smaller than 8kB in that code location, which then
causes the kernel to report EFAULT (Bad address).

Ticket: CM-12687
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 6a98e6a916c18bb130430d1dcbd9f23a17ac97bd)

8 years agobgpd: Add fix for multiple set commands with prefer-global
root [Tue, 30 Aug 2016 12:59:08 +0000 (08:59 -0400)]
bgpd: Add fix for multiple set commands with prefer-global

In further testing, found that if there were multiple set commands in
the route-map with one being prefer-global, the removal of the prefer-global
was not recognized and reacted to correctly.  This small addition includes
that support

Ticket: CM-11480
Signed-off-by: Don Slice
Reviewed By: Donald Sharp
Testing Done: Manual testing, bgp-min and bgp-smoke completed

(cherry picked from commit 3aef92192569c33906c6a2623d0753c16c0e7a64)

8 years agozebra: refactor zsend_ipv[4|6]_nexthop_lookup
Donald Sharp [Wed, 24 Aug 2016 09:02:22 +0000 (05:02 -0400)]
zebra: refactor zsend_ipv[4|6]_nexthop_lookup

These two functions are functionally equivalent refactor.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Remove unused function reference.
Donald Sharp [Wed, 24 Aug 2016 08:05:36 +0000 (04:05 -0400)]
zebra: Remove unused function reference.

The rib_lookup_ipv6 is not implemented. Remove it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: refactor rib_add_ipv[4|6]_multipath
Donald Sharp [Wed, 24 Aug 2016 08:01:20 +0000 (04:01 -0400)]
zebra: refactor rib_add_ipv[4|6]_multipath

The rib_add_ipv[4|6]_multipath functions are functionally
equivalent.  Refactor to 1 function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Refactor rib_add_ipv[4|6] to a common function
Donald Sharp [Wed, 24 Aug 2016 06:20:47 +0000 (02:20 -0400)]
zebra: Refactor rib_add_ipv[4|6] to a common function

rib_add_ipv[4|6] both were essentially the same function
combine and refactor everywhere.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Refactor rib_delete_ipv[4|6]
Donald Sharp [Wed, 24 Aug 2016 05:39:08 +0000 (01:39 -0400)]
zebra: Refactor rib_delete_ipv[4|6]

These two functions are essentially the same.
Refactor.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Refactor rib_match_ipv[4|6]
Donald Sharp [Wed, 24 Aug 2016 04:48:37 +0000 (00:48 -0400)]
zebra: Refactor rib_match_ipv[4|6]

the rib_match_ipv4 and rib_match_ipv6 functions were
the same.  Refactor to 1 function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Refactor v4 and v6 static_add into 1 function
Donald Sharp [Wed, 24 Aug 2016 04:26:07 +0000 (00:26 -0400)]
zebra: Refactor v4 and v6 static_add into 1 function

Refactor the static_add_ipv[4|6] functions into
1 function call.  They are basically doing the exact
same thing no need for separate code paths.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Refactor v4 and v6 static_delete
Donald Sharp [Wed, 24 Aug 2016 04:07:49 +0000 (00:07 -0400)]
zebra: Refactor v4 and v6 static_delete

Refactor v4 and v6 static delete into 1 function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Create zebra_static.[ch] to isolate code
Donald Sharp [Thu, 1 Sep 2016 11:20:02 +0000 (07:20 -0400)]
zebra: Create zebra_static.[ch] to isolate code

Isolate the zebra static_XXX functions from zebra_rib.c
This is the first in a series of changes to clean up
the zebra code a bit more.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: stack overrun in IPv6 RA receive code (CVE ##TBA##)
David Lamparter [Wed, 31 Aug 2016 11:31:16 +0000 (13:31 +0200)]
zebra: stack overrun in IPv6 RA receive code (CVE ##TBA##)

The IPv6 RA code also receives ICMPv6 RS and RA messages.
Unfortunately, by bad coding practice, the buffer size specified on
receiving such messages mixed up 2 constants that in fact have different
values.

The code itself has:
 #define RTADV_MSG_SIZE 4096
While BUFSIZ is system-dependent, in my case (x86_64 glibc):
 /usr/include/_G_config.h:#define _G_BUFSIZ 8192
 /usr/include/libio.h:#define _IO_BUFSIZ _G_BUFSIZ
 /usr/include/stdio.h:# define BUFSIZ _IO_BUFSIZ

As the latter is passed to the kernel on recvmsg(), it's possible to
overwrite 4kB of stack -- with ICMPv6 packets that can be globally sent
to any of the system's addresses (using fragmentation to get to 8k).

(The socket has filters installed limiting this to RS and RA packets,
but does not have a filter for source address or TTL.)

Issue discovered by trying to test other stuff, which randomly caused
the stack to be smaller than 8kB in that code location, which then
causes the kernel to report EFAULT (Bad address).

Ticket: CM-12687
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoquagga-reload.py should be importable
Daniel Walton [Wed, 31 Aug 2016 12:58:46 +0000 (12:58 +0000)]
quagga-reload.py should be importable

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-12686

8 years agoQuagga won't advertise 0.0.0.0/0 with network statement
Daniel Walton [Wed, 31 Aug 2016 12:31:47 +0000 (12:31 +0000)]
Quagga won't advertise 0.0.0.0/0 with network statement

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-12561

8 years agobgpd: Add fix for multiple set commands with prefer-global
root [Tue, 30 Aug 2016 12:59:08 +0000 (08:59 -0400)]
bgpd: Add fix for multiple set commands with prefer-global

In further testing, found that if there were multiple set commands in
the route-map with one being prefer-global, the removal of the prefer-global
was not recognized and reacted to correctly.  This small addition includes
that support

Ticket: CM-11480
Signed-off-by: Don Slice
Reviewed By: Donald Sharp
Testing Done: Manual testing, bgp-min and bgp-smoke completed

8 years agojson support for "show ip route" for "show ipv6 route"
Daniel Walton [Mon, 29 Aug 2016 19:59:53 +0000 (19:59 +0000)]
json support for "show ip route" for "show ipv6 route"

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-12633

8 years agobuild/solaris: fix one error and a few warnings
Renato Westphal [Fri, 26 Aug 2016 23:46:24 +0000 (20:46 -0300)]
build/solaris: fix one error and a few warnings

Signed-off-by: Renato Westphal <renato@openbsd.org>
8 years agobgpd: cleanup vty bgp_node_afi/safi utils
Lou Berger [Tue, 12 Jan 2016 18:42:05 +0000 (13:42 -0500)]
bgpd: cleanup vty bgp_node_afi/safi utils

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 135ca1502cc54d9ad00b60b3410a0932bfeceb29)

8 years agobgp: Reorg cleanup to align process and bgp instance init/destroy
Lou Berger [Tue, 12 Jan 2016 18:42:03 +0000 (13:42 -0500)]
bgp: Reorg cleanup to align process and bgp instance init/destroy

bgp_address_destroy became per-bgp instance.  Moved the
call to the bgp_address_destroy function to the bgp delete.

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 637035710a2f8e1e5944ee714135b7f88ac15ac4)

8 years agobgpd: fix build on Solaris
Renato Westphal [Wed, 24 Aug 2016 15:11:00 +0000 (12:11 -0300)]
bgpd: fix build on Solaris

* Solaris doesn't have u_int64_t, so use uint64_t instead. C99-style
  fixed-width integers should always be preferred to improve portability;

* 's_addr' is a macro on Solaris, so we can't use it as a variable name.
  Rename the 's_addr' variable to 'addr' in the
  bgp_peer_conf_if_to_su_update_v4() function.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoMerge remote-tracking branch 'origin/cmaster' into cmaster-next
Donald Sharp [Tue, 23 Aug 2016 18:54:47 +0000 (14:54 -0400)]
Merge remote-tracking branch 'origin/cmaster' into cmaster-next

8 years agoquagga route-map on-match and continue statements accept 65536
Daniel Walton [Mon, 22 Aug 2016 12:37:13 +0000 (12:37 +0000)]
quagga route-map on-match and continue statements accept 65536

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-12581

8 years agozebra: implement per-route mtu handling
Timo Teräs [Mon, 2 Nov 2015 14:50:07 +0000 (16:50 +0200)]
zebra: implement per-route mtu handling

This commits allow overriding MTU using netlink attributes on
per-route basis. This is useful for routing protocols that can
advertice prefix specific MTUs between routers (e.g. NHRP).

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
(cherry picked from commit b11f3b54c842117e22e2f5cf1561ea34eee8dfcc)

8 years agozebra: Fix cherry-pick of ZEBRA_FLAG_CHANGED
Donald Sharp [Sun, 21 Aug 2016 16:59:48 +0000 (12:59 -0400)]
zebra: Fix cherry-pick of ZEBRA_FLAG_CHANGED

When cherrypicking I did not notice the move of the flag
from flags -> status.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: make ZEBRA_FLAG_CHANGED internal status
Timo Teräs [Mon, 2 Nov 2015 14:50:05 +0000 (16:50 +0200)]
zebra: make ZEBRA_FLAG_CHANGED internal status

This flag is used internally in zebra only. And it makes no sense
to expose it over the zclient API, as having it set from client
could corrupt the internal state.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 7eb6136b2732d4782360f9f376336c6d4f667ff0)

8 years agoisisd: warn if there is an MTU issue on circuits
Christian Franke [Mon, 15 Aug 2016 11:36:59 +0000 (13:36 +0200)]
isisd: warn if there is an MTU issue on circuits

Instead of later tripping over an assert, add a proper warning for
interfaces whose MTU is too low.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoisisd: fold up isis_circuit_is_type_set()
David Lamparter [Fri, 12 Aug 2016 23:32:52 +0000 (01:32 +0200)]
isisd: fold up isis_circuit_is_type_set()

see previous commit.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoisisd: fix is_type_set
David Lamparter [Fri, 12 Aug 2016 23:20:20 +0000 (01:20 +0200)]
isisd: fix is_type_set

Code's "is_type" is "circuit-type" in CLI, "circuit_type" is "network"
(type) in CLI, and the function to change is_type is
isis_event_circuit_type_change()... *headdesk*

Reported-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoisisd: fix network-type configuration
Christian Franke [Thu, 11 Aug 2016 14:08:05 +0000 (16:08 +0200)]
isisd: fix network-type configuration

Reported-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoisisd: fix isis_circuit_af_set() on fresh circuit
David Lamparter [Thu, 11 Aug 2016 15:02:50 +0000 (17:02 +0200)]
isisd: fix isis_circuit_af_set() on fresh circuit

A newly-created circuit will be in enabled state but have neither IPv4
nor IPv6 configured.  The logic in isis_circuit_af_set assumed that
"enabled" is equivalent to "ip || ipv6".

This is the only place where this distinction is currently relevant, as
the CLI won't allow enabling an interface without enabling either IPv4
or IPv6;  and it will also disable a circuit when both are deconfigured.

Reported-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoisisd: fix isis_circuit_create()
David Lamparter [Thu, 11 Aug 2016 14:59:08 +0000 (16:59 +0200)]
isisd: fix isis_circuit_create()

Between the awkwardly managed CSM and the tacked-on IPv6 support, the
simplified logic to setup a circuit wasn't quite right.

Note that the API essentially allows creating a circuit without enabling
either IPv4 or IPv6.  This wasn't possible before and probably breaks
isisd in 'interesting' ways.  The CLI won't do this, so it's only an
issue when adding on other configuration mechanisms.

Reported-by: Martin Winter <mwinter@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoMerge remote-tracking branch 'origin/cmaster' into cmaster-next
Donald Sharp [Fri, 19 Aug 2016 16:18:35 +0000 (12:18 -0400)]
Merge remote-tracking branch 'origin/cmaster' into cmaster-next

8 years agobgpd: Upon interface up (update) only kick-off non-Established peers
vivek [Thu, 18 Aug 2016 22:02:49 +0000 (15:02 -0700)]
bgpd: Upon interface up (update) only kick-off non-Established peers

Any interface flags/parameter change (e.g., MTU, PROMISC flag change) is
notified by zebra to clients as an "up" event. BGP literally treats this
as the interface coming up and kicks all neighbors on that interface (i.e.,
directly connected peers). When doing so for IPv4 peers on the interface
(numbered or unnumbered /30-/31) or IPv6 numbered peers, peers that may
already be Established are also flapped; when doing so for IPv6 unnumbered
peers (classic 'neighbor swpX interface' scenario with no configured IP
address on interface), only peers not in Established state are processed.

This patch fixes the code to ensure that in all cases, only non-Established
peers are kicked.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Chris Cormier <chriscormier@cumulusnetworks.com>
Ticket: CM-12526
Reviewed By: CCR-5119
Testing Done: Manual, bgp-min

8 years agoquagga-reload.py should not restart quagga if bgp ASN changes
Daniel Walton [Thu, 18 Aug 2016 18:03:46 +0000 (18:03 +0000)]
quagga-reload.py should not restart quagga if bgp ASN changes

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Dinesh Dutt<ddutt@cumulusnetworks.com>
Ticket: CM-12521

8 years agovtysh --markfile needs to ignore the "end" lines
Daniel Walton [Thu, 18 Aug 2016 17:47:01 +0000 (17:47 +0000)]
vtysh --markfile needs to ignore the "end" lines

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-12515

8 years agozebra: Fix up cherry-pick mistake
Donald Sharp [Thu, 18 Aug 2016 14:15:01 +0000 (10:15 -0400)]
zebra: Fix up cherry-pick mistake

I forgot to include the if (IS_ZEBRA_DEBUG_EVENT) test

8 years agozebra: additional redistribute related logging
Lou Berger [Tue, 12 Jan 2016 18:41:45 +0000 (13:41 -0500)]
zebra: additional redistribute related logging

Signed-off-by: Lou Berger <lberger@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 40278bd4c51939ccf8ec06ef1f33aedf8f05e86c)

8 years agoospfd: Impl. per interface 'ip ospf area' command
Joakim Tjernlund [Fri, 7 Aug 2009 11:48:15 +0000 (13:48 +0200)]
ospfd: Impl. per interface 'ip ospf area' command

Use with interface command:
 interface ppp0
 ip ospf area 0.0.0.0
This will enable OSPF on ppp0 with area 0.0.0.0

Remove with "no ip ospf area"

* ospf_vty.c: add "ip ospf area (A.B.C.D|<0-4294967295>)" interface command

* ospfd.c: (ospf_interface_{un,}set) new helper function to enable/disable
  OSPF on a specific interface.
  (ospf_if_update) 2 possible paths now to deal with interface updates.

Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
[DL: this restores the tree to deccaf9...]

8 years agoRevert "per-interface ospf enable and area set command."
David Lamparter [Tue, 16 Aug 2016 15:08:54 +0000 (17:08 +0200)]
Revert "per-interface ospf enable and area set command."

This reverts commit e723861da171fd811f499665e5432dce4e364ee6.

The code is from Joakim Tjernlund; this is just to fix the history (and
attribution) of it.  The last commit will restore the exact same tree
state.

THIS COMMIT WILL PROBABLY NOT COMPILE.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years ago*: use an ifindex_t type, defined in lib/if.h, for ifindex values
Paul Jakma [Mon, 18 Jan 2016 10:12:10 +0000 (10:12 +0000)]
*: use an ifindex_t type, defined in lib/if.h, for ifindex values

(cherry picked from commit 9099f9b2a66e86f8a90d7fe18f61bd2bb1bc6744)

8 years agoFix for CM-12450 Ensure quagga logs at startup are sent to syslog (until log configur...
Sid Khot [Thu, 18 Aug 2016 02:36:54 +0000 (19:36 -0700)]
Fix for CM-12450 Ensure quagga logs at startup are sent to syslog (until log configuration is processed)

Ticket: CM-12450
Reviewed By: CCR-5112
Testing Done: Manual

8 years agoMerge remote-tracking branch 'origin/cmaster' into cmaster-next
Donald Sharp [Thu, 18 Aug 2016 00:52:04 +0000 (20:52 -0400)]
Merge remote-tracking branch 'origin/cmaster' into cmaster-next

8 years agoBGP: neighbor activate lines for ipv4 unicast are not in the sub context
Daniel Walton [Wed, 17 Aug 2016 00:22:12 +0000 (00:22 +0000)]
BGP: neighbor activate lines for ipv4 unicast are not in the sub context

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-12080

8 years agobgpd: Fix for CM-11777 Need Quagga.conf created at quagga install
Sid Khot [Tue, 16 Aug 2016 23:27:34 +0000 (16:27 -0700)]
bgpd: Fix for CM-11777 Need Quagga.conf created at quagga install

Ticket: CM-11777
Reviewed By: CCR-5110
Testing Done: Manual

8 years agoospfd: Remove HAVE_OSPF_TE
Donald Sharp [Wed, 16 Dec 2015 19:22:11 +0000 (14:22 -0500)]
ospfd: Remove HAVE_OSPF_TE

Remove from ospf the HAVE_OSPF_TE define and just always have
ospf traffic engineering.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Tested-by: NetDEF CI System <cisystem@netdef.org>
(cherry picked from commit 693da6096a28eef5eadeea699771265987b3ec0c)

8 years agoospfd: Remove HAVE_OPAQUE_LSA
Donald Sharp [Wed, 16 Dec 2015 19:22:10 +0000 (14:22 -0500)]
ospfd: Remove HAVE_OPAQUE_LSA

HAVE_OPAQUE_LSA is used by default and you have to actively turn it off
except that OPAQUE_LSA is an industry standard and used pretty much
everywhere.  There is no need to have special #defines for this anymore.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 36fef5708d074a3ef41f34d324c309c45bae119b)

8 years agolib, bgpd, tests: Refactor FILTER_X in zebra.h
Donald Sharp [Thu, 7 Jan 2016 15:03:01 +0000 (10:03 -0500)]
lib, bgpd, tests: Refactor FILTER_X in zebra.h

lib/zebra.h has FILTER_X #define's.  These do not belong there.
Put them in lib/filter.h where they belong.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 0490729cc033a3483fc6b0ed45085ee249cac779)