Commit Graph

17715 Commits

Author SHA1 Message Date
Renato Westphal
eed84494b4 lib: add yang wrappers for IP prefixes
We had wrappers for IPv4 and IPv6 prefixes, but not for IP (version
agnostic) prefixes. This commit addresses this issue.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-18 13:38:28 -03:00
Donald Sharp
0a0d4f9e2e
Merge pull request #5006 from manuhalo/fix_ftn_uninstall
zebra: fix mpls ftn uninstall
2019-09-18 12:09:08 -04:00
Emanuele Di Pascale
90a570ed27 zebra: fix mpls ftn uninstall
when a client disconnects, we iterate over the routing table to
remove any label that originated from that client. However we
were erroneously passing the route type to the function, while
it was expecting the lsp type. As a result, for example, killing
ldpd would not remove the ldp labels from the routes.

Kudos to @rwestphal for pointing me to the source of the issue.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2019-09-18 16:03:52 +02:00
Renato Westphal
41b209ce18
Merge pull request #5003 from manuhalo/fix_bgp_bmp_oot_build
bgpd: fix include path for bgp_bmp_clippy.c
2019-09-18 10:59:43 -03:00
Igor Ryzhov
c0e8367230 vtysh: fix multiple "no ip/ipv6 prefix-list sequence-number" lines in running-config
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2019-09-18 14:21:27 +03:00
Donald Sharp
5d83c731e3
Merge pull request #4984 from Alexis-ROYER/pim-doc#4965
[PIM] Confusing documentation for `ip pim sm` command (#4965)
2019-09-18 06:40:09 -04:00
Emanuele Di Pascale
33a9e19681 bgpd: fix include path for bgp_bmp_clippy.c
not using a relative path was breaking out-of-tree compilation

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2019-09-18 11:49:24 +02:00
Alexis Royer
a94dd7dd96 doc/user: Confusing documentation for ip pim sm
Modification of the documentation for the `ip pim sm` command in order to avoid the understanding of an incompatibility with IGMP on the interface.

Signed-off-by: Alexis Royer <alexis.royer@gmail.com>
2019-09-18 09:57:13 +02:00
Renato Westphal
957ef1c93a
Merge pull request #4966 from Orange-OpenSource/isis-TE
isisd: Update TLVs processing for TE, RI & SR
2019-09-17 20:49:52 -03:00
Russ White
65c600c731
Merge pull request #5001 from qlyoung/fix-frr-pthread-reachable-blocks
lib: clean up frr_pthread structs at exit
2019-09-17 19:21:16 -04:00
Donald Sharp
d487c49127
Merge pull request #4996 from opensourcerouting/build-tags
build: fix "make tags"
2019-09-17 19:07:39 -04:00
Julien Floret
594c287816 zebra: inform upper layer error when reading correct speed interface
speed interface is done 15 seconds after interface creation. during that
time, the vrf or the interface may have disappeared. to protect this,
return an error in case it is not possible to create a vrf socket or it
is not possible to get speed of an interface because of a missing
device.

Signed-off-by: Julien Floret <julien.floret@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2019-09-17 18:38:42 +02:00
Quentin Young
9af949cc95 lib: clean up frr_pthread structs at exit
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-17 16:12:28 +00:00
Olivier Dugeon
1b3f47d04c isisd: Update TLVs processing for TE, RI & SR
In preparation to Segment Routing:
 - Update the management of Traffic Engineering subTLVs to the new tlvs parser
 - Add Router Capability TLV 242 as per RFC 4971 & 7981
 - Add Segment Routing subTLVs as per draft-isis-segment-routing-extension-25

Modified files:
 - isis_tlvs.h: add new structure to manage TE subTLVs, TLV 242 & SR subTLVs
 - isis_tlvs.c: add new functions (pack, copy, free, unpack & print) to process
   TE subTLVs, Router Capability TLV and SR subTLVs
 - isis_circuit.[c,h] & isis_lsp.[c,h]: update to new subTLVs & TLV processing
 - isis_te.[c,h]: remove all old TE structures and managment functions,
   and add hook call to set local and remote IP addresses as wellas update TE
   parameters
 - isis_zebra.[c,h]: add hook call when new interface is up
 - isis_mt.[c,h], isis_pdu.c & isis_northbound.c: adjust to new TE subTLVs
 - tests/isisd/test_fuzz_isis_tlv_tests.h.gz: adapte fuuz tests to new parser

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2019-09-17 17:35:50 +02:00
Lou Berger
ef5307f23f
Merge pull request #4861 from NaveenThanikachalam/logs
BGP: Rectifying the log messages.
2019-09-17 11:33:43 -04:00
Philippe Guibert
fceb6174cf staticd: register to interface events related with non default vrf
in addition to non default vrf, once a new vrf is available, the static
daemon registers to events from that vrf, including presence of
interfaces. this permits to create static route with nexthop=interface.
Reversely, an unregistration is scheduled too when vrf disappears.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2019-09-17 17:30:48 +02:00
Olivier Dugeon
215e03fe53
Merge pull request #4992 from opensourcerouting/isisd-assorted-changes
isisd: assorted changes
2019-09-17 17:30:01 +02:00
Mark Stapp
11260e7011 zebra: check all dplane nexthops when processing
When processing route updates from the dataplane, we were
terminating the checking of nexthops prematurely, and we could
miss meaningful changes.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-09-17 10:50:36 -04:00
David Lamparter
2d50cb8062 build: fix "make tags"
Anything we list in a xxx_SOURCES variable will be included for "make
tags", including filess marked as nodist_xxx_SOURCES.  So if we don't
have Protobuf enabled, even though the entire library isn't built, "make
tags" will still try to process these files... which we can't
autogenerate because Protobuf is disabled.  Same for gRPC.

Fixes: #3266
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-09-17 16:35:12 +02:00
David Lamparter
5aeb4f3c60 ospf6d: track explicit interface type config
If the interface doesn't exist in system, we'll default to broadcast and
then later not change that when the interface comes up.  Explicitly
track whether the user configured the type and properly auto-set it if
they didn't.

Fixes: #3930
Fixes: #4873
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-09-17 16:23:44 +02:00
David Lamparter
e597335362 ospf6d: fix mistaken if_is_* instead of oi->type
If the user configured an interface to be in a particular mode, we need
to be consistent about that.  No looking at if_is_pointopoint() or
if_is_broadcast().

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-09-17 16:18:26 +02:00
David Lamparter
84eb735560 ospf6d: interface state needs update even w/o area
We can't skip reading interface state if there's no area yet, we'll be
missing information later when the interface is configured.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2019-09-17 16:15:32 +02:00
Donald Sharp
b6534e248a
Merge pull request #4993 from ton31337/fix/remove_trailing_whitespaces
bgpd: Remove trailing whitespaces from some header files
2019-09-17 07:49:51 -04:00
Russ White
f0b7ed8823
Merge pull request #4988 from donaldsharp/watchfrr_ignore_daemon
Watchfrr ignore daemon
2019-09-17 07:48:14 -04:00
Russ White
2d6f27a9eb
Merge pull request #4981 from donaldsharp/bgp_distance
Bgp distance
2019-09-17 07:45:29 -04:00
Russ White
e3d250716c
Merge pull request #4980 from sworleys/PBR-Check-NHT-GW-Ifindex
pbrd: Handle GATEWAY_IFINDEX nht conflicts
2019-09-17 07:39:36 -04:00
Russ White
1fcc189f24
Merge pull request #4970 from shikenghua/prefer_global
bgpd: prefer-global command not working on IPv4 peers
2019-09-17 07:33:05 -04:00
Russ White
aa83afaaa5
Merge pull request #4887 from vishaldhingra/lcomm_json
lib: rmap dep table is not correct in case of exact-match clause
2019-09-17 07:30:17 -04:00
Russ White
321b1efab2
Merge pull request #4810 from qlyoung/fix-pthread-bad-pointer
Fix potential frr_pthread.c stale pointer
2019-09-17 07:27:12 -04:00
Russ White
fe8d933c2c
Merge pull request #4564 from pguibert6WIND/misc_vrf_update_name
Misc vrf update name
2019-09-17 07:22:22 -04:00
Donatas Abraitis
3e1fb651ec
Merge pull request #4985 from qlyoung/fix-bgp-zero-keepalive-timer
bgpd: do not send keepalives when KA timer is 0
2019-09-17 12:39:50 +03:00
Donatas Abraitis
9ea364a21f bgpd: Remove trailing whitespaces from some header files
This is annoying when editing a file and saving the file. IDEs like
VSCode can automatically remove trailing whitespaces, hence it would be better
having a clean code before pushing other changes.

I step onto this not the first time.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-09-17 11:28:48 +03:00
Donatas Abraitis
94812d13d8
Merge pull request #4991 from qlyoung/readme-add-apt-repo
README.md: add reference to apt repo
2019-09-17 08:35:03 +03:00
Renato Westphal
8b1e3453da isisd: fix validation of prefix-sid flags
The original check would always evaluate to false since
ISIS_PREFIX_SID_VALUE and ISIS_PREFIX_SID_LOCAL have different
values.  Use !! to normalize the return value of the individual
checks to either 0 or 1, making the code do what was intended
(ensure the V/L flags are both 0 or 1).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-17 01:30:12 -03:00
Quentin Young
b6d1d2a02e README.md: add reference to apt repo
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-17 03:53:17 +00:00
Renato Westphal
6cf3833922 isisd: introduce new route update hook
This hook will be called whenever a route is added, updated or
deleted.  It will be used, for instance, by the SR code to keep
Prefix-SIDs in sync with their associated routes.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-17 00:35:46 -03:00
Renato Westphal
0a5f3f4fb9 isisd: move management of route flags out of isis_zebra.c
For better modularity, isis_zebra.c should only contain code used
to communicate with zebra. The management of route flags belongs
to isis_route.c.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-17 00:35:39 -03:00
Renato Westphal
a57c875d73 isisd: remove leftover from old dict code
This is unnecessary since commit 4bef0ec4fb was merged.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-17 00:35:32 -03:00
Satheesh Kumar K
4bf3dda597 pimd : Add support for MLAG Register & Un-register
when ever a FRR Client wants to send any data to another node
using MLAG Channel, uses below mechanisam.

1. sends  a MLAG Registration to zebra with interested messages that
   it is intended to receive from peer.
2. In response to this request, Zebra opens communication channel with
   MLAG. and also in Rx. diretion zebra forwards only those messages which
   client shown interest during registration
3. when client is no-longer interested in communicating with MLAG, client
   posts De-register to Zebra
4. if this is the last client which is interested for MLAG Communication,
   zebra closes the channel.

why PIM Needs MLAG Communication
================================
1. In general on LAN Networks elecetd DR will send the Join towards
   Multicast RP in case of a LHR and Register in case of FHR.
2. But in case DR Goes down, traffic will be re-converged only after
   the New DR is elected, but this can take time based on Hold Timer to
   detect the DR down.
3. this can be optimised by using MLAG Mecganisam.
4. and also Traffic can be forwarded more efficiently by knowing the cost
   towards RP using MLAG

Signed-off-by: Satheesh Kumar K <sathk@cumulusnetworks.com>
2019-09-16 20:11:01 -07:00
Donald Sharp
a16876c5ad
Merge pull request #4987 from mjstapp/fix_unused_nht_api
zebra: remove empty, unused internal api
2019-09-16 17:19:46 -04:00
Donald Sharp
3f391becca watchfrr: Convert wtf to a more meaningful message
There is a fairly common state we are seeing where watchfrr
has decided that something is not right and is printing out
a `wtf` message.  At this point I am not sure what is going on
or how we are getting here, but let's add a bit more data dump
to the message so that we can figure out what is going on.

This is mainly being done because at this point in time I have no
clue the what/how of how we got here and I cannot reproduce.
Maybe by adding more useful information here I can figure out what is
going on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
2019-09-16 14:25:55 -04:00
Donald Sharp
466642858e doc: Add watchfrr documentation
Start the documentation for watchfrr.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-16 14:22:22 -04:00
Donald Sharp
cc53b605e6 watchfrr: Allow end users to turn off watchfrr for a particular daemon
Allow an end user who is debugging behavior, with say gdb, to turn
off watchfrr and it's attempts to keep control of a daemons up/responsiveness

With code change:
donna.cumulusnetworks.com# show watchfrr
watchfrr global phase: Idle
  zebra                Up
  bgpd                 Up/Ignoring Timeout
  staticd              Up

Now grab bgpd with gdb:

sharpd@donna ~/frr4> date ; sudo gdb -p 27893
Mon 16 Sep 2019 01:44:57 PM EDT
GNU gdb (GDB) Fedora 8.3-6.fc30
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word".
Attaching to process 27893
[New LWP 27894]
[New LWP 27895]
[New LWP 27896]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f1787a3e5c7 in poll () from /lib64/libc.so.6
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.29-15.fc30.x86_64 gperftools-libs-2.7-5.fc30.x86_64 json-c-0.13.1-4.fc30.x86_64 libcap-2.26-5.fc30.x86_64 libgcc-9.1.1-1.fc30.x86_64 libgcrypt-1.8.4-3.fc30.x86_64 libgpg-error-1.33-2.fc30.x86_64 libstdc++-9.1.1-1.fc30.x86_64 libxcrypt-4.4.6-2.fc30.x86_64 libyang-0.16.105-1.fc30.x86_64 lua-libs-5.3.5-5.fc30.x86_64 lz4-libs-1.8.3-2.fc30.x86_64 pcre-8.43-2.fc30.x86_64 xz-libs-5.2.4-5.fc30.x86_64
(gdb)

In another window we can see when watchfrr thinks it's not responding:

donna.cumulusnetworks.com# show watchfrr
watchfrr global phase: Idle
  zebra                Up
  bgpd                 Unresponsive/Ignoring Timeout
  staticd              Up

Finally exit gdb and watchfrr now believes bgpd is good to go again:

donna.cumulusnetworks.com# show watchfrr
watchfrr global phase: Idle
  zebra                Up
  bgpd                 Up/Ignoring Timeout
  staticd              Up

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-16 13:47:50 -04:00
Quentin Young
bfc18a0205 bgpd: do not send keepalives when KA timer is 0
RFC4271 specifies behavior when the hold timer is sent to zero - we
should not send keepalives or run a hold timer. But FRR, and other
vendors, allow the keepalive timer to be set to zero with a nonzero hold
timer. In this case we were sending keepalives constantly and maxing out
a pthread to do so. Instead behave similarly to other vendors and do not
send keepalives.

Unsure what the utility of this is, but blasting keepalives is
definitely the wrong thing to do.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-16 16:15:07 +00:00
Quentin Young
df54f0536e tests: update tests for pthread init changes
Need to init frr_pthreads manually in tests now.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-16 16:12:04 +00:00
Quentin Young
b9b4c0610a lib: handle frr_pthread_init/fini in libfrr init
Make sure we are always cleaning init'ing and cleaning up pthread infra.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-16 16:12:04 +00:00
Quentin Young
54baf432f0 lib: delete pthread from tracking list on delete
Pthreads were not being deleted from the list after destruction. This
isn't causing any bugs currently but that's just by dumb luck.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-16 16:12:00 +00:00
Mark Stapp
cbb9ddad16 zebra: remove empty, unused internal api
Remove a leftover, empty nht api call from zebra.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-09-16 12:00:14 -04:00
vdhingra
909f3d56ae lib: rmap dep table is not correct in case of exact-match clause
User pass the string match large-community 1 exact-match from CLI.
Now route map lib has got the string as "1 exact-match". It passes the string
to call back for compilation. BGP will parse this string and came to know
that for "1" it has to do exact match. Routemap lib has to save "1" in it’s
dependency table. Here routemap is saving this as a “1 exact-match”
which is wrong. The solution is used the compiled data.

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
2019-09-15 05:45:27 -07:00
Donald Sharp
8e0bab8a1e
Merge pull request #4834 from srimohans/support_bundle
tools: Modifications to copy support bundle files
2019-09-14 07:47:26 -04:00