]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
7 years agotools: Fix startup to include babel
Donald Sharp [Tue, 13 Jun 2017 14:43:20 +0000 (10:43 -0400)]
tools: Fix startup to include babel

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #687 (nexthop refactoring)
David Lamparter [Tue, 13 Jun 2017 14:22:29 +0000 (16:22 +0200)]
Merge pull request #687 (nexthop refactoring)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #624 "Babel"
David Lamparter [Tue, 13 Jun 2017 14:11:32 +0000 (16:11 +0200)]
Merge pull request #624 "Babel"

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobabeld/eigrpd: flip VTY ports & fix rpm
David Lamparter [Tue, 13 Jun 2017 12:36:55 +0000 (14:36 +0200)]
babeld/eigrpd: flip VTY ports & fix rpm

babeld was 2609 previously, and this was still marked in SERVICES.
Let's flip it back before we have a release out with it.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #703 from donaldsharp/nl_pid
David Lamparter [Tue, 13 Jun 2017 08:08:43 +0000 (10:08 +0200)]
Merge pull request #703 from donaldsharp/nl_pid

zebra: When calling netlink, set the nl_pid as appropriate

7 years agoMerge pull request #700 "Coverity high"
David Lamparter [Tue, 13 Jun 2017 08:05:51 +0000 (10:05 +0200)]
Merge pull request #700 "Coverity high"

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #678
David Lamparter [Tue, 13 Jun 2017 08:03:01 +0000 (10:03 +0200)]
Merge pull request #678

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobabeld: install directly connected IPv4 as such
David Lamparter [Tue, 13 Jun 2017 07:45:16 +0000 (09:45 +0200)]
babeld: install directly connected IPv4 as such

babeld would install "1.2.3.4 on eth0" as "1.2.3.4 via 1.2.3.4 on eth0".
Remove the superfluous nexthop and send to zebra as directly-connected
route.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge remote-tracking branch 'frr/master' into pull-624
David Lamparter [Tue, 13 Jun 2017 07:18:14 +0000 (09:18 +0200)]
Merge remote-tracking branch 'frr/master' into pull-624

7 years agozebra: When calling netlink, set the nl_pid as appropriate
Donald Sharp [Mon, 12 Jun 2017 17:38:51 +0000 (13:38 -0400)]
zebra: When calling netlink, set the nl_pid as appropriate

This will allow us to further know that we originated the message.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Fix memory leak
Donald Sharp [Sat, 10 Jun 2017 20:39:41 +0000 (16:39 -0400)]
zebra: Fix memory leak

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Fix uninitialized memory access with src_p
Donald Sharp [Sat, 10 Jun 2017 20:36:32 +0000 (16:36 -0400)]
zebra: Fix uninitialized memory access with src_p

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoeigrpd: Correctly size the dump data
Donald Sharp [Sat, 10 Jun 2017 20:31:49 +0000 (16:31 -0400)]
eigrpd: Correctly size the dump data

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoeigrpd: Use correct memory operation
Donald Sharp [Sat, 10 Jun 2017 20:18:54 +0000 (16:18 -0400)]
eigrpd: Use correct memory operation

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoeigrpd: Fix leak of ep
Donald Sharp [Sat, 10 Jun 2017 20:13:51 +0000 (16:13 -0400)]
eigrpd: Fix leak of ep

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoeigrpd: Cleanup leaked dest_addr
Donald Sharp [Sat, 10 Jun 2017 20:09:29 +0000 (16:09 -0400)]
eigrpd: Cleanup leaked dest_addr

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoeigrpd: Fix use after free
Donald Sharp [Sat, 10 Jun 2017 19:53:27 +0000 (15:53 -0400)]
eigrpd: Fix use after free

Signed-off-by: Donald Sharp <sharpd@Cumulusnetworks.com>
7 years agozebra: Fix possible buffer overrun
Donald Sharp [Sat, 10 Jun 2017 19:42:13 +0000 (15:42 -0400)]
zebra: Fix possible buffer overrun

