]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agoOSPFD: Update Segment Routing following reviews
Olivier Dugeon [Mon, 22 Jan 2018 18:18:10 +0000 (19:18 +0100)]
OSPFD: Update Segment Routing following reviews

 - Remove OSPD_SR route type
 - Check that Segment Routing is enable only in default VRF
 - Add comment for SRGB in lib/mpls.h
 - Update documentation

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agoOSPFD: Update Segment Routing implementation
Olivier Dugeon [Fri, 19 Jan 2018 14:04:41 +0000 (15:04 +0100)]
OSPFD: Update Segment Routing implementation

 - ospf_ext.c: Correct deferred pointer raised by valgrind
 - ospf_sr.c: Correct deffered pointer raised by valgrind. Modify
Segment Routing shutdown. This is due to the fact that RI LSA
4.0.0.0 is flush prior to 7.0.0.X & 8.0.0.X LSA. This trigger
SR-Node deletion which also remove all Extended Link / Prefix
leaving them unavailable when there are referenced by 7.0.0.X
& 8.0.0.X LSA flushing.
 - doc/OSPF-SR.rst: Correct Restructured Text syntax and add
Configuration example as well as Credit section

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agoOSPFD: Add Experimental Segment Routing support
Olivier Dugeon [Thu, 18 Jan 2018 18:11:11 +0000 (19:11 +0100)]
OSPFD: Add Experimental Segment Routing support

This is an implementation of draft-ietf-ospf-segment-routing-extensions-24
and RFC7684 for Extended Link & Prefix Opaque LSA.
Look to doc/OSPF_SR.rst for implementation details & known limitations.

New files:

 - ospfd/ospf_sr.h: Segment Routing structure definition (SubTLVs + SRDB)
 - ospfd/ospf_sr.c: Main functions for Segment Routing support
 - ospfd/ospf_ext.h: TLVs and SubTLVs definition for RFC7684
 - ospfd/ospf_ext.c: RFC7684 Extended Link / Prefix implementation
 - doc/OSPF-SRr.rst: Documentation

Modified Files:

 - doc/ospfd.texi: Add new Segment Routing CLI command definition
 - lib/command.h: Add new string command for Segment Routing CLI
 - lib/mpls.h: Add default value for SRGB
 - lib/route_types.txt: Add new OSPF Segment Routing route type
 - ospfd/ospf_dump.[c,h]: Add OSPF SR debug
 - ospfd/ospf_memory.[c,h]: Add new Segment Routing memory type
 - ospfd/ospf_opaque.[c,h]: Add ospf_sr_init() starting function
 - ospfd/ospf_ri.c: Add new functions to Set/Get Segment Routing TLVs
Add new ospf_router_info_lsa_upadte() to send Opaque LSA to ospf_sr.c()
 - ospfd/ospf_ri.h: Add new Router Information SR SubTLVs
 - ospfd/ospf_spf.c: Add new scheduler when running SPF to trigger
update of NHLFE
 - ospfd/ospfd.h: Add new thread for Segment Routing scheduler
 - ospfd/subdir.am: Add new files
 - vtysh/Makefile.am: Add new ospf_sr.c file for vtysh
 - zebra/kernel_netlink.c: Add new OSPF_SR route type
 - zebra/rt_netlink.[c,h]: Add new OSPF_SR route type
 - zebra/zebra_mpls.h: Add new OSPF_SR route type

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agoMerge pull request #1626 from LabNConsulting/working/master/vnc-config
Donald Sharp [Fri, 12 Jan 2018 13:54:36 +0000 (08:54 -0500)]
Merge pull request #1626 from LabNConsulting/working/master/vnc-config

bgp: don't show vnc response-lifetime config line when set to default…

6 years agoMerge pull request #1455 from mkanjari/evpn-symmetric-routing
Philippe Guibert [Fri, 12 Jan 2018 07:27:37 +0000 (08:27 +0100)]
Merge pull request #1455 from mkanjari/evpn-symmetric-routing

Support for Evpn symmetric routing + EVPN Prefix route

6 years agoMerge pull request #1624 from qlyoung/fix-cmd-argc-max-usage
Renato Westphal [Fri, 12 Jan 2018 02:15:09 +0000 (00:15 -0200)]
Merge pull request #1624 from qlyoung/fix-cmd-argc-max-usage

lib, bgpd: fixup use of of CMD_ARGC_MAX

