]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agoospfd: fix issue with the "no segment-routing prefix A.B.C.D/M" command
Renato Westphal [Fri, 19 Oct 2018 18:55:47 +0000 (15:55 -0300)]
ospfd: fix issue with the "no segment-routing prefix A.B.C.D/M" command

Add a missing check to bail out earlier when SR is not configured. The
same command without the "no" prefix has the same check as it prevents
unexpected things (i.e. crashes) from happening.

Fixes the following segfaults:
ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "no segment-routing prefix 1.1.1.1/32"
ospfd aborted: vtysh -c "configure terminal" -c "router ospf" -c "no segment-routing prefix 1.1.1.1/32 index 65535 no-php-flag"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoospf6d: fix two "show" commands
Renato Westphal [Fri, 19 Oct 2018 18:55:41 +0000 (15:55 -0300)]
ospf6d: fix two "show" commands

The "show ipv6 ospf6 interface [IFNAME] prefix" command shouldn't accept
the "match" keyword when a prefix is not given, otherwise ospf6d will
crash.

Fixes the following crashes:
ospf6d aborted: vtysh  -c "show ipv6 ospf6 interface eth99 prefix match"
ospf6d aborted: vtysh  -c "show ipv6 ospf6 interface prefix match"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agolib: fix the "no match ipv6 next-hop type" command
Renato Westphal [Fri, 19 Oct 2018 18:55:31 +0000 (15:55 -0300)]
lib: fix the "no match ipv6 next-hop type" command

Trivial NULL pointer dereference bug.

Fixes the following crash:
bgpd aborted: vtysh -c "configure terminal" -c "route-map RMAP permit 1" -c "no match ipv6 next-hop type"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: use the vrf_bitmap_*() helper functions when necessary
Renato Westphal [Fri, 19 Oct 2018 18:55:22 +0000 (15:55 -0300)]
bgpd: use the vrf_bitmap_*() helper functions when necessary

zclient->redist[afi][type] is a hash table and not an integer since a
while ago when VRF support was introduced. As such, zclient->redist[][]
should never be manipulated directly, the vrf_bitmap_*() helper functions
should be used instead. This fixes a few crashes found by the CLI fuzzer.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: fix bug while iterating over VPN table
Renato Westphal [Fri, 19 Oct 2018 18:55:12 +0000 (15:55 -0300)]
bgpd: fix bug while iterating over VPN table

The routing table data structure can create intermediate route nodes
during its normal operation, so we always need to check if the 'info'
pointer of a route node is NULL or not before dereferencing it.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: remove wrong assert
Renato Westphal [Fri, 19 Oct 2018 18:55:08 +0000 (15:55 -0300)]
bgpd: remove wrong assert

The vnc_direct_del_rn_group_rd() function can be called with the 'afi'
parameter set to AFI_L2VPN on some specific cases. Remove the assert to
fix the crash.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: fix NULL pointer dereference bug
Renato Westphal [Fri, 19 Oct 2018 18:55:03 +0000 (15:55 -0300)]
bgpd: fix NULL pointer dereference bug

Other parts of the rfapi code check if the 'rfg->rfapi_import_table'
pointer is NULL or not before using it. Do the same here to fix a crash
detected by the CLI fuzzer.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: add a NULL check to prevent a crash in the rfapi code
Renato Westphal [Fri, 19 Oct 2018 18:54:57 +0000 (15:54 -0300)]
bgpd: add a NULL check to prevent a crash in the rfapi code

The rfapiDeleteRemotePrefixesIt() function checks on several places if
'p' is NULL or not. Introduce an additional NULL check to prevent a
crash from happening.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: fix crashes caused by missing input validation
Renato Westphal [Fri, 19 Oct 2018 18:54:47 +0000 (15:54 -0300)]
bgpd: fix crashes caused by missing input validation

The rfapi code wasn't checking if strtoul() succeeded or not when parsing
the list of labels. Fix the affected commands by not allowing the user
to enter a non-numeric input.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: fix some NULL pointer dereference bugs
Renato Westphal [Fri, 19 Oct 2018 18:54:26 +0000 (15:54 -0300)]
bgpd: fix some NULL pointer dereference bugs

Other parts of the rfapi code also check if these pointers are NULL or
not before using them.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: fix the "no neighbor A.B.C.D maximum-prefix" command
Renato Westphal [Fri, 19 Oct 2018 18:54:05 +0000 (15:54 -0300)]
bgpd: fix the "no neighbor A.B.C.D maximum-prefix" command