Use the correct size of the string.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Free allocated stream in error code
Donald Sharp [Sat, 10 Jun 2017 19:37:02 +0000 (15:37 -0400)]
bgpd: Free allocated stream in error code

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: fix memleak with 'show ip bgp vrf ...'
Quentin Young [Fri, 9 Jun 2017 20:18:56 +0000 (20:18 +0000)]
bgpd: fix memleak with 'show ip bgp vrf ...'

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #679 from dslicenc/cm16513
Russ White [Fri, 9 Jun 2017 18:01:36 +0000 (14:01 -0400)]
Merge pull request #679 from dslicenc/cm16513

bgpd: add "set label-index" route-map option

7 years agoMerge pull request #694 from qlyoung/event-loop
Russ White [Fri, 9 Jun 2017 17:54:43 +0000 (13:54 -0400)]
Merge pull request #694 from qlyoung/event-loop

*: remove THREAD_BACKGROUND

7 years agoMerge pull request #692 from donaldsharp/meta_queue_fix
Jafar Al-Gharaibeh [Thu, 8 Jun 2017 15:41:57 +0000 (10:41 -0500)]
Merge pull request #692 from donaldsharp/meta_queue_fix

zebra: Fix the metaq to be aware of all routing protocols we could see

7 years agoMerge pull request #693 from donaldsharp/more_newlines_missing
Renato Westphal [Thu, 8 Jun 2017 15:33:45 +0000 (12:33 -0300)]
Merge pull request #693 from donaldsharp/more_newlines_missing

bgpd: Fix missing newline

7 years agoMerge pull request #697 from donaldsharp/rt_proto_fixes
Jafar Al-Gharaibeh [Thu, 8 Jun 2017 15:28:35 +0000 (10:28 -0500)]
Merge pull request #697 from donaldsharp/rt_proto_fixes

tools, zebra: Fix netlink notification of who owns the routes

7 years agoMerge pull request #696 from donaldsharp/disable_rtadv
Jafar Al-Gharaibeh [Thu, 8 Jun 2017 14:48:00 +0000 (09:48 -0500)]
Merge pull request #696 from donaldsharp/disable_rtadv

zebra: Fix --disable-rtadv to actually compile

7 years agozebra: In which RTPROT_BABEL is hard
Donald Sharp [Thu, 8 Jun 2017 13:33:54 +0000 (09:33 -0400)]
zebra: In which RTPROT_BABEL is hard

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: For older distributions RTPROT_BABEL might not be defined
Donald Sharp [Thu, 8 Jun 2017 13:16:28 +0000 (09:16 -0400)]
zebra: For older distributions RTPROT_BABEL might not be defined

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agotools, zebra: Allow zebra to insert babel routes as babel
Donald Sharp [Thu, 8 Jun 2017 12:56:36 +0000 (08:56 -0400)]
tools, zebra: Allow zebra to insert babel routes as babel

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agotools, zebra: Fix netlink notification of who owns the routes
Donald Sharp [Thu, 8 Jun 2017 12:48:10 +0000 (08:48 -0400)]
tools, zebra: Fix netlink notification of who owns the routes

For NHRP, EIGRP and LDP( This is for consistency as opposed to correctness )
assign some new values to routes to be installed into the kernel
so we can know who owns them later.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Fix --disable-rtadv to actually compile
Alex Couloumbis [Thu, 8 Jun 2017 11:55:25 +0000 (07:55 -0400)]
zebra: Fix --disable-rtadv to actually compile

Signed-off-by: Alex Couloumbis <alex@ozo.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years ago*: remove THREAD_BACKGROUND
Quentin Young [Thu, 8 Jun 2017 01:53:50 +0000 (01:53 +0000)]
*: remove THREAD_BACKGROUND