6 years agobgp: don't show vnc response-lifetime config line when set to default value
Lou Berger [Thu, 11 Jan 2018 22:09:26 +0000 (17:09 -0500)]
bgp: don't show vnc response-lifetime config line when set to default value

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agoMerge branch 'master' into evpn-symmetric-routing
Mitesh Kanjariya [Thu, 11 Jan 2018 17:57:47 +0000 (09:57 -0800)]
Merge branch 'master' into evpn-symmetric-routing

6 years agoMerge branch 'master' into evpn-symmetric-routing
Mitesh Kanjariya [Thu, 11 Jan 2018 17:00:23 +0000 (09:00 -0800)]
Merge branch 'master' into evpn-symmetric-routing

6 years agolib, bgpd: fixup use of of CMD_ARGC_MAX
Quentin Young [Thu, 11 Jan 2018 16:31:45 +0000 (11:31 -0500)]
lib, bgpd: fixup use of of CMD_ARGC_MAX

The constant to limit # of allowed cli tokens on any one line was
defined in multiple places, all inconsistent with each other. Fix.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1609 from dwalton76/ospf-reconfigure-area
Russ White [Thu, 11 Jan 2018 01:12:19 +0000 (20:12 -0500)]
Merge pull request #1609 from dwalton76/ospf-reconfigure-area

ospfd: do not complain if same area is reconfigured

6 years agoMerge pull request #1616 from qlyoung/sharpd-gitignore
Russ White [Thu, 11 Jan 2018 01:10:09 +0000 (20:10 -0500)]
Merge pull request #1616 from qlyoung/sharpd-gitignore

sharpd: add .gitignore

6 years agoMerge pull request #1619 from donaldsharp/bgp_debugging
Russ White [Thu, 11 Jan 2018 01:00:51 +0000 (20:00 -0500)]
Merge pull request #1619 from donaldsharp/bgp_debugging

bgpd: 'summary' to show NoNeg if peer did not negotiate afi/safi

6 years agoMerge pull request #1620 from dslicenc/bgpd-vrf-redist
Russ White [Thu, 11 Jan 2018 01:00:14 +0000 (20:00 -0500)]
Merge pull request #1620 from dslicenc/bgpd-vrf-redist

bgpd: fix updating redist bitmask when vrf_id changes

6 years agoMerge pull request #1591 from qlyoung/bgpd-ringbuf
Russ White [Thu, 11 Jan 2018 00:59:24 +0000 (19:59 -0500)]
Merge pull request #1591 from qlyoung/bgpd-ringbuf

bgpd: use ring buffer for network input

6 years agoMerge pull request #1586 from donaldsharp/1585_fix
Russ White [Thu, 11 Jan 2018 00:58:09 +0000 (19:58 -0500)]
Merge pull request #1586 from donaldsharp/1585_fix

bgpd: Fix peer uptime display in milliseconds

6 years agobgpd: fix updating redist bitmask when vrf_id changes
Don Slice [Wed, 10 Jan 2018 19:40:45 +0000 (19:40 +0000)]
bgpd: fix updating redist bitmask when vrf_id changes

Problem reported that when "systemctl restart networking" was
performed, prefixes previously redistributed into bgp from connected
were deleted from the bgp table.  Determined that we were not correctly
changing the redistribution bitmask when the vrf_id of the vrf was
changed. This patch corrects that behavior.

Manual tests look good. bgp-min and vrf-min completed with no new failures.

Ticket: CM-19369
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1608 from donaldsharp/use_source
Jafar Al-Gharaibeh [Wed, 10 Jan 2018 17:34:22 +0000 (11:34 -0600)]
Merge pull request #1608 from donaldsharp/use_source

pimd: Allow use-source to return more subtle error codes

6 years agobgpd: 'summary' to show NoNeg if peer did not negotiate afi/safi
Daniel Walton [Thu, 31 Aug 2017 16:58:38 +0000 (16:58 +0000)]
bgpd: 'summary' to show NoNeg if peer did not negotiate afi/safi

If we have configured neighbor 1.1.1.1 for an afi/safi but they have not
activated that afi/safi with us then display "NoNeg" in the state column
of the summary output.  This is to make troubleshooting afi/safi
easier.

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
6 years agosharpd: add .gitignore
Quentin Young [Tue, 9 Jan 2018 20:53:51 +0000 (15:53 -0500)]
sharpd: add .gitignore

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1615 from qlyoung/fix-bgpd-atomic-usage
Lou Berger [Tue, 9 Jan 2018 22:03:24 +0000 (17:03 -0500)]
Merge pull request #1615 from qlyoung/fix-bgpd-atomic-usage