The peer->group pointer is set only if the PEER_STATUS_GROUP flag is
set in the peer. Add a protection to prevent a NULL pointer dereference.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: handle NULL pointers in lcommunity_cmp()
Renato Westphal [Fri, 19 Oct 2018 18:53:55 +0000 (15:53 -0300)]
bgpd: handle NULL pointers in lcommunity_cmp()

Like community_cmp() and ecommunity_cmp(), the lcommunity_cmp() function
also needs to handle NULL pointers for correct operation.

Without this fix, bgpd can crash when entering the following commands:
vtysh -c "configure terminal" -c "ip large-community-list standard WORD deny"
vtysh -c "configure terminal" -c "no ip large-community-list expanded WORD"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobgpd: fix cleanup of dampening configuration
Renato Westphal [Fri, 19 Oct 2018 18:53:46 +0000 (15:53 -0300)]
bgpd: fix cleanup of dampening configuration

The bgp_damp_config_clean() function was deallocating some arrays without
resetting the variables that represent their sizes. This was leading to
some crashes because other parts of the code iterate over these arrays
by looking at their corresponding sizes, which could be invalid.

Fixes the following segfaults (which only happen under certain
circumstances):
vtysh -c "configure terminal" -c "router bgp 1" -c "bgp dampening"
vtysh -c "configure terminal" -c "router bgp 1" -c "no bgp dampening"
vtysh -c "configure terminal" -c "router bgp 1" -c "no bgp dampening 45"
vtysh -c "" -c "clear ip bgp dampening"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agobfdd: do not allow multihop peers without a local-address
Renato Westphal [Fri, 19 Oct 2018 18:53:33 +0000 (15:53 -0300)]
bfdd: do not allow multihop peers without a local-address

The BFD code assumes that multihop peers have a local address
configured. When that doesn't happen, the BFD client daemons fail to
decode some BFD ZAPI messages and abort. To fix this, do not accept the
configuration of multhop peers unless a local-address is configured.

Fixes the following segfaults:
- bgpd aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop"
- bgpd aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop vrf NAME"
- bgpd aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 vrf NAME multihop"
- ospf6d aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop"
- ospf6d aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 multihop vrf NAME"
- ospf6d aborted: vtysh -c "configure terminal" -c "bfd" -c "peer 1.1.1.1 vrf NAME multihop"

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #3212 from donaldsharp/rmap_crash
Renato Westphal [Sat, 20 Oct 2018 14:56:44 +0000 (11:56 -0300)]
Merge pull request #3212 from donaldsharp/rmap_crash

Rmap crash

5 years agobgpd: Dissallow v6 routes from setting a v4 nexthop
Donald Sharp [Sat, 20 Oct 2018 00:43:47 +0000 (20:43 -0400)]
bgpd: Dissallow v6 routes from setting a v4 nexthop

Do not allow a v6 route to set a v4 nexthop via a routemap.
As that this will crash bgp.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Prep commit to cleanup indentation
Donald Sharp [Sat, 20 Oct 2018 00:38:03 +0000 (20:38 -0400)]
bgpd: Prep commit to cleanup indentation

Signed-off-by: Donald Sharp <sahrpd@cumulusnetworks.com>
5 years agoMerge pull request #3203 from opensourcerouting/buildfoo-20181015
Donald Sharp [Fri, 19 Oct 2018 13:11:31 +0000 (09:11 -0400)]
Merge pull request #3203 from opensourcerouting/buildfoo-20181015

Debian packaging & generic build stuff

5 years agobuild: rewrite readline/curses check
David Lamparter [Sat, 6 Oct 2018 21:28:19 +0000 (23:28 +0200)]
build: rewrite readline/curses check

We don't need termcap/tinfo/curses, those are just for libreadline.  On
most modern systems, libreadline will pull in the appropriate libs it
needs on its own, so unconditionally adding them adds an extra unneeded
dependency for us.

Still need to try with curses/... for some systems, but only after bare
readline fails.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: remove bad USE_* options, add WERROR
David Lamparter [Mon, 15 Oct 2018 05:03:20 +0000 (07:03 +0200)]
debianpkg: remove bad USE_* options, add WERROR

This strips the USE_PIM, USE_BFD and USE_LDP options, all of which are
just straight up counterproductive knobs.

Instead, --enable-werror really needs to default to off, so add an
option for that.

Lastly, use --disable-dependency-tracking to speed up the build.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: clean up dependencies
David Lamparter [Mon, 15 Oct 2018 05:02:47 +0000 (07:02 +0200)]
debianpkg: clean up dependencies

- accept either python2 or python3 packages for everything
- drop texlive-latex-base, texlive-generic-recommended (only needed for
  PDF docs)