it's just an alias for a millisecond timer used in exactly nine places
and serves only to complicate

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agobgpd: Fix missing newline
Donald Sharp [Wed, 7 Jun 2017 22:57:46 +0000 (18:57 -0400)]
bgpd: Fix missing newline

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Add babel routes to the proper meta-Q for processing
Donald Sharp [Wed, 7 Jun 2017 19:57:25 +0000 (15:57 -0400)]
zebra: Add babel routes to the proper meta-Q for processing

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: Add some breadcrumbs for new route types
Donald Sharp [Wed, 7 Jun 2017 19:47:35 +0000 (15:47 -0400)]
lib: Add some breadcrumbs for new route types

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Fix the metaq to be aware of all routing protocols we could see
Donald Sharp [Wed, 7 Jun 2017 19:43:23 +0000 (15:43 -0400)]
zebra: Fix the metaq to be aware of all routing protocols we could see

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #678 from chiragshah6/pim_dev
Jafar Al-Gharaibeh [Wed, 7 Jun 2017 18:29:56 +0000 (13:29 -0500)]
Merge pull request #678 from chiragshah6/pim_dev

pimd: fix pim bfd crash and bfd down check specific neigh addr

7 years agozebra: Clean up indentation level in nexthop_active
Donald Sharp [Wed, 7 Jun 2017 11:39:35 +0000 (07:39 -0400)]
zebra: Clean up indentation level in nexthop_active

Clean up the while loop indentation level to be a bit more
readable.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Refactor nexthop_active to remove duplicate code
Donald Sharp [Wed, 7 Jun 2017 11:34:16 +0000 (07:34 -0400)]
zebra: Refactor nexthop_active to remove duplicate code

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge branch 'master' of https://github.com/FRRouting/frr into pim_dev
Chirag Shah [Tue, 6 Jun 2017 16:59:29 +0000 (09:59 -0700)]
Merge branch 'master' of https://github.com/FRRouting/frr into pim_dev

7 years agobgpd: set bgp label-index range to (0-1048560)
Don Slice [Tue, 6 Jun 2017 16:29:30 +0000 (09:29 -0700)]
bgpd: set bgp label-index range to (0-1048560)

Based on suggestions made in the FRR technical meeting, making the
label-index range 2^20-16 for the max label size minus the reserved
labels.

Ticket: CM-16513
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
7 years agoMerge branch 'stable/3.0'
David Lamparter [Tue, 6 Jun 2017 15:37:41 +0000 (17:37 +0200)]
Merge branch 'stable/3.0'

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #648 from qlyoung/fix-pollfd-stack-overflow
David Lamparter [Tue, 6 Jun 2017 15:25:06 +0000 (17:25 +0200)]
Merge pull request #648 from qlyoung/fix-pollfd-stack-overflow

lib: use heap for pollfds

7 years agoMerge pull request #676 from qlyoung/fix-fd-poll-block
David Lamparter [Tue, 6 Jun 2017 15:09:08 +0000 (17:09 +0200)]
Merge pull request #676 from qlyoung/fix-fd-poll-block

lib: allow infinite sleep in poll()

7 years agoMerge pull request #674 from dslicenc/cm16615
David Lamparter [Tue, 6 Jun 2017 15:08:33 +0000 (17:08 +0200)]
Merge pull request #674 from dslicenc/cm16615

bgpd: fix ipv6 network statement label-index node

7 years agoMerge pull request #673 from qlyoung/fix-srcdest-null0-helpstr
David Lamparter [Tue, 6 Jun 2017 15:07:42 +0000 (17:07 +0200)]
Merge pull request #673 from qlyoung/fix-srcdest-null0-helpstr

zebra: remove extraneous help string

7 years agoMerge branch 'frr/pull/672' into stable/3.0
David Lamparter [Tue, 6 Jun 2017 14:47:48 +0000 (16:47 +0200)]
Merge branch 'frr/pull/672' into stable/3.0

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge branch 'pr-660'
David Lamparter [Tue, 6 Jun 2017 14:41:02 +0000 (16:41 +0200)]
Merge branch 'pr-660'

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: fix addpath buffer overrun
Quentin Young [Fri, 2 Jun 2017 20:53:37 +0000 (20:53 +0000)]
bgpd: fix addpath buffer overrun

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
[DL: removed compile_commands.json]

7 years agolib: allow infinite sleep in poll()
Quentin Young [Mon, 5 Jun 2017 20:18:48 +0000 (20:18 +0000)]
lib: allow infinite sleep in poll()

