]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoisisd: Register as BFD client
Christian Franke [Thu, 20 Sep 2018 13:38:22 +0000 (15:38 +0200)]
isisd: Register as BFD client

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoisisd: Add forward declaration of struct isis_route_info
Christian Franke [Thu, 20 Sep 2018 13:28:23 +0000 (15:28 +0200)]
isisd: Add forward declaration of struct isis_route_info

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agozebra_ptm: Add IS-IS and OpenFabric as protocols supporting BFD
Christian Franke [Thu, 20 Sep 2018 13:11:09 +0000 (15:11 +0200)]
zebra_ptm: Add IS-IS and OpenFabric as protocols supporting BFD

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agozebra_ptm: Introduce IS_BFD_ENABLED_PROTOCOL macro
Christian Franke [Thu, 20 Sep 2018 13:09:43 +0000 (15:09 +0200)]
zebra_ptm: Introduce IS_BFD_ENABLED_PROTOCOL macro

Unify the check if a client supports BFD into one location.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoMerge pull request #3098 from opensourcerouting/watchfrr-delay
Quentin Young [Thu, 4 Oct 2018 19:04:56 +0000 (15:04 -0400)]
Merge pull request #3098 from opensourcerouting/watchfrr-delay

tools/frr + watchfrr spring cleaning (southern hemisphere)

5 years agoMerge pull request #3126 from pacovn/Coverity_1424529_null_check
Rafael Zalamena [Thu, 4 Oct 2018 13:37:06 +0000 (10:37 -0300)]
Merge pull request #3126 from pacovn/Coverity_1424529_null_check

isisd: null check (Coverity 1424529)

5 years agoMerge pull request #3127 from pacovn/Coverity_1472236_Improper_use_of_negative_value
Donald Sharp [Thu, 4 Oct 2018 13:26:33 +0000 (09:26 -0400)]
Merge pull request #3127 from pacovn/Coverity_1472236_Improper_use_of_negative_value

zebra: netlink socket check (Coverity 1472236)

5 years agoMerge pull request #3128 from donaldsharp/cpp_notice_build_failure
David Lamparter [Thu, 4 Oct 2018 09:09:48 +0000 (11:09 +0200)]
Merge pull request #3128 from donaldsharp/cpp_notice_build_failure

lib: Include compiler.h as early as is possible in the build

5 years agoMerge pull request #3087 from opensourcerouting/bfd-memleak
Quentin Young [Wed, 3 Oct 2018 22:43:34 +0000 (18:43 -0400)]
Merge pull request #3087 from opensourcerouting/bfd-memleak

bfdd: fix memory leak and echo-mode start

5 years agoMerge pull request #3043 from qlyoung/doc-bgpd-multiple-ass
Lou Berger [Wed, 3 Oct 2018 22:03:48 +0000 (18:03 -0400)]
Merge pull request #3043 from qlyoung/doc-bgpd-multiple-ass

Doc bgpd multiple ASes

5 years agolib: refactor thread_execute
Rafael Zalamena [Mon, 1 Oct 2018 16:38:34 +0000 (13:38 -0300)]
lib: refactor thread_execute

Don't allocate threads in the stack, but use the standardized
`thread_get` and `thread_add_unused` to avoid creating corner cases in
the thread API.

This fixes a thread mutex memory leak in FreeBSD.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agolib: fix a memory leak in FreeBSD
Rafael Zalamena [Tue, 25 Sep 2018 15:05:53 +0000 (12:05 -0300)]
lib: fix a memory leak in FreeBSD

Two important changes:
* Centralize the thread teardown procedure;
* Save and restore thread mutex context to avoid losing the memory
  pointer;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agozebra: netlink socket check (Coverity 1472236)
F. Aragon [Wed, 3 Oct 2018 14:57:17 +0000 (16:57 +0200)]
zebra: netlink socket check (Coverity 1472236)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agolib: Include compiler.h as early as is possible in the build
Donald Sharp [Wed, 3 Oct 2018 16:27:57 +0000 (12:27 -0400)]
lib: Include compiler.h as early as is possible in the build