- python-ipaddr is not a build time requirement, only runtime

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agodebianpkg: strip ancient/unused cruft
David Lamparter [Mon, 15 Oct 2018 05:00:42 +0000 (07:00 +0200)]
debianpkg: strip ancient/unused cruft

The SNMP MIB directory is unneeded, --enable-poll has been long gone,
the "build" target is straight up wrong (causing FRR to be built in the
install step) and we haven't needed /proc for configure in ages either.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobuild: try to use -D option for ar and ranlib
David Lamparter [Sun, 7 Oct 2018 00:49:20 +0000 (02:49 +0200)]
build: try to use -D option for ar and ranlib

The -D option zeroes out timestamps in .a files and has become the
default on recent distributions to enable reproducible builds.

This also shuts up the "u ignored because D is default" warning that is
showing up on some distributions.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobuild: fix some escapes in configure.ac
David Lamparter [Sun, 7 Oct 2018 22:49:24 +0000 (00:49 +0200)]
build: fix some escapes in configure.ac

Some test statements were missing "" around variables causing syntax
errors during configure runs.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3201 from donaldsharp/breadcrumbs_for_donald
David Lamparter [Fri, 19 Oct 2018 11:07:15 +0000 (13:07 +0200)]
Merge pull request #3201 from donaldsharp/breadcrumbs_for_donald

zebra: Add some missing breadcrumbs

5 years agoMerge pull request #3186 from donaldsharp/aggregate_ecomm
David Lamparter [Fri, 19 Oct 2018 10:34:08 +0000 (12:34 +0200)]
Merge pull request #3186 from donaldsharp/aggregate_ecomm

Aggregate ecommunity and lcommunity addition

5 years agoMerge pull request #3163 from donaldsharp/more_vty_errors
David Lamparter [Fri, 19 Oct 2018 10:11:21 +0000 (12:11 +0200)]
Merge pull request #3163 from donaldsharp/more_vty_errors

lib, vtysh: Allow notification across multiple lines of failure

5 years agoMerge pull request #3191 from donaldsharp/more_vty
Renato Westphal [Thu, 18 Oct 2018 14:54:58 +0000 (11:54 -0300)]
Merge pull request #3191 from donaldsharp/more_vty

bgpd: Add a better breadcrumb for interface based peers

5 years agoMerge pull request #3189 from opensourcerouting/libunwind
Donald Sharp [Thu, 18 Oct 2018 14:45:32 +0000 (10:45 -0400)]
Merge pull request #3189 from opensourcerouting/libunwind

lib: add libunwind support for backtraces

5 years agozebra: Add some missing breadcrumbs
Donald Sharp [Thu, 18 Oct 2018 13:13:18 +0000 (09:13 -0400)]
zebra: Add some missing breadcrumbs

During a debugging session last night I discovered that I was
still having some `fun` figuring out why zebra was not making
a route's nexthop active.  After some debugging I figured out
that I was missing some states that we could end up in that
didn't have debug information about what happened in nexthop_active.

Add the missing breadcrumbs for nexthop resolution.  In addition
add a bit of code to notice the ebgp state without recursion turned
on and to let the user know about it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3195 from donaldsharp/nht_crash
David Lamparter [Thu, 18 Oct 2018 03:10:37 +0000 (05:10 +0200)]
Merge pull request #3195 from donaldsharp/nht_crash

Nht crash

5 years agoMerge pull request #3190 from qlyoung/allow-static-onlink
Renato Westphal [Thu, 18 Oct 2018 02:26:04 +0000 (23:26 -0300)]
Merge pull request #3190 from qlyoung/allow-static-onlink

staticd: add ability to create onlink static route

5 years agoMerge pull request #3196 from dslicenc/l2vpn-evpn-upd-grps
Renato Westphal [Thu, 18 Oct 2018 01:49:44 +0000 (22:49 -0300)]
Merge pull request #3196 from dslicenc/l2vpn-evpn-upd-grps

bgpd: add command to display update groups for l2vpn evpn

5 years agolib: add libunwind support for backtraces
David Lamparter [Thu, 24 Aug 2017 14:09:48 +0000 (16:09 +0200)]
lib: add libunwind support for backtraces

libunwind provides an alternate to backtrace() for printing out the call
stack of a particular location.  It doesn't use the frame pointer, it
goes by the DWARF debug info.  In most cases the traces have exactly the
same information, but there are some situations where libunwind traces
are better.

(On some platforms, the libc backtrace() also uses the DWARF debug info
[e.g.: ARM backtraces are impossible without it] but this is not the
case everywhere, especially not on BSD libexecinfo.)

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agobgpd: add command to display update groups for l2vpn evpn
Don Slice [Wed, 17 Oct 2018 13:35:10 +0000 (13:35 +0000)]
bgpd: add command to display update groups for l2vpn evpn