bgpd: use atomic_* ops on _Atomic variables

6 years agobgpd: use atomic_* ops on _Atomic variables
Quentin Young [Tue, 9 Jan 2018 20:38:17 +0000 (15:38 -0500)]
bgpd: use atomic_* ops on _Atomic variables

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoospfd: do not complain if same area is reconfigured
Daniel Walton [Mon, 8 Jan 2018 21:16:18 +0000 (21:16 +0000)]
ospfd: do not complain if same area is reconfigured

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Before
------
cel-redxp-10(config)# router ospf vrf RED
cel-redxp-10(config-router)# network 1.1.1.1/32 area 0.0.0.0
cel-redxp-10(config-router)# network 1.1.1.1/32 area 0.0.0.0
There is already same network statement.
cel-redxp-10(config-router)#

When we see the "There is already same network statement." message
vtysh exits non-zero.  This scenario breaks frr-reload because
the command took and it in the config, it should exit zero here.

After
-----
cel-redxp-10(config)# router ospf vrf RED
cel-redxp-10(config-router)# network 1.1.1.1/32 area 0.0.0.0
cel-redxp-10(config-router)# network 1.1.1.1/32 area 0.0.0.0
cel-redxp-10(config-router)# network 1.1.1.1/32 area 0.0.0.0
cel-redxp-10(config-router)# network 1.1.1.1/32 area 0
cel-redxp-10(config-router)#
cel-redxp-10(config-router)# network 1.1.1.1/32 area 0.0.0.1
There is already same network statement.
cel-redxp-10(config-router)#

6 years agopimd: Allow use-source to return more subtle error codes
Donald Sharp [Mon, 8 Jan 2018 21:01:22 +0000 (16:01 -0500)]
pimd: Allow use-source to return more subtle error codes

The 'ip pim use-source ...' command returns a hard
success/failure.  Allow it to return a soft-failure
for when we re-enter the same line.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1599 from chiragshah6/mdev
Jafar Al-Gharaibeh [Mon, 8 Jan 2018 17:36:45 +0000 (11:36 -0600)]
Merge pull request #1599 from chiragshah6/mdev

ospfd: Fix no passive interface command parsing

6 years agoMerge pull request #1588 from donaldsharp/msdp_return
Jafar Al-Gharaibeh [Mon, 8 Jan 2018 17:34:36 +0000 (11:34 -0600)]
Merge pull request #1588 from donaldsharp/msdp_return

pimd: Add finer grain return codes for configuration

6 years agoMerge pull request #1590 from chiragshah6/pim_dev
Jafar Al-Gharaibeh [Mon, 8 Jan 2018 17:25:06 +0000 (11:25 -0600)]
Merge pull request #1590 from chiragshah6/pim_dev

lib: Fix no interface cmd vrf parsing

6 years agoospfd: Fix no passive interface command parsing
Chirag Shah [Sat, 6 Jan 2018 16:24:00 +0000 (08:24 -0800)]
ospfd: Fix no passive interface command parsing

Ticket: CM-19365

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoMerge pull request #1606 from bingen/lm_privs
Donald Sharp [Mon, 8 Jan 2018 12:44:02 +0000 (07:44 -0500)]
Merge pull request #1606 from bingen/lm_privs

ldpd: Add privs to label manager

6 years agoMerge pull request #1600 from donaldsharp/more_thread_yield
Lou Berger [Sat, 6 Jan 2018 23:28:46 +0000 (18:28 -0500)]
Merge pull request #1600 from donaldsharp/more_thread_yield

More thread yield

6 years agobgpd: Ensure that io thread is running after start
Donald Sharp [Sat, 6 Jan 2018 19:04:35 +0000 (14:04 -0500)]
bgpd: Ensure that io thread is running after start

The BGP IO thread must be running before other threads
can start using it.  So at startup check to see
that it running once, instead of before every
function call into.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Add pthread_yield
Donald Sharp [Sat, 6 Jan 2018 16:48:11 +0000 (11:48 -0500)]
lib: Add pthread_yield

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1595 from dwiesner/pmsi-tunnel
Donald Sharp [Fri, 5 Jan 2018 19:08:29 +0000 (14:08 -0500)]
Merge pull request #1595 from dwiesner/pmsi-tunnel

bgpd: add PMSI_TUNNEL_ATTRIBUTE to EVPN IMET routes