The compiler.h header provides us with some useful macro's
that we are using in the system.  We do not know exactly
where the CPP_NOTICE and CPP_WARN macros are used but
they can move around.  Place this header early in the
build then.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoisisd: null check (Coverity 1424529)
F. Aragon [Wed, 3 Oct 2018 14:38:49 +0000 (16:38 +0200)]
isisd: null check (Coverity 1424529)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agodoc: embellish bgp view docs
Quentin Young [Tue, 2 Oct 2018 15:31:48 +0000 (15:31 +0000)]
doc: embellish bgp view docs

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: add extra information on bgp views and vrfs
Quentin Young [Mon, 1 Oct 2018 17:30:56 +0000 (17:30 +0000)]
doc: add extra information on bgp views and vrfs

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agodoc: clarify documentation on BGP multiple AS
Quentin Young [Mon, 17 Sep 2018 19:18:47 +0000 (19:18 +0000)]
doc: clarify documentation on BGP multiple AS

Documentation on how to use multiple autonomous systems was inaccurate
and a bit scattered. Clarify usage of VRFs with multiple autonomous
systems, how to configure them, and their distinction from views. Also
moves a block on L3VPN VRFs out of the 'Basic Concepts' section.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #3004 from donaldsharp/other_peer
Lou Berger [Tue, 2 Oct 2018 15:40:09 +0000 (11:40 -0400)]
Merge pull request #3004 from donaldsharp/other_peer

bgpd: Try to notice when configuration changes during startup

5 years agoMerge pull request #3108 from dmbaturin/master
Martin Winter [Tue, 2 Oct 2018 14:58:12 +0000 (16:58 +0200)]
Merge pull request #3108 from dmbaturin/master

Add a script for building a Debian package in one step.

5 years agoMerge pull request #3113 from donaldsharp/uninited_value
David Lamparter [Tue, 2 Oct 2018 14:17:10 +0000 (16:17 +0200)]
Merge pull request #3113 from donaldsharp/uninited_value

bgpd: prevent uninited variable from being used.

5 years agoMerge pull request #3120 from opensourcerouting/remove-list-delete
Lou Berger [Tue, 2 Oct 2018 14:03:46 +0000 (10:03 -0400)]
Merge pull request #3120 from opensourcerouting/remove-list-delete

lib: remove deprecated list_delete()/list_free()

5 years agobgpd: prevent uninited variable from being used.
Donald Sharp [Mon, 1 Oct 2018 18:15:58 +0000 (14:15 -0400)]
bgpd: prevent uninited variable from being used.

Valgrind reports that temp could be used uninitialized
sometimes.

Signed-off-by: Donald sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3116 from opensourcerouting/libfrr-exec
Lou Berger [Tue, 2 Oct 2018 11:03:08 +0000 (07:03 -0400)]
Merge pull request #3116 from opensourcerouting/libfrr-exec

lib: print version information in libfrr.so

5 years agotools/frr: remove "watchfrr.started" hack
David Lamparter [Thu, 27 Sep 2018 02:46:17 +0000 (04:46 +0200)]
tools/frr: remove "watchfrr.started" hack

This is no longer neccessary since start-stop-daemon will block until
watchfrr's launch parent has exited.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agowatchfrr, lib: cleanup & delay detaching
David Lamparter [Thu, 27 Sep 2018 02:18:48 +0000 (04:18 +0200)]
watchfrr, lib: cleanup & delay detaching

This cleans up watchfrr to be more "normal" like the other daemons in
terms of what it does in main(), i.e. using the full frr_*() call set.

Also, this changes the startup behaviour on watchfrr to stay attached on
the daemon's parent process until startup is really complete.  This
should allow removing the "watchfrr.started" hack at some point.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3117 from pacovn/Coverity_1460436_dead_code
David Lamparter [Tue, 2 Oct 2018 10:24:44 +0000 (12:24 +0200)]
Merge pull request #3117 from pacovn/Coverity_1460436_dead_code

eigrpd: dead code (Coverity 1460436)

5 years agoMerge pull request #3118 from pacovn/Coverity_1399231_dead_code
David Lamparter [Tue, 2 Oct 2018 10:13:43 +0000 (12:13 +0200)]
Merge pull request #3118 from pacovn/Coverity_1399231_dead_code

ospf6d: dead code (Coverity 1399231)

5 years ago*: list_delete_and_null() -> list_delete()
David Lamparter [Tue, 2 Oct 2018 09:39:51 +0000 (11:39 +0200)]
*: list_delete_and_null() -> list_delete()

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: remove deprecated list_delete()/list_free()
David Lamparter [Tue, 2 Oct 2018 09:33:39 +0000 (11:33 +0200)]
lib: remove deprecated list_delete()/list_free()