For troubleshooting purposes, it's useful to display the update-groups
for l2vpn evpn

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
5 years agoMerge pull request #3192 from lkrishnamoor/evpn_route_server
Donald Sharp [Wed, 17 Oct 2018 18:38:31 +0000 (14:38 -0400)]
Merge pull request #3192 from lkrishnamoor/evpn_route_server

bgpd: Route Server support for evpn address-family

5 years agoMerge pull request #3194 from opensourcerouting/bugfix/isis-misc
Donald Sharp [Wed, 17 Oct 2018 18:38:16 +0000 (14:38 -0400)]
Merge pull request #3194 from opensourcerouting/bugfix/isis-misc

Bugfix: IS-IS fragmentation issues

5 years agobgpd: Cleanup bnch_nexthop_cache_reset to fit cleaner
Donald Sharp [Wed, 17 Oct 2018 15:31:34 +0000 (11:31 -0400)]
bgpd: Cleanup bnch_nexthop_cache_reset to fit cleaner

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Fix crash when using v4 route w/ v6 nexthop
Donald Sharp [Wed, 17 Oct 2018 15:27:30 +0000 (11:27 -0400)]
bgpd: Fix crash when using v4 route w/ v6 nexthop

Recent changes to the nht code in bgp caused us to actually
keep a true count of v6 nexthop paths when using v4 over v6.
This change introduced a race condition on shutdown on who
got to the bnc cache first( the v4 table or not ).  Effectively
we were allowing the continued existence of the path->nexthop
pointing to the freed bnc.  This was especially true when
we had route leaking.   So when we free the bnc make sure
we clean up the path->nexthop variables pointing at it too.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Route Server support for evpn address-family
Lakshman Krishnamoorthy [Wed, 17 Oct 2018 00:44:57 +0000 (17:44 -0700)]
bgpd: Route Server support for evpn address-family
Signed-off-by: Lakshman Krishnamoorthy lkrishnamoor@vmware.com
5 years agobgpd: Add a better breadcrumb for interface based peers
Donald Sharp [Tue, 16 Oct 2018 21:26:21 +0000 (17:26 -0400)]
bgpd: Add a better breadcrumb for interface based peers

If you are using bgp unnumbered( or interface based peers )
when we detect an error give the user a bit more of a clue
what they may have done wrong.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agostaticd: add ability to create onlink static route
Quentin Young [Tue, 16 Oct 2018 20:49:32 +0000 (20:49 +0000)]
staticd: add ability to create onlink static route

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoisisd: adjust lsp size to area->lsp_size before packing
Christian Franke [Tue, 16 Oct 2018 17:17:10 +0000 (19:17 +0200)]
isisd: adjust lsp size to area->lsp_size before packing

IS-IS would ignore any area lsp-mtu setting configured after initial
creation of the LSP since move to the new tlv serialized/deserializer.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoisisd: Unlink LSP fragments from LSP0 on lsp_destroy
Christian Franke [Tue, 16 Oct 2018 15:36:45 +0000 (17:36 +0200)]
isisd: Unlink LSP fragments from LSP0 on lsp_destroy

isisd would crash when lsp fragments aged out, since they got freed
correctly, but were not removed from LSP0's linked list of fragments.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
5 years agoMerge pull request #3188 from opensourcerouting/bgp-snmp-fix-rename
Quentin Young [Tue, 16 Oct 2018 17:18:34 +0000 (13:18 -0400)]
Merge pull request #3188 from opensourcerouting/bgp-snmp-fix-rename

bgpd: fix missed info->path rename in snmp

5 years agobgpd: fix missed info->path rename in snmp
David Lamparter [Tue, 16 Oct 2018 16:14:17 +0000 (18:14 +0200)]
bgpd: fix missed info->path rename in snmp

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoMerge pull request #3157 from pguibert6WIND/doc_expanded
Donald Sharp [Tue, 16 Oct 2018 15:52:22 +0000 (11:52 -0400)]
Merge pull request #3157 from pguibert6WIND/doc_expanded

doc: inform user that expanded communities can not be used in set mode

5 years agobgpd: Add Large community support to aggregate routes
Donald Sharp [Tue, 16 Oct 2018 12:24:01 +0000 (08:24 -0400)]
bgpd: Add Large community support to aggregate routes

Add the ability to track and support Large communities for aggregate
routes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Add extended community to aggregates
Donald Sharp [Tue, 16 Oct 2018 12:13:03 +0000 (08:13 -0400)]
bgpd: Add extended community to aggregates

