]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
8 years agoMerge pull request #343 from donaldsharp/mpls2
Renato Westphal [Wed, 26 Apr 2017 20:57:04 +0000 (17:57 -0300)]
Merge pull request #343 from donaldsharp/mpls2

Mpls

8 years agoMerge remote-tracking branch 'origin/master' into mpls2
Donald Sharp [Wed, 26 Apr 2017 18:18:22 +0000 (14:18 -0400)]
Merge remote-tracking branch 'origin/master' into mpls2

8 years agoBGP_ATTR_LABEL_INDEX fixes
Daniel Walton [Wed, 26 Apr 2017 15:53:35 +0000 (15:53 +0000)]
BGP_ATTR_LABEL_INDEX fixes

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
- cleaned up the "show bgp ipv4 labeled-unicast x.x.x.x" output

- fixed some json keys to use camelCase

- bgp_attr_label_index() was clearing BGP_ATTR_LABEL_INDEX because it
  was comparing mp_update->afi against SAFI_LABELED_UNICAST instead of
  mp_update->safi

- added BGP_ATTR_LABEL_INDEX to attr_str

8 years agobgpd: Do not force nh_afi to be AFI_IP for 'ipv4 labeled-unicast'
Daniel Walton [Tue, 25 Apr 2017 21:53:28 +0000 (21:53 +0000)]
bgpd: Do not force nh_afi to be AFI_IP for 'ipv4 labeled-unicast'

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoMerge pull request #393 from opensourcerouting/ldpd-minor-fixes
Donald Sharp [Wed, 26 Apr 2017 14:38:28 +0000 (10:38 -0400)]
Merge pull request #393 from opensourcerouting/ldpd-minor-fixes

ldpd: minor fixes

8 years agoldpd: fix bug when changing the transport address
Renato Westphal [Sat, 22 Apr 2017 15:03:14 +0000 (12:03 -0300)]
ldpd: fix bug when changing the transport address

When the transport address is changed, all interfaces and targeted
neighbors are temporary disabled in the ldpe process until new sockets
bound to the new transport address are received from the parent.

This patch fixes a problem in which adjacencies weren't being removed
after the associated targeted neighbors were disabled. This was causing
ldpd not to set some MD5 sockoptions for new neighbors are thus preventing
MD5-protected sessions to come up after a change in the transport-address.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: allow targeted neighbors over any interface
Renato Westphal [Sat, 22 Apr 2017 13:55:27 +0000 (10:55 -0300)]
ldpd: allow targeted neighbors over any interface

It's doesn't make sense to enforce that a targeted-hello is received
on an LDP-enabled interface. It should be possible, for example, to use
LDP only to signal pseudowires and other another protocol (e.g. RSVP-TE)
to create end-to-end LSPs.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: schedule the sending of label messages when necessary
Renato Westphal [Sat, 22 Apr 2017 01:10:42 +0000 (22:10 -0300)]
ldpd: schedule the sending of label messages when necessary