Deprecation time has passed.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3102 from ton31337/feature/match_blackhole_nexthops
David Lamparter [Tue, 2 Oct 2018 09:29:59 +0000 (11:29 +0200)]
Merge pull request #3102 from ton31337/feature/match_blackhole_nexthops

bgpd: Match routes by type under route-maps

5 years agoospf6d: dead code (Coverity 1399231)
F. Aragon [Tue, 2 Oct 2018 08:51:47 +0000 (10:51 +0200)]
ospf6d: dead code (Coverity 1399231)

The dead code has been disabled with '#if 0', in a similar way to other
disabled logs in the same function.

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoeigrpd: dead code (Coverity 1460436)
F. Aragon [Tue, 2 Oct 2018 08:46:20 +0000 (10:46 +0200)]
eigrpd: dead code (Coverity 1460436)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agolib: print version information in libfrr.so
David Lamparter [Mon, 1 Oct 2018 17:02:39 +0000 (19:02 +0200)]
lib: print version information in libfrr.so

This makes libfrr.so executable to print its version info.  This is
useful if you need to check your libfrr.so matches your daemons.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobgpd: Match routes by type under route-maps
Donatas Abraitis [Fri, 28 Sep 2018 08:51:50 +0000 (11:51 +0300)]
bgpd: Match routes by type under route-maps

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agotools: add a script for building a Debian package in one step.
Daniil Baturin [Mon, 1 Oct 2018 18:38:44 +0000 (20:38 +0200)]
tools: add a script for building a Debian package in one step.

The script simplifies the relatively lengthy procedure.
It should be invoked from the top level source directory, for example:
./tools/build-debian-package.sh

Signed-off-by: Daniil Baturin <daniil@baturin.org>
5 years agoMerge pull request #3097 from opensourcerouting/static-linking
Lou Berger [Mon, 1 Oct 2018 17:29:18 +0000 (13:29 -0400)]
Merge pull request #3097 from opensourcerouting/static-linking

build: add --enable-static-bin option

5 years agobfdd: allow timer deactivation on shutdown
Rafael Zalamena [Thu, 13 Sep 2018 13:10:01 +0000 (10:10 -0300)]
bfdd: allow timer deactivation on shutdown

Peers being shutdown were keeping their timers, so move the cancel code
before the shutdown check.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobfdd: disable echo on neighbor request
Rafael Zalamena [Thu, 13 Sep 2018 13:09:03 +0000 (10:09 -0300)]
bfdd: disable echo on neighbor request

Don't send echo packets when the neighbor configures echo-interval of 0
(e.g. disabled).

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoMerge pull request #3105 from opensourcerouting/fix/sphinx-stamp
Quentin Young [Mon, 1 Oct 2018 16:35:45 +0000 (12:35 -0400)]
Merge pull request #3105 from opensourcerouting/fix/sphinx-stamp

doc: Use `mv -f` in Makefile

5 years agoospfd: fix symbol collision
David Lamparter [Mon, 1 Oct 2018 12:55:06 +0000 (14:55 +0200)]
ospfd: fix symbol collision

debug_init() was recently added in libfrr, which is now causing a build
error with static linking.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobgpd: Try to notice when configuration changes during startup
Donald Sharp [Tue, 11 Sep 2018 12:13:42 +0000 (08:13 -0400)]
bgpd: Try to notice when configuration changes during startup

During peer startup there exists the possibility that both
locally and remote peers try to start communication at the
same time.  In addition it is possible for local configuration
to change at the same time this is going on.  When this happens
try to notice that the remote peer may be in opensent or openconfirm
and if so we need to restart the connection from both sides.

Additionally try to write a bit of extra code in peer_xfer_conn
to notice when this happens and to emit a error message to
the end user about this happening so that it can be cleaned up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3086 from patrasar/1836
David Lamparter [Mon, 1 Oct 2018 13:26:40 +0000 (15:26 +0200)]
Merge pull request #3086 from patrasar/1836

ospfd: handling of OSPF_AREA_RANGE_ADVERTISE flag

5 years agobuild: add --enable-static-bin option
David Lamparter [Mon, 10 Sep 2018 18:10:19 +0000 (20:10 +0200)]
build: add --enable-static-bin option

This option can be used to get statically linked binaries.

Note: libfrr.la is removed from modules' library dependency list.  This
is intentional and explained in a comment in lib/subdir.am.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3111 from pacovn/Coverity_1302499_Logically_dead_code
David Lamparter [Mon, 1 Oct 2018 12:14:54 +0000 (14:14 +0200)]
Merge pull request #3111 from pacovn/Coverity_1302499_Logically_dead_code