Add the ability to aggregate routes to handle
extended communities.  Make the actions similiar
to what we do for normal communities.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3179 from donaldsharp/vni_cmp
Renato Westphal [Tue, 16 Oct 2018 01:51:03 +0000 (22:51 -0300)]
Merge pull request #3179 from donaldsharp/vni_cmp

bgpd: The l2vni list compare function does not sort

5 years agoMerge pull request #3181 from qlyoung/frr-sss-indent
Renato Westphal [Tue, 16 Oct 2018 01:46:38 +0000 (22:46 -0300)]
Merge pull request #3181 from qlyoung/frr-sss-indent

tools: reindent frr

5 years agobgpd: Ensure that evpn_vtep_ip_cmp actually returns useful data
Donald Sharp [Mon, 15 Oct 2018 15:48:03 +0000 (11:48 -0400)]
bgpd: Ensure that evpn_vtep_ip_cmp actually returns useful data

The evpn_vtep_ip_cmp function must return positive and negative
numbers for when we are doing sorted linked list inserts.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agotools: reindent frr
Quentin Young [Mon, 15 Oct 2018 15:43:25 +0000 (15:43 +0000)]
tools: reindent frr

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agobgpd: The l2vni list compare function does not sort
Donald Sharp [Mon, 15 Oct 2018 15:41:39 +0000 (11:41 -0400)]
bgpd: The l2vni list compare function does not sort

The purpose of adding a l2vni as an sorted list is
shot in the foot when the l2vni compare function only
returns 0 or 1.  This will cause subtle crashes when
we add sorted and we end up with multiple list node pointing
to the same thing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3178 from vincentbernat/fix/json-route-ipv6
Quentin Young [Mon, 15 Oct 2018 15:34:52 +0000 (11:34 -0400)]
Merge pull request #3178 from vincentbernat/fix/json-route-ipv6

bgpd: fix IPv6 next-hop field name for routes in JSON

5 years agobgpd: fix IPv6 next-hop field name for routes in JSON
Vincent Bernat [Mon, 15 Oct 2018 13:08:37 +0000 (15:08 +0200)]
bgpd: fix IPv6 next-hop field name for routes in JSON

This may break existing clients but the original name contains two
errors.

Signed-off-by: Vincent Bernat <vincent@bernat.ch>
5 years agodoc: inform user that expanded communities can not be used in set mode
Philippe Guibert [Wed, 10 Oct 2018 09:19:05 +0000 (11:19 +0200)]
doc: inform user that expanded communities can not be used in set mode

Expanded communities can not be used in route-map set actions.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoMerge pull request #3172 from opensourcerouting/bfd-mhop-lookup
Donald Sharp [Sun, 14 Oct 2018 22:04:22 +0000 (18:04 -0400)]
Merge pull request #3172 from opensourcerouting/bfd-mhop-lookup

bfdd: fix multi hop hash lookup

5 years agobfdd: fix multi hop hash lookup
Rafael Zalamena [Sun, 14 Oct 2018 13:39:55 +0000 (15:39 +0200)]
bfdd: fix multi hop hash lookup

Use the proper multi hop hash for matching multi hop peers.

Spotted by Dmitrii Turlupov.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agoMerge pull request #3024 from ton31337/fix/validate_route-map
Russ White [Sun, 14 Oct 2018 12:48:48 +0000 (08:48 -0400)]
Merge pull request #3024 from ton31337/fix/validate_route-map

bgpd: Check if route-map really exists before applying to the peer

5 years agoMerge pull request #3142 from donaldsharp/bgp_peerhash
Russ White [Fri, 12 Oct 2018 20:55:50 +0000 (16:55 -0400)]
Merge pull request #3142 from donaldsharp/bgp_peerhash

Bgp peerhash

5 years agoMerge pull request #3134 from donaldsharp/bum_flooding
Russ White [Fri, 12 Oct 2018 20:52:21 +0000 (16:52 -0400)]
Merge pull request #3134 from donaldsharp/bum_flooding

Bum flooding control for BGP and Zebra

5 years agoMerge pull request #3168 from adharkar/frr-bgp_json
Russ White [Fri, 12 Oct 2018 20:48:08 +0000 (16:48 -0400)]
Merge pull request #3168 from adharkar/frr-bgp_json

bgpd: BGP JSON new fields

5 years agoMerge pull request #3167 from chiragshah6/ospfv3_dev
Russ White [Fri, 12 Oct 2018 19:55:59 +0000 (15:55 -0400)]
Merge pull request #3167 from chiragshah6/ospfv3_dev

ospf6d: fix ospf6 crash in inp lsa processing