Once we send a Label Withdraw, we can't send a Label Mapping for the
same FEC until we receive a Label Release from the peer. This is due to
some limitations in the LDP algorithms described in Appendix A. ("LDP
Label Distribution Procedures") of RFC 5036.

To workaround this issue, make it possible to schedule the sending of
a Label Mapping as soon as a Label Release is received for the same FEC.

The easiest way to test this patch is by typing the "label local advertise
explicit-null" command. ldpd will withdraw all null labels using a
Wildcard FEC and then send new Label Mappings as soon the corresponding
Label Releases are received.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: improve ldp_zebra_read_route()
Renato Westphal [Fri, 21 Apr 2017 22:39:11 +0000 (19:39 -0300)]
ldpd: improve ldp_zebra_read_route()

Log deleted routes and simplify the code a bit.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: be more conservative with labels
Renato Westphal [Fri, 21 Apr 2017 18:41:14 +0000 (15:41 -0300)]
ldpd: be more conservative with labels

On unstable networks, routes can be lost and relearned very often. If
we deallocate the input label every time a route is lost and allocate
a new one when the route is relearned, a lot of changes are made in vain.

This patch introduces a logic in which labels are preserved for at least
five minutes before being deallocated by the LIB garbage collector. This
is consistent with what other implementations do.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: accept notifications during the session establishment process
Renato Westphal [Wed, 19 Apr 2017 22:31:19 +0000 (19:31 -0300)]
ldpd: accept notifications during the session establishment process

If we don't do this, we'll never trigger the backoff exponential timer
since it's impossible to distinguish between Initialization NAK's and
general errors.

Also:
* Implement some missing bits from RFC 5036;
* remove superfluous log message in session_shutdown()
  (send_notification() logs that we're sending a fatal notification).

Regression introduced by commit 8819fc3.

Fixes the following ANVL LDP regressions: 6.19 and 6.21.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: fix small style issues
Renato Westphal [Wed, 19 Apr 2017 21:14:20 +0000 (18:14 -0300)]
ldpd: fix small style issues

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: minor changes in the output of some show commands
Renato Westphal [Wed, 19 Apr 2017 20:12:35 +0000 (17:12 -0300)]
ldpd: minor changes in the output of some show commands

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: use synchronous channels for sending log messages
Renato Westphal [Wed, 19 Apr 2017 19:59:50 +0000 (16:59 -0300)]
ldpd: use synchronous channels for sending log messages

This is necessary to guarantee that all log messages sent from the child
processes are received in the parent process right away.

Without this patch, when a child process calls fatal() or fatalx(),
the log messages don't make it to the parent because the child doesn't
have a chance to flush its buffers before exiting.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: remove unnecessary checks if a signal was caught
Renato Westphal [Wed, 19 Apr 2017 18:28:43 +0000 (15:28 -0300)]
ldpd: remove unnecessary checks if a signal was caught

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: fix segfault after failed initialization
Renato Westphal [Wed, 19 Apr 2017 18:15:56 +0000 (15:15 -0300)]
ldpd: fix segfault after failed initialization

When ldpd fails to start for some reason, like failing to create a pid
file, the child processes call their shutdown functions without being
completely initialized. This patch adds some protections to prevent a
segmentation fault on such circumstances.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: simplify initialization of the child processes
Renato Westphal [Wed, 19 Apr 2017 01:03:35 +0000 (22:03 -0300)]
ldpd: simplify initialization of the child processes

In order to have separate ASLR/cookies per process, ldpd calls exec()
in the child processes after fork() (this is also known as the fork+exec
model).

This is an important security feature but it makes the initialization
of the child processes a bit more complicated as they're not a copy of
the parent anymore, so all parameters given via command line are lost.

To solve this problem, we were creating an argv array by hand with all
necessary parameters and providing it to the exec() syscall. This works
but it's a very ugly solution. This patch introduces a different approach
to solve the problem: send an IMSG_INIT message to the child processes
with all parameters they need in order to initialize properly. This
makes adding additional initialization parameters much more convenient
and less error prone.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoMerge remote-tracking branch 'origin/master' into mpls2
Donald Sharp [Wed, 26 Apr 2017 11:50:02 +0000 (07:50 -0400)]
Merge remote-tracking branch 'origin/master' into mpls2

8 years agoMerge remote-tracking branch 'origin/stable/3.0'
Donald Sharp [Tue, 25 Apr 2017 14:42:14 +0000 (10:42 -0400)]
Merge remote-tracking branch 'origin/stable/3.0'

8 years agoMerge pull request #403 from donaldsharp/nhrpd2
Russ White [Tue, 25 Apr 2017 14:24:23 +0000 (10:24 -0400)]
Merge pull request #403 from donaldsharp/nhrpd2

Nhrpd2

8 years agonhrpd: Fix cli changes missed
Donald Sharp [Tue, 25 Apr 2017 13:07:05 +0000 (09:07 -0400)]
nhrpd: Fix cli changes missed

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agonhrp: parse and log command response errors from strongSwan
Timo Teräs [Fri, 21 Apr 2017 11:58:17 +0000 (14:58 +0300)]
nhrp: parse and log command response errors from strongSwan

helps to debug configuration problems

8 years agonhrp: fix potential crash when vici profile name is not configured
Timo Teräs [Fri, 21 Apr 2017 11:57:57 +0000 (14:57 +0300)]
nhrp: fix potential crash when vici profile name is not configured

8 years agonhrp: notify 'tunnel protection' changes
Timo Teräs [Fri, 21 Apr 2017 11:56:45 +0000 (14:56 +0300)]
nhrp: notify 'tunnel protection' changes

to triggers refresh of IKE SAs immediately on this command

8 years agonhrp: explicitly cast ints to size_t for vici_request_vc va_list handling
Timo Teräs [Fri, 21 Apr 2017 10:57:28 +0000 (13:57 +0300)]
nhrp: explicitly cast ints to size_t for vici_request_vc va_list handling

8 years agonhrp: fix protocol address family parsing on receive
Timo Teräs [Thu, 20 Apr 2017 13:24:14 +0000 (16:24 +0300)]
nhrp: fix protocol address family parsing on receive

See bugzilla #948

8 years agonhrp: implement 'no ip nhrp map' command
Timo Teräs [Fri, 21 Apr 2017 10:37:07 +0000 (13:37 +0300)]
nhrp: implement 'no ip nhrp map' command

was accidentally not implemented earlier

8 years agonhrpd: implement 'show ip nhrp nhs'
Timo Teräs [Sat, 25 Mar 2017 15:27:24 +0000 (17:27 +0200)]
nhrpd: implement 'show ip nhrp nhs'

8 years agoMerge pull request #400 from dwalton76/default-frr-conf
Martin Winter [Tue, 25 Apr 2017 03:11:11 +0000 (20:11 -0700)]
Merge pull request #400 from dwalton76/default-frr-conf

vtysh: "Command incomplete: log syslog"

8 years agoldpd: remove two unused imsg types
Renato Westphal [Tue, 18 Apr 2017 16:27:30 +0000 (13:27 -0300)]
ldpd: remove two unused imsg types

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: call openzlog() in the child processes as well
Renato Westphal [Tue, 18 Apr 2017 15:17:30 +0000 (12:17 -0300)]
ldpd: call openzlog() in the child processes as well

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: fix log level of log_warn() and log_warnx()
Renato Westphal [Tue, 18 Apr 2017 15:14:15 +0000 (12:14 -0300)]
ldpd: fix log level of log_warn() and log_warnx()

The log_warn() and log_warnx() functions indicate non-critical warnings
and errors, so use LOG_ERR instead of LOG_CRIT.

Keep using LOG_CRIT only in fatal() and fatalx() since these functions
indicate critical errors (when the program needs to exit).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: split log.c into two files
Renato Westphal [Tue, 18 Apr 2017 15:04:44 +0000 (12:04 -0300)]
ldpd: split log.c into two files

This is basically to keep in sync with OpenBSD's ldpd(8) where the same
change was done.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 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

8 years agovtysh: "Command incomplete: log syslog"
Daniel Walton [Mon, 24 Apr 2017 18:22:29 +0000 (18:22 +0000)]
vtysh: "Command incomplete: log syslog"

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Before
======
root@spine-1[~]# cat /etc/frr/frr.conf
no log monitor
!
service integrated-vtysh-config
!
log syslog
!
log syslog informational
!
line vty
!
root@spine-1[~]#
root@spine-1[~]# vtysh -m -f /etc/frr/frr.conf
no log monitor
!
service integrated-vtysh-config
!
line 5: % Command incomplete: log syslog

root@spine-1[~]#

After
=====
root@spine-1[~]# vtysh -m -f /etc/frr/frr.conf
no log monitor
!
service integrated-vtysh-config
!
log syslog
!
log syslog informational
!
line vty
!
end
root@spine-1[~]#

8 years agoMerge pull request #391 from opensourcerouting/fix-no-router-ospf6
Donald Sharp [Sat, 22 Apr 2017 21:55:26 +0000 (17:55 -0400)]
Merge pull request #391 from opensourcerouting/fix-no-router-ospf6

ospf6d: fix "no router ospf6"

8 years agoospf6d: fix "no router ospf6"
Renato Westphal [Sat, 22 Apr 2017 20:41:54 +0000 (17:41 -0300)]
ospf6d: fix "no router ospf6"

The "no router ospf6" command wasn't working.

Regression introduced by commit 16cedbb.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoMerge pull request #388 from opensourcerouting/snap-fixes-3.0
Donald Sharp [Sat, 22 Apr 2017 00:13:31 +0000 (20:13 -0400)]
Merge pull request #388 from opensourcerouting/snap-fixes-3.0

Snap fixes 3.0

8 years agodoc: Add nhrpd to relevant section in Building_FRR_on_xxxx doc
Martin Winter [Fri, 21 Apr 2017 10:55:14 +0000 (03:55 -0700)]
doc: Add nhrpd to relevant section in Building_FRR_on_xxxx doc

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
8 years agoClean installation guide with Debian/Ubuntu
Phil Huang [Thu, 13 Apr 2017 13:20:53 +0000 (21:20 +0800)]
Clean installation guide with Debian/Ubuntu

Signed-off-by: Phil Huang <phil_huang@edge-core.com>
8 years agoAdd user `frr` into group `frrvty`
Phil Huang [Thu, 13 Apr 2017 10:11:28 +0000 (18:11 +0800)]
Add user `frr` into group `frrvty`

Signed-off-by: Phil Huang <phil_huang@edge-core.com>
8 years agosnapcraft: Add FPM module with command to set mode or disable it
Martin Winter [Fri, 21 Apr 2017 09:49:39 +0000 (02:49 -0700)]
snapcraft: Add FPM module with command to set mode or disable it

- New snap command:
    frr.set fpm {disable | protobuf | netlink}

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
8 years agolib: Add CLI option --moduledir to override default module location (needed for snap...
Martin Winter [Fri, 21 Apr 2017 06:03:03 +0000 (23:03 -0700)]
lib: Add CLI option --moduledir to override default module location (needed for snap support)

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
8 years agosnapcraft: Add nhrpd to snap
Martin Winter [Fri, 21 Apr 2017 01:18:40 +0000 (18:18 -0700)]
snapcraft: Add nhrpd to snap

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
8 years agosnapcraft: Fix another old leftover of ubuntu-core in build doc
Martin Winter [Fri, 21 Apr 2017 00:24:12 +0000 (17:24 -0700)]
snapcraft: Fix another old leftover of ubuntu-core in build doc

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
8 years agosnapcraft: Update snapcraft requirements for FRR 3.0 (from 2.0)
Martin Winter [Thu, 20 Apr 2017 23:58:24 +0000 (16:58 -0700)]
snapcraft: Update snapcraft requirements for FRR 3.0 (from 2.0)

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
8 years agoMerge pull request #382 from opensourcerouting/snap-doc-fixes-3.0
Donald Sharp [Thu, 20 Apr 2017 22:55:21 +0000 (18:55 -0400)]
Merge pull request #382 from opensourcerouting/snap-doc-fixes-3.0

snapcraft: Improve README.usage.md based on feedback received

8 years agosnapcraft: Improve README.usage.md based on feedback received
Martin Winter [Wed, 12 Apr 2017 23:00:43 +0000 (16:00 -0700)]
snapcraft: Improve README.usage.md based on feedback received

- Fix snap connect (it's now called core, not ubuntu-core)
- Add section on MPLS configuration
- Add FAQ topic on ospfd/ospf6d crashing before privs are assigned to snap
- Add pointer to official webpage

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
8 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'

8 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

8 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

8 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

8 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>
8 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

8 years agozebra: stop crash on process termination due to stale ifp->node
Don Slice [Tue, 18 Apr 2017 12:11:32 +0000 (08:11 -0400)]
zebra: stop crash on process termination due to stale ifp->node

Problem reported that crash occurred when stopping quagga in certain
circumstances.  Determined that this was due to a stale pointer on the
ifp for a deleted interface.  The ifp->node had been freed but the ifp
still kept a pointer to it, and when later the process was stopped, it
attempted to delete it again.

Ticket: CM-15550
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 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'

8 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'

8 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>
8 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>
8 years agozebra: Add some more checks to fec [un]registration
Donald Sharp [Sat, 15 Apr 2017 17:25:03 +0000 (13:25 -0400)]
zebra: Add some more checks to fec [un]registration

Be a bit more rigoruous about what we can receive
from another protocol and attempt to make the code
less likely to crash and to just safely bail
out when an error is received.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Fix up several issues in bgp_route.c
Donald Sharp [Sat, 15 Apr 2017 13:31:59 +0000 (09:31 -0400)]
bgpd: Fix up several issues in bgp_route.c

1) Some commands were installed in the wrong node
2) Fix output to show labeled information to correctly display
3) Whitespace issue in route-map command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Fix whitespace issue with if statement
Donald Sharp [Sat, 15 Apr 2017 12:59:40 +0000 (08:59 -0400)]
zebra: Fix whitespace issue with if statement

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Allow explicit-null as a label option
Donald Sharp [Sat, 15 Apr 2017 12:57:03 +0000 (08:57 -0400)]
zebra: Allow explicit-null as a label option

When entering 'mpls label bind ...' command
allow the explicit-null as an option.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Fix crash with dereference of NULL pointer
Donald Sharp [Sat, 15 Apr 2017 12:42:18 +0000 (08:42 -0400)]
zebra: Fix crash with dereference of NULL pointer

We only create the v4 and v6 mpls fec tables currently.
Follow the code pattern for the rest of the code and
ensure that the table exists before we attempt to access it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib, bgpd: Remove UNDEFINED_NODE
Donald Sharp [Sat, 15 Apr 2017 12:33:43 +0000 (08:33 -0400)]
lib, bgpd: Remove UNDEFINED_NODE

Remove the UNDEFINED_NODE as that it's implementation breaks
our ability in BGP to figure out where we are by allowing
default: in the switch statement.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 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>
8 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>
8 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>
8 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

8 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

8 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>
8 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

8 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>
8 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>
8 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>
8 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

8 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>
8 years agozebra: Experimental commit to see if this fixes snap builds
Donald Sharp [Fri, 7 Apr 2017 17:56:41 +0000 (13:56 -0400)]
zebra: Experimental commit to see if this fixes snap builds

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 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'

8 years agobgpd: Switch u_int64_t -> uint64_t
Donald Sharp [Fri, 7 Apr 2017 17:34:01 +0000 (13:34 -0400)]
bgpd: Switch u_int64_t -> uint64_t

Apparently u_int64_t is not available( or we don't pull the
right headers in for solaris based systems).

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 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>
8 years agozebra: Get mpls building across multiple platforms.
Donald Sharp [Thu, 6 Apr 2017 14:25:43 +0000 (10:25 -0400)]
zebra: Get mpls building across multiple platforms.

The build system for mpls is a bit convoluted.  We need
a way to handle builds across multiple platforms.  This,
I believe addresses this issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 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

8 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

8 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>
8 years agozebra: Fix usage of HAVE_CUMULUS
Donald Sharp [Wed, 15 Mar 2017 19:15:40 +0000 (15:15 -0400)]
zebra: Fix usage of HAVE_CUMULUS

The function zebra_mpls_lsp_label_consistent needs
to be wrappered by HAVE_CUMULUS

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Fix iana_afi_t afi_t confusion
Donald Sharp [Wed, 15 Mar 2017 19:12:47 +0000 (15:12 -0400)]
bgpd: Fix iana_afi_t afi_t confusion

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: correct labeled-unicast withdraw update
Don Slice [Wed, 15 Mar 2017 18:06:54 +0000 (14:06 -0400)]
bgpd: correct labeled-unicast withdraw update

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Fix labeled-unicast generation and parsing issues
Don Slice [Wed, 15 Mar 2017 12:43:01 +0000 (08:43 -0400)]
bgpd: Fix labeled-unicast generation and parsing issues

Labeled-unicast updates were being sent with an ipv6 nexthop due to
not setting the mp_nexthop_len or nh_afi.  On the receive side, the
prefix length was being incorrectly determined and has been fixed.
Also the stream for bgp_label_buf was not created.  All resolved.

Ticket: CM-15260
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by:

8 years agobgpd: bgp_static_update just called bgp_static_update_main
Donald Sharp [Tue, 14 Mar 2017 14:02:16 +0000 (10:02 -0400)]
bgpd: bgp_static_update just called bgp_static_update_main

Just make it one function call

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
8 years agozebra: Fix gcc compile warn->error issue
Donald Sharp [Fri, 10 Mar 2017 18:34:02 +0000 (13:34 -0500)]
zebra: Fix gcc compile warn->error issue

flags is set but never used.  Since we
plan to use it in the future, make
it evident what is going on here.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Use appropriate Attribute number for labels
Donald Sharp [Fri, 10 Mar 2017 13:04:39 +0000 (08:04 -0500)]
bgpd: Use appropriate Attribute number for labels

The draft-ietf-idr-bgp-prefix-sid-04 specifies the label attribute
should be 40 not 30.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Modify attr->flag to be 64 bit
Donald Sharp [Fri, 10 Mar 2017 12:59:52 +0000 (07:59 -0500)]
bgpd: Modify attr->flag to be 64 bit

With the some current bgp drafts the Attribute number has
surpassed 32.  Which is a bit unfortunate in that we keep
track of the attributes via a bitfield based on the attribute #.

For the moment since I am not aware of Attribute #'s being
greater than 64, convert the flag to 64 bit and allow the
bit shifting to know about it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd, lib, zebra: Implement handling of BGP-Prefix-SID label Index
Vivek Venkatraman [Thu, 9 Mar 2017 17:55:54 +0000 (12:55 -0500)]
bgpd, lib, zebra: Implement handling of BGP-Prefix-SID label Index

Implement BGP Prefix-SID IETF draft to be able to signal a labeled-unicast
prefix with a label index (segment ID). This makes it easier to deploy
global MPLS labels with BGP, even without other aspects of Segment Routing
implemented.

This patch implements the handling of the BGP-Prefix-SID Label Index
attribute. When received from a peer and the index is acceptable, the local
label is picked up from the SRGB and is programmed as the incoming label as
well as advertised to peers. If the index is not acceptable, no local label
is assigned. The outgoing label will always be the one advertised by the
downstream neighbor.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
8 years agobgpd: This patch implements the exchange of the BGP-Prefix-SID label index attr
Vivek Venkatraman [Thu, 9 Mar 2017 17:22:04 +0000 (12:22 -0500)]
bgpd: This patch implements the exchange of the BGP-Prefix-SID label index attr

Implement BGP Prefix-SID IETF draft to be able to signal a labeled-unicast
prefix with a label index (segment ID). This makes it easier to deploy
global MPLS labels with BGP, even without other aspects of Segment Routing
implemented.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
8 years agobgpd, zebra: Implement BGP Prefix-SID IETF draft
Vivek Venkatraman [Thu, 9 Mar 2017 16:43:59 +0000 (11:43 -0500)]
bgpd, zebra: Implement BGP Prefix-SID IETF draft

Implement BGP Prefix-SID IETF draft to be able to signal a labeled-unicast
prefix with a label index (segment ID). This makes it easier to deploy
global MPLS labels with BGP, even without other aspects of Segment Routing
implemented.

This patch implements configuration of the global label block (SRGB) and
configuration of a label-index for a network in BGP.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
8 years agobgpd: labeled unicast display
Don Slice [Thu, 9 Mar 2017 21:12:44 +0000 (16:12 -0500)]
bgpd: labeled unicast display

Implement 'show' and 'clear' commands for the labeled-unicast address-family.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
8 years agobgpd: labeled unicast processing
Don Slice [Thu, 9 Mar 2017 14:54:20 +0000 (09:54 -0500)]
bgpd: labeled unicast processing

Implement support for negotiating IPv4 or IPv6 labeled-unicast address
family, exchanging prefixes and installing them in the routing table, as
well as interactions with Zebra for FEC registration. This is the
implementation of RFC 3107.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
8 years agobgpd: labeled unicast config
Don Slice [Wed, 8 Feb 2017 19:19:54 +0000 (14:19 -0500)]
bgpd: labeled unicast config

Implement support for activating the labeled-unicast address family in
BGP and relevant configuration for this address family.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
8 years agoquagga: labeled unicast definitions
Don Slice [Thu, 2 Feb 2017 18:34:00 +0000 (13:34 -0500)]
quagga: labeled unicast definitions

Internal and IANA definitions for labeled-unicast SAFI. Note that this SAFI
is specific to BGP and maps to the corresponding unicast SAFI in Zebra.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>