6 years agoldpd: Add privs to label manager
ßingen [Mon, 13 Nov 2017 20:41:58 +0000 (21:41 +0100)]
ldpd: Add privs to label manager

Signed-off-by: ßingen <bingen@voltanet.io>
6 years agoMerge pull request #1594 from donaldsharp/32_bit_fuckery
Philippe Guibert [Thu, 4 Jan 2018 13:34:51 +0000 (14:34 +0100)]
Merge pull request #1594 from donaldsharp/32_bit_fuckery

bgpd: fix failing to compile on 32 bit systems

6 years agobgpd: add PMSI_TUNNEL_ATTRIBUTE to EVPN IMET routes
Dario Wiesner [Thu, 4 Jan 2018 11:34:24 +0000 (12:34 +0100)]
bgpd: add PMSI_TUNNEL_ATTRIBUTE to EVPN IMET routes

Signed-off-by: Dario Wiesner <dario.wiesner@gmail.com>
6 years agobgpd: fix failing to compile on 32 bit systems
Donald Sharp [Thu, 4 Jan 2018 10:45:28 +0000 (05:45 -0500)]
bgpd: fix failing to compile on 32 bit systems

-Werror=sign-compare is failing with signed/unsigned usage
in the conditional expression.

Fixes: #1593
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1592 from lihongguang/master
Donald Sharp [Thu, 4 Jan 2018 00:45:46 +0000 (19:45 -0500)]
Merge pull request #1592 from lihongguang/master

ospfd: fix [no] area authentication command

6 years agoospfd: fix [no] area authentication command
lihongguang [Wed, 3 Jan 2018 23:01:58 +0000 (07:01 +0800)]
ospfd: fix [no] area authentication command

Signed-off-by: lihongguang lhg803@163.com
6 years agolib: Fix no interface cmd vrf parsing
Chirag Shah [Wed, 3 Jan 2018 19:41:45 +0000 (11:41 -0800)]
lib: Fix no interface cmd vrf parsing

For no interface <ifname> vrf VRFNAME,
vrf-name is not parsed properly.

Ticket:CM-19274

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agobgpd: use ring buffer for network input
Quentin Young [Tue, 2 Jan 2018 18:20:00 +0000 (18:20 +0000)]
bgpd: use ring buffer for network input

The multithreading code has a comment that reads:
"XXX: Heavy abuse of stream API. This needs a ring buffer."

This patch makes the relevant code use a ring buffer.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: fix a few bugs in ring buffers
Quentin Young [Wed, 3 Jan 2018 18:58:53 +0000 (13:58 -0500)]
lib: fix a few bugs in ring buffers

* Fix rare failure caused when end pointer is at end of buffer memory
  and a call to ringbuf_get() is made that reads all of the data in the
  buffer; start pointer was advanced past end pointer, causing some
  special handling to be skipped
* Fix ringbuf_peek() moving start pointer
* Fix use after free
* Remove extraneous assignment
* Update relevant tests

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: add ringbuf_copy()
Quentin Young [Tue, 2 Jan 2018 18:19:40 +0000 (18:19 +0000)]
lib: add ringbuf_copy()

Quick 'n easy way to copy the contents of one ringbuf to another.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: Allow for deprecation of json bgpTimerUp
Donald Sharp [Tue, 2 Jan 2018 15:12:05 +0000 (10:12 -0500)]
bgpd: Allow for deprecation of json bgpTimerUp

The bgpTimerUp value was incorrectly named, add
a correct name bgpTimerUpMsec and add some
code to allow for deprecation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Fix peer uptime display in milliseconds
Donald Sharp [Tue, 2 Jan 2018 14:47:38 +0000 (09:47 -0500)]
bgpd: Fix peer uptime display in milliseconds

For some reason bgp is calculating the peer uptime
in miliseconds incorrectly.  Additionally we have
the peer_uptime function call that should be doing this!
But since we've choosen different names for the json output
we cannot fix it at this point.

uptime contains the number of seconds of uptime here.  Just
multiply by 1k and display that( as peer_uptime does )

Fixes: #1585
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1589 from lihongguang/master
Donald Sharp [Wed, 3 Jan 2018 16:12:34 +0000 (11:12 -0500)]
Merge pull request #1589 from lihongguang/master

ospfd: return non-zero for configuration failures

6 years agoospfd: return non-zero for configuration failures
lihongguang [Wed, 3 Jan 2018 14:47:28 +0000 (22:47 +0800)]
ospfd: return non-zero for configuration failures