5 years agoMerge pull request #3137 from opensourcerouting/feature/isis-bfd
Donald Sharp [Fri, 12 Oct 2018 17:58:26 +0000 (13:58 -0400)]
Merge pull request #3137 from opensourcerouting/feature/isis-bfd

Feature: BFD for IS-IS

5 years agoospf6d: fix ospf6 crash in inp lsa processing
Chirag Shah [Thu, 11 Oct 2018 16:08:37 +0000 (09:08 -0700)]
ospf6d: fix ospf6 crash in inp lsa processing

Use ospf6_prefix_same for comparing two exact same prefix
to determine ECMP for a route.
ospf6_route_cmp expects two different prefix rather
being exactly same.

Ticket:CM-22630
Testing Done:
performed ECMP of intra network prefix route via
sending same route via different available
ospf6 paths.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
5 years agoisisd: Fix license header of bfd code
Christian Franke [Fri, 12 Oct 2018 16:56:07 +0000 (18:56 +0200)]
isisd: Fix license header of bfd code

5 years agoisisd: Address code-style warnings
Christian Franke [Fri, 12 Oct 2018 14:45:32 +0000 (16:45 +0200)]
isisd: Address code-style warnings

5 years agobgpd: Add '[no] flood <disable|head-end-replication>'
Donald Sharp [Thu, 4 Oct 2018 23:20:12 +0000 (19:20 -0400)]
bgpd: Add '[no] flood <disable|head-end-replication>'

Add the '[no] flood <disable|head-end-replication>' command
to the l2vpn evpn afi/safi sub commands for bgp.  This command
when entered as 'flood disable' will turn off type 3 route
generation for the transmittal of the type 3 route necessary
for BUM replication on the remote VTEP.  Additionally it will
turn off the BUM handling via the new zebra command,
ZEBRA_VXLAN_FLOOD_CONTROL.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib, zebra: Allow the specification of BUM flooding
Donald Sharp [Thu, 4 Oct 2018 22:42:57 +0000 (18:42 -0400)]
lib, zebra: Allow the specification of BUM flooding

Allow the modification of whether or not we will allow
BUM flooding on the vxlan bridge.  To do this allow
the upper level protocol to specify via the ZEBRA_VXLAN_FLOOD_CONTROL
zapi message.

If flooding is disabled then BUM traffic will not be forwarded
to other VTEP's.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3140 from vishaldhingra/b_2802
Donald Sharp [Fri, 12 Oct 2018 00:18:57 +0000 (20:18 -0400)]
Merge pull request #3140 from vishaldhingra/b_2802

zebra : VRF aware route map in zebra

5 years agobgpd: BGP JSON new fields
Ameya Dharkar [Thu, 11 Oct 2018 22:35:21 +0000 (15:35 -0700)]
bgpd: BGP JSON new fields

1. "show bgp ipv4 json"
  - Added "network" field which displays a prefix in 'prefix/prefixlen' format.

2. "show bgp ipv6 json"
  - Added "network" field which displays a prefix in 'prefix/prefixlen' format.
  - JSON does not have "prefix", "prefixLen" fields which are present in IPv4
    command. Added these fields as they are useful.

3. "show bgp ipv4/ipv6 neighbor <neighbor_addr> advertised-routes json"
  - Added "network" field.

4. "show bgp ipv4/ipv6 summary json"
  - Added "pfxSnt" for peers. This count is obtained from corresponding
    update_subgroup.

5. "show bgp neighbor json"
  - Added "sentPrefixCounter"

Signed-off-by: Ameya Dharkar <adharkar@vmware.org>
5 years agozebra: vrf aware routmap is missing in Zebra #2802(Part 4 of 4)
vishaldhingra [Thu, 11 Oct 2018 17:49:34 +0000 (10:49 -0700)]
zebra: vrf aware routmap is missing in Zebra #2802(Part 4 of 4)

The new cli for show output

Signed-off-by: vishaldhingra vdhingra@vmware.com
5 years agozebra: vrf aware routmap is missing in Zebra #2802(Part 3 of 4)
vishaldhingra [Thu, 11 Oct 2018 17:48:23 +0000 (10:48 -0700)]
zebra: vrf aware routmap is missing in Zebra #2802(Part 3 of 4)

The cli changes to allow this to work.

Signed-off-by: vishaldhingra vdhingra@vmware.com
5 years agozebra: vrf aware routmap is missing in Zebra #2802(Part 2 of 4)
vishaldhingra [Thu, 11 Oct 2018 17:46:55 +0000 (10:46 -0700)]
zebra: vrf aware routmap is missing in Zebra #2802(Part 2 of 4)

Function parameter replacement of using zvrf instead of vrf_id