ospfd: dead code (Coverity 1302499)

5 years agoMerge pull request #3110 from pacovn/Coverity_1221441_Explicit_null_dereferenced
David Lamparter [Mon, 1 Oct 2018 11:04:12 +0000 (13:04 +0200)]
Merge pull request #3110 from pacovn/Coverity_1221441_Explicit_null_dereferenced

ospf6d: null check (Coverity 1221441)

5 years agoMerge pull request #3106 from pacovn/Coverity_1446184_Copy-paste_error
David Lamparter [Mon, 1 Oct 2018 10:46:21 +0000 (12:46 +0200)]
Merge pull request #3106 from pacovn/Coverity_1446184_Copy-paste_error

lib: RB-tree copy-paste error (Coverity 1446184)

5 years agoMerge pull request #3103 from dslicenc/bgp-evpn-aggregate
David Lamparter [Mon, 1 Oct 2018 10:44:09 +0000 (12:44 +0200)]
Merge pull request #3103 from dslicenc/bgp-evpn-aggregate

bgpd: enable aggregation in evpn

5 years agoMerge pull request #3107 from opensourcerouting/fix/tools-gitignore
Lou Berger [Mon, 1 Oct 2018 10:43:58 +0000 (06:43 -0400)]
Merge pull request #3107 from opensourcerouting/fix/tools-gitignore

tools: Update .gitignore

5 years agoMerge pull request #3104 from dslicenc/bgp-repeat-aggregate
David Lamparter [Mon, 1 Oct 2018 10:43:15 +0000 (12:43 +0200)]
Merge pull request #3104 from dslicenc/bgp-repeat-aggregate

bgpd: solve issue entering aggregate twice

5 years agoMerge pull request #3074 from jpmondet/master
Martin Winter [Mon, 1 Oct 2018 10:40:11 +0000 (12:40 +0200)]
Merge pull request #3074 from jpmondet/master

frr-reload.py: Python3 compatibility

5 years agoMerge pull request #3034 from donaldsharp/LUA
David Lamparter [Mon, 1 Oct 2018 10:39:51 +0000 (12:39 +0200)]
Merge pull request #3034 from donaldsharp/LUA

Add initial thoughts on having lua act as a replacement for route-maps

5 years agoospfd: dead code (Coverity 1302499)
F. Aragon [Mon, 1 Oct 2018 10:03:15 +0000 (12:03 +0200)]
ospfd: dead code (Coverity 1302499)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoospf6d: null check (Coverity 1221441)
F. Aragon [Mon, 1 Oct 2018 09:51:17 +0000 (11:51 +0200)]
ospf6d: null check (Coverity 1221441)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agolib: RB-tree copy-paste error (Coverity 1446184)
F. Aragon [Fri, 28 Sep 2018 18:07:43 +0000 (20:07 +0200)]
lib: RB-tree copy-paste error (Coverity 1446184)

Overview:

Coverity points a copy-paste error in the Red-Black tree implementation. The
RB tree code is based on the OpenBSD implementation, so at first glance, it
is a strong point for thinking twice before touching anything.

Details:

The code is an augmented RB tree implementation [1], which adds to RB trees
the possibility of using a callback on every node update for updating per-node
associated metainformation. The bug is clear once checking other places where
the callback is called.

Impact:

- FRR: no impact, because the "augmented" capability is not being used.
- OpenBSD [2]: it seems there is no impact, at least in the 'src' repository.

Additional observations:

- If the "augmented" capability is not used, the code could run faster (at
  every operation on a node the callback is checked for not being NULL). May
  be branch prediction could be enough for those extra operations being
  negligible on most processors in use.

[1] http://kaba.hilvi.org/pastel-1.3.0/pastel/sys/redblacktree.htm
[2] GH mirror: https://github.com/openbsd/src/blob/master/sys/kern/subr_tree.c

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agotools: Update .gitignore
Christian Franke [Fri, 28 Sep 2018 18:33:29 +0000 (20:33 +0200)]
tools: Update .gitignore

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agodoc: Use `mv -f` in Makefile
Christian Franke [Fri, 28 Sep 2018 17:32:38 +0000 (19:32 +0200)]
doc: Use `mv -f` in Makefile