Signed-off-by: lihongguang <lhg803@163.com>
6 years agopimd: Add finer grain return codes for configuration
Donald Sharp [Wed, 3 Jan 2018 14:06:44 +0000 (09:06 -0500)]
pimd: Add finer grain return codes for configuration

When PIM handles some MSDP commands, a repeated command
was causing a CMD_WARNING_CONFIG_FAILED.  This should
be a CMD_WARNING.  Fix the code to allow vtysh to handle
this appropriately.

Ticket: CM-19053
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1584 from donaldsharp/1575_fix
Russ White [Tue, 2 Jan 2018 16:32:09 +0000 (11:32 -0500)]
Merge pull request #1584 from donaldsharp/1575_fix

zebra: Fix dest dereference

6 years agoMerge pull request #1569 from qlyoung/ringbuf
Russ White [Tue, 2 Jan 2018 14:21:37 +0000 (09:21 -0500)]
Merge pull request #1569 from qlyoung/ringbuf

lib: add ring buffer

6 years agozebra: Fix dest dereference
Donald Sharp [Tue, 2 Jan 2018 14:09:09 +0000 (09:09 -0500)]
zebra: Fix dest dereference

The rn can not have an rn->info pointer and as
such the dest may be NULL.  Don't assign
the old_fib pointer if so.  This is ok
because we know RNODE_FOREACH... will not
iterate if dest is NULL.

Fixes: #1575
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1572 from dslicenc/bgpd-network-defpy-cm16860
Russ White [Tue, 2 Jan 2018 14:02:44 +0000 (09:02 -0500)]
Merge pull request #1572 from dslicenc/bgpd-network-defpy-cm16860

bgpd: convert network statements from DEFUN to DEFPY

6 years agoMerge pull request #1580 from chiragshah6/mdev
Russ White [Tue, 2 Jan 2018 13:55:28 +0000 (08:55 -0500)]
Merge pull request #1580 from chiragshah6/mdev

ospfd: Set filter to unbound debug logs

6 years agoMerge pull request #1582 from chiragshah6/mdev1
Russ White [Tue, 2 Jan 2018 13:26:33 +0000 (08:26 -0500)]
Merge pull request #1582 from chiragshah6/mdev1

ospf6d: Fix ospf6 redist with route-map

6 years agoMerge pull request #1583 from donaldsharp/1558-more
Russ White [Tue, 2 Jan 2018 13:22:06 +0000 (08:22 -0500)]
Merge pull request #1583 from donaldsharp/1558-more

debianpkg: fix indentation and variable name

6 years agodebianpkg: fix indentation and variable name
Raymond P. Burkholder [Sun, 17 Dec 2017 03:48:20 +0000 (23:48 -0400)]
debianpkg: fix indentation and variable name

Signed-off-by: Raymond P. Burkholder <github@oneunified.net>
6 years agoospf6d: Fix ospf6 redist with route-map
Chirag Shah [Thu, 28 Dec 2017 19:12:35 +0000 (11:12 -0800)]
ospf6d: Fix ospf6 redist with route-map

When ospf6 configure with redistribute connected/protocol
with route-map. Upon restart of frr.service, ospf6 receives
redistribute update then route-map update.
During redistribute route update, since route-map info is not
filled, route is suppressed from injected as external route.

Fix: reset redistribute when route-map update received
matches with redistribution (type) and route-map name.

Ticket:CM-13800
Testing Done:
Configure ospf6 redistribute with route-map to inject
Type-2 external routes into database. Trigger frr restart
redistribute with route-map happens.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agobgpd, lib, zebra: fix style problems
mitesh [Wed, 27 Dec 2017 19:47:10 +0000 (11:47 -0800)]
bgpd, lib, zebra: fix style problems

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agoospfd: Set filter to unbound debug logs
Chirag Shah [Tue, 26 Dec 2017 17:45:25 +0000 (09:45 -0800)]
ospfd: Set filter to unbound debug logs

Ticket:CM-19213

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agolib: add ringbuf_peek()
Quentin Young [Tue, 26 Dec 2017 23:47:19 +0000 (18:47 -0500)]
lib: add ringbuf_peek()

Peek functionality for ring buffers and associated tests.

Also:
* Slight optimization to avoid 0-byte memcpy() by changing > to >=
* Add rv checks for some ringbuf_[put|get] calls that were missing them
  in the test

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: convert network statements from DEFUN to DEFPY
Don Slice [Mon, 18 Dec 2017 15:40:56 +0000 (10:40 -0500)]
bgpd: convert network statements from DEFUN to DEFPY