If fd_poll() is called with no file descriptors, an incorrect check in
the function prelude causes it to return instantly; for a thread that
wishes to poll but has no file descriptors, this results in busy
waiting. Desired behavior is to block.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agobgpd: add "set label-index" route-map option
Don Slice [Fri, 2 Jun 2017 19:22:53 +0000 (12:22 -0700)]
bgpd: add "set label-index" route-map option

Added the ability to set the label-index value based on criteria other
than the network statement.  Manual testing looks good and added to the
ticket.

Ticket: CM-16513
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: CCR-6339
7 years agoMerge remote-tracking branch 'origin/master' into cm16615
Don Slice [Tue, 6 Jun 2017 12:31:12 +0000 (12:31 +0000)]
Merge remote-tracking branch 'origin/master' into cm16615

7 years agoMerge pull request #675 from opensourcerouting/ldpd-cherry-picks
Donald Sharp [Tue, 6 Jun 2017 12:24:47 +0000 (08:24 -0400)]
Merge pull request #675 from opensourcerouting/ldpd-cherry-picks

ldpd: cherry-pick fixes from master to stable/3.0

7 years agoMerge pull request #677 from opensourcerouting/rpm-merge-fix
Donald Sharp [Tue, 6 Jun 2017 12:24:22 +0000 (08:24 -0400)]
Merge pull request #677 from opensourcerouting/rpm-merge-fix

Rpm merge fix

7 years agopimd: fix pim bfd crash and bfd neigh down
Chirag Shah [Tue, 6 Jun 2017 01:21:52 +0000 (18:21 -0700)]
pimd: fix pim bfd crash and bfd neigh down

During running config, all IFPs are traversed, bfd interface config write
need to check for ifp->info null in case pim info is missing and skip the interface.

bfd update for address change need to check if particular pim neighbor's address matches
with bfd address update

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoredhat: Cleanup more merge fixes and add nhrpd/eigrpd to red hat package
Martin Winter [Mon, 5 Jun 2017 23:59:20 +0000 (16:59 -0700)]
redhat: Cleanup more merge fixes and add nhrpd/eigrpd to red hat package

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoredhat: Remove accidental leftover HEAD tag from merge
Martin Winter [Mon, 5 Jun 2017 21:19:15 +0000 (14:19 -0700)]
redhat: Remove accidental leftover HEAD tag from merge

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoldpd: fix bug in pseudowire control-word negotiation
Renato Westphal [Fri, 2 Jun 2017 14:14:54 +0000 (11:14 -0300)]
ldpd: fix bug in pseudowire control-word negotiation

Bingen discovered a bug in the pseudowire control-word negotiation that
might happen when the "control-word exclude" command is used. Under some
very specific conditions, ldpd might ignore a PWID label mapping when
it shouldn't.

This patch removes a wrong optimization that was preventing ldpd to call
l2vpn_pw_reset() every time we change the configuration of a pseudowire.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: fix issues detected by Coverity Scan
Renato Westphal [Thu, 27 Apr 2017 11:56:15 +0000 (08:56 -0300)]
ldpd: fix issues detected by Coverity Scan

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
Conflicts:
ldpd/ldpd.c
ldpd/ldpd.h

7 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>
7 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>
7 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>
7 years agobgpd: fix ipv6 network statement label-index node
Don Slice [Mon, 5 Jun 2017 13:13:57 +0000 (13:13 +0000)]
bgpd: fix ipv6 network statement label-index node

Problem reported with the inability to define "network x:x:x::/64 label-index" to
the config.  Found that the install_element was pointing to the wrong node.

Ticket: CM-16615
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
7 years agoMerge remote-tracking branch 'origin/stable/2.0'
Donald Sharp [Mon, 5 Jun 2017 12:19:11 +0000 (08:19 -0400)]
Merge remote-tracking branch 'origin/stable/2.0'

7 years agoMerge pull request #665 from opensourcerouting/rpm-postun-fix
Donald Sharp [Mon, 5 Jun 2017 11:46:11 +0000 (07:46 -0400)]
Merge pull request #665 from opensourcerouting/rpm-postun-fix

redhat/frr.spec.in: Fix postun script for Fedora.

7 years agobabeld: Modify code to use zapi_route function
Donald Sharp [Sun, 4 Jun 2017 23:21:40 +0000 (19:21 -0400)]
babeld: Modify code to use zapi_route function