Signed-off-by: vishaldhingra vdhingra@vmware.com
5 years ago zebra: vrf aware routmap is missing in Zebra #2802(Part 1 of 4)
vishaldhingra [Thu, 11 Oct 2018 17:44:55 +0000 (10:44 -0700)]
 zebra: vrf aware routmap is missing in Zebra #2802(Part 1 of 4)

 Work to handle the route-maps, namely the header changes in zebra_vrf.h
 and the mapping of using that everywhere

Signed-off-by: vishaldhingra vdhingra@vmware.com
5 years agolib, vtysh: Allow notification across multiple lines of failure
Donald Sharp [Thu, 11 Oct 2018 13:43:32 +0000 (09:43 -0400)]
lib, vtysh: Allow notification across multiple lines of failure

When reading in config files and we have failures on multiple
lines actually note the actual failure lines and return them.
This fixes an issue where we stopped counting errors after
the first one and we got missleading line numbers that
did not correspond to the actual problem.

This is fixed:
sharpd@donna ~/frr> sudo /usr/lib/frr/pimd --log=stdout -A 127.0.0.1 -f /etc/frr/pimd.conf
2018/10/11 09:41:01 PIM: VRF Created: default(0)
2018/10/11 09:41:01 PIM: pim_vrf_enable: for default
2018/10/11 09:41:01 PIM: zclient_lookup_sched_now: zclient lookup immediate connection scheduled
2018/10/11 09:41:01 PIM: zclient_lookup_new: zclient lookup socket initialized
2018/10/11 09:41:01 PIM: pimd 6.1-dev starting: vty@2611
2018/10/11 09:41:01 PIM: [EC 100663304] ERROR: No such command on config line 2: inteface lo
2018/10/11 09:41:01 PIM: [EC 100663304] ERROR: No such command on config line 3: ip igmp
2018/10/11 09:41:01 PIM: [EC 100663304] ERROR: No such command on config line 4: ip igmp join 224.1.1.1 13.13.13.2
^C2018/10/11 09:45:09 PIM: Terminating on signal SIGINT
2018/10/11 09:45:09 PIM: VRF Deletion: default(0)

Fixes: #3161
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3032 from donaldsharp/bgp_info
Lou Berger [Thu, 11 Oct 2018 13:17:31 +0000 (09:17 -0400)]
Merge pull request #3032 from donaldsharp/bgp_info

`struct bgp_info` to `struct bgp_path_info`

5 years agobgpd: Check if route-map really exists before applying to the peer
Donatas Abraitis [Fri, 14 Sep 2018 08:56:46 +0000 (11:56 +0300)]
bgpd: Check if route-map really exists before applying to the peer

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agoMerge pull request #3153 from adharkar/frr-scount
Donald Sharp [Wed, 10 Oct 2018 19:42:20 +0000 (15:42 -0400)]
Merge pull request #3153 from adharkar/frr-scount

bgpd: Incorrect sent prefix count for a split subgroup

5 years agobgpd: Incorrect sent prefix count for a split subgroup
Ameya Dharkar [Tue, 9 Oct 2018 18:56:46 +0000 (11:56 -0700)]
bgpd: Incorrect sent prefix count for a split subgroup

When a subgroup splits to form a new subgroup because of policy changes
for a peer, new subgroup copies adj out(state about advertised routes)
from the parent subgroup. At the same time, it should also copy
scount(advertised prefix count) to the new subgroup for the count to be
in sync with the adj_out for the subgroup.

Signed-off-by: Ameya Dharkar <adharkar@vmware.org>
5 years agoMerge pull request #3155 from opensourcerouting/building_instructions
Quentin Young [Wed, 10 Oct 2018 18:18:45 +0000 (14:18 -0400)]
Merge pull request #3155 from opensourcerouting/building_instructions

doc: update building instructions

5 years agoMerge pull request #3159 from pguibert6WIND/doc_draft_bgp
Quentin Young [Wed, 10 Oct 2018 18:15:15 +0000 (14:15 -0400)]
Merge pull request #3159 from pguibert6WIND/doc_draft_bgp

doc: fix warning of doc compilation with bgp draft

5 years agoMerge pull request #3154 from donaldsharp/bgp_mem_lem
Renato Westphal [Wed, 10 Oct 2018 16:08:28 +0000 (13:08 -0300)]
Merge pull request #3154 from donaldsharp/bgp_mem_lem

Bgp mem issue with martian address interface strings

5 years agodoc: simplify build instructions
Renato Westphal [Wed, 10 Oct 2018 14:07:48 +0000 (11:07 -0300)]
doc: simplify build instructions