Problems reported with inconsistent use of parameters for bgp network
statements.  Converted 12 DEFUNs to 2 DEFPY statements, making the
parameter use consistent with the exception of keeping the "backdoor"
keywork ipv4 only.  Also verified that if a route-map or label-index
is specified in the "no" case it matches what had been previously
defined. Manual testing looks good and bgp-smoke will be performed
before pushing.

Ticket: CM-16860
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: CCR-7056
6 years agolib: add ring buffer
Quentin Young [Tue, 19 Dec 2017 21:28:45 +0000 (16:28 -0500)]
lib: add ring buffer

Simple ring buffer implementation useful for fixed size FIFO queues.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1551 from LabNConsulting/working/master/minor-perf
Donald Sharp [Tue, 19 Dec 2017 18:21:09 +0000 (13:21 -0500)]
Merge pull request #1551 from LabNConsulting/working/master/minor-perf

bgpd: minor performance enhancement

6 years agoMerge pull request #1563 from opensourcerouting/isis-bpf-hlen
Donald Sharp [Tue, 19 Dec 2017 17:57:42 +0000 (12:57 -0500)]
Merge pull request #1563 from opensourcerouting/isis-bpf-hlen

Unbreak ISIS Hellos (FreeBSD)

6 years agoMerge pull request #1553 from donaldsharp/bgp_json_routes
Rafael Zalamena [Tue, 19 Dec 2017 16:49:59 +0000 (14:49 -0200)]
Merge pull request #1553 from donaldsharp/bgp_json_routes

bgpd: Speedup vtysh handling of 'show bgp afi safi json' display

6 years agoMerge pull request #1567 from donaldsharp/json_fixes
Renato Westphal [Tue, 19 Dec 2017 16:14:26 +0000 (14:14 -0200)]
Merge pull request #1567 from donaldsharp/json_fixes

Json fixes

6 years agoMerge pull request #1515 from donaldsharp/selected_to_front1
Renato Westphal [Tue, 19 Dec 2017 16:09:03 +0000 (14:09 -0200)]
Merge pull request #1515 from donaldsharp/selected_to_front1

Store selected_fib as a pointer off of rib_dest_t

6 years agoMerge pull request #1533 from donaldsharp/REALMS
Jafar Al-Gharaibeh [Tue, 19 Dec 2017 15:32:11 +0000 (09:32 -0600)]
Merge pull request #1533 from donaldsharp/REALMS

Add Linux Realms and some Pim Documentation

6 years agoMerge pull request #1543 from donaldsharp/pim_sg_rpt
Jafar Al-Gharaibeh [Tue, 19 Dec 2017 15:29:44 +0000 (09:29 -0600)]
Merge pull request #1543 from donaldsharp/pim_sg_rpt

pimd: Really, Actually send S,G rpt prune upstream

6 years agobgpd: Fix double free
Donald Sharp [Tue, 19 Dec 2017 13:20:30 +0000 (08:20 -0500)]
bgpd: Fix double free

The json code was freeing json_paths and then
turning around and free'ing it again.  Newer
versions of json-c have started to assert
this bad behavior.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: fixed '-Werror=maybe-uninitialized' warnings
Raymond P. Burkholder [Sun, 17 Dec 2017 15:53:34 +0000 (11:53 -0400)]
bgpd: fixed '-Werror=maybe-uninitialized' warnings

- used @sharpd's slack patch as a starting point
- fixes compile time issue, but code path not tested

Signed-off-by: Raymond P. Burkholder <github@oneunified.net>
6 years agoRevert "isisd: bpf: ETHER_HDR_LEN -> ETH_ALEN"
Rafael Zalamena [Mon, 18 Dec 2017 15:19:08 +0000 (13:19 -0200)]
Revert "isisd: bpf: ETHER_HDR_LEN -> ETH_ALEN"

This reverts commit d9e5b009554f99230be1eee62daf098403c3cadf.

ETH_ALEN is not equivalent to ETHER_HDR_LEN. ETHER_HDR_LEN is the
definition for the length of the full ethernet header, meanwhile
ETH_ALEN is just the length of the ethernet address.