Signed-off-by: Donald Sharp <sharpd@cumuusnetworks.com>
7 years agolib: Add zapi_route function.
Donald Sharp [Sun, 4 Jun 2017 23:14:44 +0000 (19:14 -0400)]
lib: Add zapi_route function.

Allow routing protocols to call one function to add/delete
routes into zebra.  Future commits will start adding
this code to individual routing protocols.

Why are we doing this?  Well the zapi_ipv[4|6]_route functions
are fundamentally broken in their ability to pass down anything
but NEXTHOP_TYPE_IFINDEX or NEXTHOP_TYPE_IPV[4|6] and we need
the ability to pass down a bit more information.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: remove extraneous help string
Quentin Young [Sun, 4 Jun 2017 21:01:52 +0000 (21:01 +0000)]
zebra: remove extraneous help string

caused tag to display null0 helpstr

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agobgpd: fix segfault with some show commands
Renato Westphal [Tue, 30 May 2017 11:30:57 +0000 (08:30 -0300)]
bgpd: fix segfault with some show commands

The following commands were causing bgpd to crash when vpnv4/vpnv6 static
routes are configured:

bgpd aborted: vtysh  -c "show ip bgp view all ipv4 vpn json"
bgpd aborted: vtysh  -c "show ip bgp view all ipv4 vpn"
bgpd aborted: vtysh  -c "show ip bgp view all ipv6 vpn json"
bgpd aborted: vtysh  -c "show ip bgp view all ipv6 vpn"
bgpd aborted: vtysh  -c "show ip bgp vrf all ipv4 vpn json"
bgpd aborted: vtysh  -c "show ip bgp vrf all ipv4 vpn"
bgpd aborted: vtysh  -c "show ip bgp vrf all ipv6 vpn json"
bgpd aborted: vtysh  -c "show ip bgp vrf all ipv6 vpn"
bgpd aborted: vtysh  -c "show bgp view all ipv4 vpn json"
bgpd aborted: vtysh  -c "show bgp view all ipv4 vpn"
bgpd aborted: vtysh  -c "show bgp view all ipv6 vpn json"
bgpd aborted: vtysh  -c "show bgp view all ipv6 vpn"
bgpd aborted: vtysh  -c "show bgp vrf all ipv4 vpn json"
bgpd aborted: vtysh  -c "show bgp vrf all ipv4 vpn"
bgpd aborted: vtysh  -c "show bgp vrf all ipv6 vpn json"
bgpd aborted: vtysh  -c "show bgp vrf all ipv6 vpn"

Problem found with the CLI fuzzer.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agobgpd: fix addpath buffer overrun
Quentin Young [Fri, 2 Jun 2017 20:53:37 +0000 (20:53 +0000)]
bgpd: fix addpath buffer overrun

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoospf6d: fix filter-list commands
Quentin Young [Fri, 2 Jun 2017 21:20:33 +0000 (21:20 +0000)]
ospf6d: fix filter-list commands

incorrect indexes resulted in use of area id as the name of the prefix
list

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agobgpd: fix large-community-list commands
Quentin Young [Fri, 2 Jun 2017 21:48:01 +0000 (21:48 +0000)]
bgpd: fix large-community-list commands

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoospfd: fix 'show ip ospf interface json'
Quentin Young [Fri, 2 Jun 2017 19:10:03 +0000 (19:10 +0000)]
ospfd: fix 'show ip ospf interface json'

json obj not recreated for each interface

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoospfd: shufflin
Quentin Young [Wed, 31 May 2017 19:04:53 +0000 (19:04 +0000)]
ospfd: shufflin

move virtual-link command down to be next to its no form

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoospfd: fix virtual-link timers commands
Quentin Young [Wed, 31 May 2017 19:00:39 +0000 (19:00 +0000)]
ospfd: fix virtual-link timers commands

Use {} semantics, correct docstrings, switchup parsing.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoredhat/frr.spec.in: Fix postun script for Fedora.
Martin Winter [Sun, 4 Jun 2017 07:43:34 +0000 (00:43 -0700)]
redhat/frr.spec.in: Fix postun script for Fedora.