Remove all --enable-xxx configuration flags for features that are enabled
by default.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agodoc: update build instructions for Debian 9
Renato Westphal [Wed, 10 Oct 2018 14:00:50 +0000 (11:00 -0300)]
doc: update build instructions for Debian 9

The instruction to checkout to the stable/3.0 branch doesn't belong
here.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agodoc: remove LibXML from the list of dependencies
Renato Westphal [Wed, 10 Oct 2018 13:57:30 +0000 (10:57 -0300)]
doc: remove LibXML from the list of dependencies

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
5 years agoMerge pull request #3145 from pguibert6WIND/ipv6nexthop
Donald Sharp [Wed, 10 Oct 2018 14:08:01 +0000 (10:08 -0400)]
Merge pull request #3145 from pguibert6WIND/ipv6nexthop

bgpd: in case nexthop is ipv6, set nh attribute flag in mpls vpn case

5 years agobgpd: in case nexthop is ipv6, set nh attribute flag in mpls vpn case
Philippe Guibert [Mon, 8 Oct 2018 12:15:12 +0000 (14:15 +0200)]
bgpd: in case nexthop is ipv6, set nh attribute flag in mpls vpn case

In mpls vpn import/export, the nexthop attribute should also be
recognised for ipv6 too.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agodoc: fix warning of doc compilation with bgp draft
Philippe Guibert [Wed, 10 Oct 2018 09:49:33 +0000 (11:49 +0200)]
doc: fix warning of doc compilation with bgp draft

Some draft ietf are not handle by :rfc: keyword. A workaround is
proposed, like it has been done for flowspec.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: Cleanup memory leak with the martian address intf string
Donald Sharp [Wed, 10 Oct 2018 00:19:01 +0000 (20:19 -0400)]
bgpd: Cleanup memory leak with the martian address intf string

When cleaning up a interface string, from the linked list we were
dropping the name pointer which held the allocated martian address
intf string.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Use a more appropriate memory type for a string
Donald Sharp [Wed, 10 Oct 2018 00:16:37 +0000 (20:16 -0400)]
bgpd: Use a more appropriate memory type for a string

Track the memory type associated with the bartian address
interface a bit better, instead of using MTYPE_TMP.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Cleanup warnings issued by CI system from these changes
Donald Sharp [Wed, 3 Oct 2018 12:22:38 +0000 (08:22 -0400)]
bgpd: Cleanup warnings issued by CI system from these changes

Modify code to cleanup warnings issued by the CI system from
this series of changes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Rename various variable names to something more appropriate
Donald Sharp [Wed, 3 Oct 2018 00:43:07 +0000 (20:43 -0400)]
bgpd: Rename various variable names to something more appropriate

ri -> pi
bi -> bpi
info -> path
info -> rmap_path ( for routemap applications )

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Convert binfo to path
Donald Sharp [Tue, 2 Oct 2018 22:34:03 +0000 (18:34 -0400)]
bgpd: Convert binfo to path

Convert the binfo variable to path.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Convert all bgp_info_XXX functions to bgp_path_XXX functions
Donald Sharp [Tue, 2 Oct 2018 22:15:34 +0000 (18:15 -0400)]
bgpd: Convert all bgp_info_XXX functions to bgp_path_XXX functions

Rename all bgp_info_XXX functions to bgp_path_XXX functions

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Convert `struct bgp_info` to `struct bgp_path_info`
Donald Sharp [Tue, 2 Oct 2018 20:41:30 +0000 (16:41 -0400)]
bgpd: Convert `struct bgp_info` to `struct bgp_path_info`

Do a straight conversion of `struct bgp_info` to `struct bgp_path_info`.
This commit will setup the rename of variables as well.

This is being done because `struct bgp_info` is not descriptive
of what this data actually is.  It is path information for routes
that we keep to build the actual routes nexthops plus some extra
information.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Convert BGP_INFO_XXX to BGP_PATH_XXX
Donald Sharp [Fri, 14 Sep 2018 00:34:42 +0000 (20:34 -0400)]
bgpd: Convert BGP_INFO_XXX to BGP_PATH_XXX

Search and replace all BGP_INFO_XXX to BGP_PATH_XXX

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Rename some BGP_PATH_XXX to BGP_PATH_SHOW_XXX
Donald Sharp [Tue, 2 Oct 2018 19:50:10 +0000 (15:50 -0400)]
bgpd: Rename some BGP_PATH_XXX to BGP_PATH_SHOW_XXX

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3077 from rgirada/ospf_2980_fix
Olivier Dugeon [Tue, 9 Oct 2018 17:07:33 +0000 (19:07 +0200)]
Merge pull request #3077 from rgirada/ospf_2980_fix

ospfd: Resolved the inconsistency behavior when “default-info origina…