Here is the OpenBSD/FreeBSD definition for ETHER_HDR_LEN:
 #define ETHER_ADDR_LEN  6       /* Ethernet address length */
 #define ETHER_TYPE_LEN  2       /* Ethernet type field length */
 #define ETHER_HDR_LEN   ((ETHER_ADDR_LEN * 2) + ETHER_TYPE_LEN)

(OpenBSD's definition is at net/if_ether.h, FreeBSD's is at
 net/ethernet.h)

Linux definitions can be found at: net/ethernet.h
 #define ETHER_ADDR_LEN  ETH_ALEN  /* size of ethernet addr */
 #define ETHER_TYPE_LEN  2         /* bytes in type field */
 #define ETHER_HDR_LEN   ETH_HLEN  /* total octets in header */

net/if_ether.h:
 #define ETH_HLEN       14 /* Total octets in header.       */
 #define ETH_ALEN       6  /* Octets in one ethernet addr   */

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobgpd: rd_idspace should be freed in bgp_exit
Mitesh Kanjariya [Fri, 15 Dec 2017 21:15:47 +0000 (13:15 -0800)]
bgpd: rd_idspace should be freed in bgp_exit

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agoMerge pull request #1547 from donaldsharp/sa_from_clang
Rafael Zalamena [Fri, 15 Dec 2017 17:42:38 +0000 (15:42 -0200)]
Merge pull request #1547 from donaldsharp/sa_from_clang

Sa from clang

6 years agobgpd: solve valgrind issues in bgp_evpn_cleanup
Mitesh Kanjariya [Fri, 15 Dec 2017 17:23:13 +0000 (09:23 -0800)]
bgpd: solve valgrind issues in bgp_evpn_cleanup

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agoMerge pull request #1549 from lucize/cross
Donald Sharp [Fri, 15 Dec 2017 16:51:45 +0000 (11:51 -0500)]
Merge pull request #1549 from lucize/cross

configure: exclude some checks not needed on clippy host build

6 years agoMerge pull request #1535 from qlyoung/fix-coalesce-time-display
Rafael Zalamena [Fri, 15 Dec 2017 13:46:28 +0000 (11:46 -0200)]
Merge pull request #1535 from qlyoung/fix-coalesce-time-display

bgpd: fix config display of coalesce-time

6 years agobgpd: solve SA issue in bgp_evpn_unconfigure_export_rt_for_vrf
Mitesh Kanjariya [Fri, 15 Dec 2017 10:09:04 +0000 (02:09 -0800)]
bgpd: solve SA issue in bgp_evpn_unconfigure_export_rt_for_vrf

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agozebra: pass instance to zebra_find_client
Mitesh Kanjariya [Fri, 15 Dec 2017 10:05:38 +0000 (02:05 -0800)]
zebra: pass instance to zebra_find_client

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: fix configuration of 0 for coalesce-time
Quentin Young [Thu, 14 Dec 2017 21:43:31 +0000 (16:43 -0500)]
bgpd: fix configuration of 0 for coalesce-time

Was using 0 as a sentinel value, so user couldn't configure 0 as the
value of the coalesce timer.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agozebra: only show vrf matched to a l3-vni in show vrf vni
mitesh [Wed, 13 Dec 2017 23:27:28 +0000 (15:27 -0800)]
zebra: only show vrf matched to a l3-vni in show vrf vni

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agozebra: pass ERR_STR_SZ in zebra_vxlan_process_vrf_vni_cmd
mitesh [Wed, 13 Dec 2017 23:20:34 +0000 (15:20 -0800)]
zebra: pass ERR_STR_SZ in zebra_vxlan_process_vrf_vni_cmd

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agozebra: NUD_STALE is only valid in GNU linux
mitesh [Wed, 13 Dec 2017 23:04:44 +0000 (15:04 -0800)]
zebra: NUD_STALE is only valid in GNU linux

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: resolve memory leak in bm_master_init
mitesh [Wed, 13 Dec 2017 22:46:58 +0000 (14:46 -0800)]
bgpd: resolve memory leak in bm_master_init

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agozebra/bgpd: cleanup l3vni on no advertise-all-vni
Mitesh Kanjariya [Tue, 14 Nov 2017 07:12:15 +0000 (23:12 -0800)]
zebra/bgpd: cleanup l3vni on no advertise-all-vni

EVPN is only enabled when user configures advertise-all-vni.
All VNIs (L2 and L3) should be cleared upon removal of this config.

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: uninstall type-5 routes from vrf
Mitesh Kanjariya [Mon, 13 Nov 2017 06:48:36 +0000 (22:48 -0800)]
bgpd: uninstall type-5 routes from vrf