Sphinx always runs, even in the `make install` stage. When `make install`
is run as root and then another `make` is run by a nonprivileged user,
some versions of `mv` prompt like this:

    mv: replace 'doc/manpages/_build/man/man.stamp',
                 overriding mode 0644 (rw-r--r--)?

Add -f to `mv` to avoid this. As `-f` is part of Posix, this should be
portable enough.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agobgpd: resolve change required in pull review for evpn aggregates
Don Slice [Fri, 28 Sep 2018 17:29:18 +0000 (17:29 +0000)]
bgpd: resolve change required in pull review for evpn aggregates

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agobgpd: solve issue entering aggregate twice
Don Slice [Fri, 28 Sep 2018 15:55:39 +0000 (15:55 +0000)]
bgpd: solve issue entering aggregate twice

Problem reported that frr-relaod.py was not installing an aggregate
properly.  Problem was actually that frr-reload.py does the command
twice, and the second time the aggregate command was entered, it would
appear in the config but the aggregate was removed from the bgp table
and not advertised to peers.  Solved by noticing when an aggregate
was marked for deletion (info_invalid) and allowing the re-entry if
the old one was being removed.

Ticket: CM-22509
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agobgpd: enable aggregation in evpn
Don Slice [Thu, 27 Sep 2018 16:51:59 +0000 (16:51 +0000)]
bgpd: enable aggregation in evpn

Problem encountered where using the aggregate-address command in an
evpn environment did not work properly.  Depending on the order of
actions, the aggregate may not be created or removed when either the
commands were issued or routes come and go.

Ticket: CM-20585
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #3091 from donaldsharp/routemap_countemup
David Lamparter [Thu, 27 Sep 2018 10:04:24 +0000 (12:04 +0200)]
Merge pull request #3091 from donaldsharp/routemap_countemup

lib: Allow some usage statistics for route-maps

5 years agoMerge pull request #3096 from opensourcerouting/tools-frr-autoconf
Donald Sharp [Thu, 27 Sep 2018 01:46:15 +0000 (21:46 -0400)]
Merge pull request #3096 from opensourcerouting/tools-frr-autoconf

tools/frr: use path settings from ./configure

5 years agobgpd: Add lua match command
Donald Sharp [Tue, 7 Nov 2017 14:14:32 +0000 (09:14 -0500)]
bgpd: Add lua match command

Please note this is a Proof of Concept and not actually something
that is ready to commit at this point.  The file tools/lua.scr
contains some documentation on how we expect it to work currently.
Additionally not all bgp values have been hooked up into the
ability to lua script yet.

There is still significant work to be done here:

1) Add the ability to pass in more data and to adjust the return values
as appropriate.

To set it up:

1) copy tools/lua.scr into /etc/frr (or whereever the config
directory is )

2) Create a route-map match command:
!
router bgp 55
 neighbor 10.50.11.116 remote-as external
 !
 address-family ipv4 unicast
  neighbor 10.50.11.116 route-map TEST in
 exit-address-family
!
route-map TEST permit 10
 match command mooey
!

3) In the lua.scr file make sure that you have a function
named 'mooey' ( as the above example does ):

function mooey ()
   zlog_debug(string.format("Family: %d: %s %d ifindex: %d aspath: %s localpref: %d",
                            prefix.family, prefix.route,
    nexthop.metric, nexthop.ifindex, nexthop.aspath, nexthop.localpref))

   nexthop.metric =  33
   nexthop.localpref = 13
   return 3
end

This example script modifies the metric and localpref currently.  I've also provided
a zlog_debug function in lua to allow some simple debugging.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolua: Initial Lua import
Donald Sharp [Wed, 25 Oct 2017 19:06:30 +0000 (15:06 -0400)]
lua: Initial Lua import

This code sets up the ability to use lua inside of FRR.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agotools/frr: use path settings from ./configure
David Lamparter [Wed, 26 Sep 2018 23:49:07 +0000 (01:49 +0200)]
tools/frr: use path settings from ./configure

...so we properly locate config files and daemons whereever the user
decided to put them.

Signed-Off-By: David Lamparter <equinox@diac24.net>
5 years agofrr-reload.py: Add python2 & python3 compatibility.
jpmondet [Sun, 23 Sep 2018 12:22:17 +0000 (14:22 +0200)]
frr-reload.py: Add python2 & python3 compatibility.

Signed-off-by: jpmondet <jp@mondet.org>
5 years agoMerge pull request #3094 from pacovn/Coverity_1472227_dead_code
Rafael Zalamena [Wed, 26 Sep 2018 17:24:37 +0000 (14:24 -0300)]
Merge pull request #3094 from pacovn/Coverity_1472227_dead_code