Fedora uninstall showed some non-fatal postun script error because of an empty if which only applied to other distro's

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoMerge pull request #656 from qlyoung/fix-varhandler-reachable
Renato Westphal [Sat, 3 Jun 2017 22:00:52 +0000 (19:00 -0300)]
Merge pull request #656 from qlyoung/fix-varhandler-reachable

lib: free varhandlers on exit

7 years agoMerge pull request #657 from donaldsharp/rompapotamus
Renato Westphal [Sat, 3 Jun 2017 21:52:59 +0000 (18:52 -0300)]
Merge pull request #657 from donaldsharp/rompapotamus

Rompapotamus

7 years agoMerge pull request #663 from chiragshah6/pim_dev
Renato Westphal [Sat, 3 Jun 2017 21:45:23 +0000 (18:45 -0300)]
Merge pull request #663 from chiragshah6/pim_dev

ospfd: Fix ospf timers commands

7 years agoMerge pull request #646 from qlyoung/fix-ospf-timers
Renato Westphal [Sat, 3 Jun 2017 16:29:31 +0000 (13:29 -0300)]
Merge pull request #646 from qlyoung/fix-ospf-timers

Fix ospf timers

7 years agoMerge pull request #664 from opensourcerouting/ldpd-fixes
Donald Sharp [Sat, 3 Jun 2017 15:00:26 +0000 (11:00 -0400)]
Merge pull request #664 from opensourcerouting/ldpd-fixes

Ldpd fixes/cleanup

7 years agoospfd: fix clear ip ospf interface cmd
Chirag Shah [Sat, 3 Jun 2017 05:52:41 +0000 (22:52 -0700)]
ospfd: fix clear ip ospf interface cmd

clear ip ospf interface <IFNAME> parsing issue,
instead of arguement of interface "IFNAME" parsed.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
7 years agoMerge pull request #654 from qlyoung/ignore-compile-commands
Renato Westphal [Sat, 3 Jun 2017 02:27:56 +0000 (23:27 -0300)]
Merge pull request #654 from qlyoung/ignore-compile-commands

frr: ignore 'compile_commands.json'

7 years agoMerge pull request #647 from qlyoung/zebra-mpls-error-messages
Renato Westphal [Sat, 3 Jun 2017 01:53:53 +0000 (22:53 -0300)]
Merge pull request #647 from qlyoung/zebra-mpls-error-messages

zebra: more informative error messages & help strings for mpls labels

7 years agoMerge pull request #652 from donaldsharp/miscapotamus
Renato Westphal [Sat, 3 Jun 2017 01:40:56 +0000 (22:40 -0300)]
Merge pull request #652 from donaldsharp/miscapotamus

Miscapotamus

7 years agoMerge pull request #650 from donaldsharp/zebrafication
Renato Westphal [Sat, 3 Jun 2017 01:38:51 +0000 (22:38 -0300)]
Merge pull request #650 from donaldsharp/zebrafication

zebra: Refactor 'struct rib' to be 'struct route_entry'

7 years agoldpd: further improvements in the configuration handling
Renato Westphal [Fri, 2 Jun 2017 22:08:14 +0000 (19:08 -0300)]
ldpd: further improvements in the configuration handling

This patch attempts to make the code easier to read by removing a
global variable and changing a few other things. Also, ldpd now calls
merge_config() only after reading the whole initial configuration at
startup, instead of doing that for every command in the configuration
file.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: remove variable that is not necessary anymore
Renato Westphal [Fri, 2 Jun 2017 14:27:54 +0000 (11:27 -0300)]
ldpd: remove variable that is not necessary anymore

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: fix bug in pseudowire control-word negotiation
Renato Westphal [Fri, 2 Jun 2017 14:14:54 +0000 (11:14 -0300)]
ldpd: fix bug in pseudowire control-word negotiation

Bingen discovered a bug in the pseudowire control-word negotiation that
might happen when the "control-word exclude" command is used. Under some
very specific conditions, ldpd might ignore a PWID label mapping when
it shouldn't.

This patch removes a wrong optimization that was preventing ldpd to call
l2vpn_pw_reset() every time we change the configuration of a pseudowire.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>