When we receive an MP_UNREACH,
we try to uninstall routes from the VRF and the VNI.
The route-node in the VRF corresponds
to the ip prefix formed from EVPN prefix.
We should correctly form the prefix based on the EVPN route-type.

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: move vrf rd command under address-family l2vpn evpn
Mitesh Kanjariya [Sat, 11 Nov 2017 12:17:02 +0000 (04:17 -0800)]
bgpd: move vrf rd command under address-family l2vpn evpn

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: advertise/withdraw new added/deleted type-5 routes
Mitesh Kanjariya [Thu, 9 Nov 2017 10:37:09 +0000 (02:37 -0800)]
bgpd: advertise/withdraw new added/deleted type-5 routes

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: process evpn type-5 routes received from peers
Mitesh Kanjariya [Tue, 7 Nov 2017 09:52:23 +0000 (01:52 -0800)]
bgpd: process evpn type-5 routes received from peers

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: distinguish between frr prefixlen and packet prefixlen for EVPN type-5 routes
Mitesh Kanjariya [Mon, 6 Nov 2017 22:32:32 +0000 (14:32 -0800)]
bgpd: distinguish between frr prefixlen and packet prefixlen for EVPN type-5 routes

for EVPN routes prefixlen filed in struct prefix
represents the sizeof of the struct rather than the actual prefix len.
This is later used in looking up route node in RIB.

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: only advertise valid subnet routes as evpn type-5 routes
Mitesh Kanjariya [Mon, 6 Nov 2017 01:11:43 +0000 (17:11 -0800)]
bgpd: only advertise valid subnet routes as evpn type-5 routes

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: write advertise <ipv4|ipv6> unicast under bgp vrf config
Mitesh Kanjariya [Sun, 5 Nov 2017 01:36:19 +0000 (18:36 -0700)]
bgpd: write advertise <ipv4|ipv6> unicast under bgp vrf config

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: follow AFI/SAFI style for advertising/withdrawing type-5 routes
Mitesh Kanjariya [Sun, 5 Nov 2017 01:24:02 +0000 (18:24 -0700)]
bgpd: follow AFI/SAFI style for advertising/withdrawing type-5 routes

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: update type-5 routes upon vrf export-rt change
Mitesh Kanjariya [Fri, 3 Nov 2017 23:45:55 +0000 (16:45 -0700)]
bgpd: update type-5 routes upon vrf export-rt change

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: update/withdraw type-5 routes upon l3-vni add/del
Mitesh Kanjariya [Fri, 3 Nov 2017 21:54:20 +0000 (14:54 -0700)]
bgpd: update/withdraw type-5 routes upon l3-vni add/del

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: evpn enabled should only be checked for default instance
Mitesh Kanjariya [Thu, 2 Nov 2017 10:38:01 +0000 (03:38 -0700)]
bgpd: evpn enabled should only be checked for default instance

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: update type-5 routes when RD changes
Mitesh Kanjariya [Thu, 2 Nov 2017 09:15:14 +0000 (02:15 -0700)]
bgpd: update type-5 routes when RD changes

when router-id/RD changes for a bgp vrf instance,
we need to update all type-5 routes.

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: advertise/withdraw type-5 routes upon user config
mitesh [Fri, 27 Oct 2017 21:15:45 +0000 (14:15 -0700)]
bgpd: advertise/withdraw type-5 routes upon user config

CLI config for enabling/disabling type-5 routes

router bgp <as> vrf <vrf>
  address-family l2vpn evpn
    [no] advertise <ipv4|ipv6|both>

loop through all the routes in VRF instance and advertise/withdraw
all ip routes as type-5 routes in default instance.

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: set vrf originator ip to kernels local-ip
mitesh [Mon, 30 Oct 2017 23:58:15 +0000 (16:58 -0700)]
bgpd: set vrf originator ip to kernels local-ip

For EVPN type-5 route the NH in the NLRI is set to the local tunnel ip.
This information has to be obtained from kernel notification.
We need to pass this info from zebra to bgp in l3vni call flow.
This patch doesn't handle the tunnel-ip change.

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
6 years agobgpd: RD derivation for VRF
mitesh [Wed, 25 Oct 2017 23:49:18 +0000 (16:49 -0700)]
bgpd: RD derivation for VRF

1. VRF RD can be auto-derived (simillar to RD for a VNI)
2. VRF RD can be configured manually through a config

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>