ospfd: dead code (Coverity 1472227)

5 years agoMerge pull request #3089 from pacovn/Coverity_1473286_Out_of_bounds_access
Rafael Zalamena [Wed, 26 Sep 2018 17:22:27 +0000 (14:22 -0300)]
Merge pull request #3089 from pacovn/Coverity_1473286_Out_of_bounds_access

isisd: out of bounds access (Coverity 1473286)

5 years agoMerge pull request #3095 from pacovn/Coverity_1473199_1472624_dead_code
Rafael Zalamena [Wed, 26 Sep 2018 16:55:52 +0000 (13:55 -0300)]
Merge pull request #3095 from pacovn/Coverity_1473199_1472624_dead_code

bfdd zebra: dead code (Coverity 1472624 1473199)

5 years agobfdd zebra: dead code (Coverity 1472624 1473199)
F. Aragon [Wed, 26 Sep 2018 15:50:33 +0000 (17:50 +0200)]
bfdd zebra: dead code (Coverity 1472624 1473199)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoospfd: dead code (Coverity 1472227)
F. Aragon [Wed, 26 Sep 2018 15:25:42 +0000 (17:25 +0200)]
ospfd: dead code (Coverity 1472227)

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoMerge pull request #3092 from donaldsharp/bgp_listen_or_listen
Lou Berger [Wed, 26 Sep 2018 14:42:32 +0000 (10:42 -0400)]
Merge pull request #3092 from donaldsharp/bgp_listen_or_listen

bgpd: Don't necessarily ignore interface callbacks

5 years agoMerge pull request #3088 from pacovn/Coverity_1473593_dead_code
Donald Sharp [Wed, 26 Sep 2018 14:36:57 +0000 (10:36 -0400)]
Merge pull request #3088 from pacovn/Coverity_1473593_dead_code

zebra: dead code (Coverity 1473593)

5 years agobgpd: Don't necessarily ignore interface callbacks
Donald Sharp [Tue, 25 Sep 2018 19:25:51 +0000 (15:25 -0400)]
bgpd: Don't necessarily ignore interface callbacks

In bgp if we have not configured bgp we were ignoring
interface based callbacks.  Leading to states where
we may not be processing interface information.
Leading to states where we do not actually keep
ifp data.  As an example:

Suppose vrf A and vrf B.  A has interface swp1.
At the same time we only have a `router bgp 9 vrf B`
When we received the callback for moving swp1
from vrf A to vrf B we were not processing the
move at all and BGP would not consider the interface
part of vrf B at all.

This commit makes bgp pay attention to interface
events irrelevant if bgp is using that vrf.  This
is now consistent with how the lib/if* expects
to work and the rest of the daemons in FRR.

Signed-off-by: Donald Sharp <sharpd@cumulsnetworks.com>
5 years agolib: Allow some usage statistics for route-maps
Donald Sharp [Tue, 25 Sep 2018 19:02:51 +0000 (15:02 -0400)]
lib: Allow some usage statistics for route-maps

Keep track of how often route-maps are applied and
how often each clause of a route-map is applied.

This change showed that `show route-map` was outputting
odd data so fix that output and add in the applied
times too.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge branch 'pr/3063'
David Lamparter [Tue, 25 Sep 2018 17:12:37 +0000 (19:12 +0200)]
Merge branch 'pr/3063'

... with typo fixed.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agowatchfrr: Modify some stderr messages to zlog_warn
Donald Sharp [Thu, 20 Sep 2018 15:31:14 +0000 (11:31 -0400)]
watchfrr: Modify some stderr messages to zlog_warn

The stderr output is not being displayed as part of watchfrr invocation
in system startup.  Specifically if the user has not properly sent
1 or more daemons to monitor.  If the end-user is using tools/frr
this stderr is dropped( and systemd appears to drop stderr too? )

Modify the two stderr calls in this situation and use the zlog system.
Now I can clearly see an error message that tells me what has gone wrong.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
[DL: fixed typo]

5 years agoisisd: out of bounds access (Coverity 1473286)
F. Aragon [Tue, 25 Sep 2018 15:54:09 +0000 (17:54 +0200)]
isisd: out of bounds access (Coverity 1473286)

rawlspid_print(), which uses a fixed-width 8-byte input, has been replaced with
a call to isis_format_id(), allowing giving the input size.

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agozebra: dead code (Coverity 1473593)
F. Aragon [Tue, 25 Sep 2018 14:49:34 +0000 (16:49 +0200)]
zebra: dead code (Coverity 1473593)

Conditional code in netlink_macfdb_update() introduced in 2232a77c used
the 'dst_present' variable because not all cases were covered. Now it is
not necessary.

Signed-off-by: F. Aragon <paco@voltanet.io>
5 years agoospfd: handling of OSPF_AREA_RANGE_ADVERTISE flag
Sarita Patra [Tue, 25 Sep 2018 04:44:23 +0000 (21:44 -0700)]
ospfd: handling of OSPF_AREA_RANGE_ADVERTISE flag

Issue: # https://github.com/FRRouting/frr/issues/1836

Issue 1: if the router ospf current configuration is "area 0.0.0.2
range 1.0.0.0/24 cost 23" and user try to configure "area 0.0.0.2
range 1.0.0.0/24 not-advertise", the existing o/p is "area 0.0.0.2
range 1.0.0.0/24 cost 23 not-advertise". The keywords "not-advertise"
& "cost" are multually exclusive, so they should not come together.
The vice versa way configuration is working fine.

Fix: When ospf area range "not-advertise", the cost should be initialized
to OSPF_AREA_RANGE_COST_UNSPEC.

Issue 2: if the router ospf current configuration "area 0.0.0.2 range
1.0.0.0/24 substitute 2.0.0.0/24" and user try to configure "area 0.0.0.2
range 1.0.0.0/24 not-advertise" the existing o/p is "area 0.0.0.2 range
1.0.0.0/24 not-advertise substitute 2.0.0.0/24". The keywords
"not-advertise" & "substiture" are multually exclusive, so they should
not come together. The vice versa way configuration is working fine.

Fix: When ospf area range "not-advertise" is configured,
ospf_area_range_substitute_unset() should be get called.

Issue 3: if the router ospf6 current configuration is "area 0.0.0.2
range 2001::/64 cost 23" and user try to configure "area 0.0.0.2 range
2001::/64 advertise", the existing o/p is area 0.0.0.2 range 2001::/64.
The keyword "cost 23" disappears.

Fix: When ospf area range "advertise" is configured and the range is not
NULL, the cost should not be modified.

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agoMerge pull request #3081 from donaldsharp/table_table_table
Renato Westphal [Tue, 25 Sep 2018 02:32:50 +0000 (23:32 -0300)]
Merge pull request #3081 from donaldsharp/table_table_table

bgpd, lib, zebra: Wrapper get/set of table->info pointer

5 years agoMerge pull request #3083 from opensourcerouting/list-housekeeping
Donald Sharp [Mon, 24 Sep 2018 23:13:33 +0000 (19:13 -0400)]
Merge pull request #3083 from opensourcerouting/list-housekeeping

ospfd: remove unnecessary housekeeping code when using linked lists

5 years agoospfd: remove unnecessary housekeeping code when using linked lists
Renato Westphal [Mon, 24 Sep 2018 20:42:03 +0000 (17:42 -0300)]
ospfd: remove unnecessary housekeeping code when using linked lists

The head and tail pointers of linked lists should never be modified
manually, the linked list API guarantees that these pointers are always
valid and up-to-date.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #3082 from donaldsharp/memory
Rafael Zalamena [Mon, 24 Sep 2018 20:45:20 +0000 (17:45 -0300)]
Merge pull request #3082 from donaldsharp/memory

pimd: Fix several address sanitizer issues

5 years agopimd: Fix several address sanitizer issues
Donald Sharp [Mon, 24 Sep 2018 19:12:36 +0000 (15:12 -0400)]
pimd: Fix several address sanitizer issues

This commit fixes two issues during pim shutdown.

1) The rp_info structure was being freed before the
outgoing notifications that depended on it's information
was sent out as part of shutdown.

2) The pim->upstream_list shutdown involved iterating
over the list via ALL_LIST_ELEMENTS.  This typically
is enough but pim will auto delete child nodes as well
as itself when it goes away and they depend on it.  As such
the node and nnode could possibly already have been freed.
So change the way we look at all the data in the upstream_list

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3052 from donaldsharp/dplane_2
Russ White [Mon, 24 Sep 2018 14:54:16 +0000 (10:54 -0400)]
Merge pull request #3052 from donaldsharp/dplane_2

Dplane 2

5 years agoMerge pull request #3064 from NaveenThanikachalam/3049
Russ White [Mon, 24 Sep 2018 14:50:52 +0000 (10:50 -0400)]
Merge pull request #3064 from NaveenThanikachalam/3049

lib: Trigger callbacks to re-evaluate route-map clauses when "call" CLI is executed.

5 years agoMerge pull request #3069 from donaldsharp/bgp_nexthop_address
Russ White [Mon, 24 Sep 2018 14:49:28 +0000 (10:49 -0400)]
Merge pull request #3069 from donaldsharp/bgp_nexthop_address

Bgp nexthop address

5 years agoMerge pull request #3072 from donaldsharp/fix_eigrp_crash_on_int_shut
Russ White [Mon, 24 Sep 2018 14:48:23 +0000 (10:48 -0400)]
Merge pull request #3072 from donaldsharp/fix_eigrp_crash_on_int_shut

eigrpd: Fix eigrp crash on shut of a interface

5 years agoMerge pull request #3073 from donaldsharp/pid_cleanup
Russ White [Mon, 24 Sep 2018 14:47:38 +0000 (10:47 -0400)]
Merge pull request #3073 from donaldsharp/pid_cleanup

Pid cleanup

5 years agoMerge pull request #3075 from donaldsharp/pim_includes
Russ White [Mon, 24 Sep 2018 14:47:01 +0000 (10:47 -0400)]
Merge pull request #3075 from donaldsharp/pim_includes

pimd: Why was pim including zebra headers?

5 years agoMerge pull request #3076 from donaldsharp/eigrp_leaks
Russ White [Mon, 24 Sep 2018 14:46:29 +0000 (10:46 -0400)]
Merge pull request #3076 from donaldsharp/eigrp_leaks

eigrpd: Fix memory leaks and remove dead/unused functions

5 years agoMerge pull request #3020 from donaldsharp/global_5549
Russ White [Mon, 24 Sep 2018 13:55:50 +0000 (09:55 -0400)]
Merge pull request #3020 from donaldsharp/global_5549

Allow v6 global addresses to be nexthops for v4 addresses in bgp

5 years agoMerge pull request #2992 from opensourcerouting/large_as_path_fix
Donald Sharp [Mon, 24 Sep 2018 13:37:47 +0000 (09:37 -0400)]
Merge pull request #2992 from opensourcerouting/large_as_path_fix

bgpd: Fix for large AS paths which are split into segments

5 years agoeigrpd: Fix memory leaks and remove dead/unused functions
Donald Sharp [Mon, 24 Sep 2018 00:41:49 +0000 (20:41 -0400)]
eigrpd: Fix memory leaks and remove dead/unused functions

During shutdown we were not properly cleaning up some memory
as reported by valgrind.  Additionally during cleanup operations
I noticed that there were some dead/unused functions remove/reduce.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd, lib, zebra: Wrapper get/set of table->info pointer
Donald Sharp [Thu, 30 Aug 2018 23:11:39 +0000 (19:11 -0400)]
bgpd, lib, zebra: Wrapper get/set of table->info pointer

Wrapper the get/set of the table->info pointer so that
people are not directly accessing this data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agopimd: Why was pim including zebra headers?
Donald Sharp [Thu, 30 Aug 2018 23:08:11 +0000 (19:08 -0400)]
pimd: Why was pim including zebra headers?

Remove the inclusion of zebra headers from pim.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3071 from donaldsharp/fix_vrf_name
Lou Berger [Sun, 23 Sep 2018 10:35:14 +0000 (06:35 -0400)]
Merge pull request #3071 from donaldsharp/fix_vrf_name

lib: Allow useful display of default vrf name

5 years agoMerge pull request #3022 from donaldsharp/bgp_abstraction
Lou Berger [Sun, 23 Sep 2018 10:31:31 +0000 (06:31 -0400)]
Merge pull request #3022 from donaldsharp/bgp_abstraction

bgp_node abstraction

5 years agobgpd: Abstract bgp_nexthop_cache retrieving/setting from info pointer
Donald Sharp [Wed, 19 Sep 2018 12:20:37 +0000 (08:20 -0400)]
bgpd: Abstract bgp_nexthop_cache retrieving/setting from info pointer

The bgp_nexthop_cache data is stored as a void pointer in `struct bgp_node`.
Abstract retrieval of this data and setting of this data
into functions so that in the future we can move around
what is stored in bgp_node.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>