Commit Graph

12605 Commits

Author SHA1 Message Date
Rafael Zalamena
de61f256d6 bfdd: fix BGP unnumbered peer setup
The session key uses the scope id to figure out which interface we are
using with that link-local address, so if we don't set it when
registering a session we'll end up with multiple IPv6 sessions.

This bug was spotted by Sandro Bolliger.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2018-11-03 19:08:33 -03:00
Donald Sharp
d0ca6a3406
Merge pull request #3244 from k0ste/stable_6.0_backports
stable/6.0: tools/frr: use path settings from ./configure
2018-10-25 20:22:00 -04:00
David Lamparter
741c2d72ca 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>
(cherry picked from commit 40da52d8c1)
2018-10-25 20:10:24 +07:00
David Lamparter
f9d350229c
Merge pull request #3232 from donaldsharp/6.0_revert_default_originate_changes
6.0 revert default originate changes
2018-10-24 17:27:03 +02:00
Donald Sharp
0d67788008 Revert "bgpd: Set attributes according route-maps if applied for default-originate"
This reverts commit 74401e6272.
2018-10-24 08:47:42 -04:00
Donald Sharp
4cf3d2e06d Revert "bgpd: Make sure default-originate works without route-map as well"
This reverts commit c2e1042203.
2018-10-24 08:47:42 -04:00
Quentin Young
73c497e409
Merge pull request #3218 from opensourcerouting/60-bfdmhoplookup
6.0: bfdd: fix multi hop hash lookup
2018-10-23 12:49:21 -04:00
Rafael Zalamena
a88f98ae66 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>
(cherry picked from commit 2055ea0969)
2018-10-22 14:47:27 +02:00
Donald Sharp
09fdff5654
Merge pull request #3170 from opensourcerouting/60-memleak-fix
6.0: backport memory leak fix
2018-10-15 07:43:15 -04:00
Rafael Zalamena
3081869800 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>
(cherry picked from commit c4345fbf71)
2018-10-14 14:37:46 +02:00
Rafael Zalamena
a0350aed12 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>
(cherry picked from commit 6655966d2c)
2018-10-14 14:37:46 +02:00
Martin Winter
c8c24278b1 FRRouting Release 6.0
Major Changes since 5.0:
- Staticd: New daemon responsible for management of static routes
- ISISd: Implement dst-src routing as per draft-ietf-isis-ipv6-dst-src-routing
- BFDd: new daemon for BFD (Bidrectional Forwarding Detection). Responsiblei
  for notifying link changes to make routing protocols converge faster.
- various bug fixes

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-10-08 05:32:57 -07:00
David Lamparter
32b738124e
Merge pull request #3131 from donaldsharp/early_6.0
lib: Include compiler.h as early as is possible in the build
2018-10-04 15:09:42 +02:00
Donald Sharp
ab67a5ff88 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>
2018-10-04 07:23:52 -04:00
Quentin Young
53aa82daaf
Merge pull request #3123 from opensourcerouting/6.0-error-code-switch
[6.0] lib: add "log error-code" switch
2018-10-03 20:31:50 -04:00
David Lamparter
65bf704b39 lib: add "log error-code" switch
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-10-03 23:24:24 +02:00
Donald Sharp
9b00962886
Merge pull request #3078 from opensourcerouting/large_as_path_6
bgpd: Fix for large AS paths which are split into segments (6.0 branch)
2018-09-24 11:14:50 -04:00
Martin Winter
0de68c06c7 bgpd: Fix for large AS paths which are split into segments
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2018-09-24 06:45:37 -07:00
Martin Winter
0248216c0f
Merge pull request #3054 from donaldsharp/zebra_6.0
zebra: Send correct default vrf tableid for MROUTE stats
2018-09-21 03:23:10 +11:00
Martin Winter
cc79c3ca0d
Merge pull request #3048 from donaldsharp/pim_6.0
pimd: Actually create vif's in non-integrated config
2018-09-20 23:39:13 +11:00
Donald Sharp
7ad4131fec zebra: Send correct default vrf tableid for MROUTE stats
So the linux kernel uses the RT_TABLE_MAIN for the table
id used for ip routing.  The multicast routing tables use
RT_TABLE_DEFAULT.  We changed the internal code of zebra_vrf
a few months back to use RT_TABLE_MAIN as the tableid to
use.  This caused the pim sg stats to stop working because
of the kernel bug where it uses a different table
for ip routing and ip multicast.

Put a bit of a special case in to do the right thing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-20 08:12:02 -04:00
Donald Sharp
585165def8 pimd: Actually create vif's in non-integrated config
The startup of a non-integrated config was not properly
allowing for startup to create the vif when we have
not learned about the interface we are trying to configure
at this point in time.  Actually notice when we are
trying to create a pimreg device or not to properly
notice when to attempt to create the vif or not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-18 19:32:33 -04:00
Martin Winter
34a23209f7
Merge pull request #3002 from donaldsharp/3001_6.0
Push 2993 into 6.0
2018-09-11 14:39:11 +11:00
Donald Sharp
21720617e2 bgpd: Honor origin change in bgp aggregates
When the origin changed we must honor and update the aggregate
to the peer.  This code adds a bit of code to the bgp_aggregate_info_same
code to see if the origin has changed and to indicate that it has.

Fixes: #2993
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-09-10 21:27:18 -04:00
Donald Sharp
7cbe25ab95 static: Put vty_frame around vrf output in staticd.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-31 15:07:27 +02:00
Donald Sharp
31e2232baa staticd: Fix mixup in vrf translations
When we store the nexthop for ref-counting, keep
track of the nexthop vrf_id as well.  This will allow
us to track the nexthop per vrf!

Additionally when we get the callback from zebra about
a nexthop update, iterate over all static routes to
see if the nexthop we are getting a callback is
one we are concerned about.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-31 15:07:27 +02:00
Donald Sharp
533ab00846 vtysh: Let staticd know about vrf sub-mode
staticd was not transitioning into vrf sub-mode, this fixes it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-31 15:07:27 +02:00
David Lamparter
9c42f07ccb
Merge pull request #2931 from donaldsharp/pim_zebra_crash
zebra: Fix crash in mroute debug
2018-08-28 18:13:24 +02:00
Donald Sharp
5b4256ca42 zebra: Fix crash in mroute debug
There exists a possibility that the ifindex we are passed
does not exist and as such we should check for it not
resolving as part of the debug.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-28 10:35:35 -04:00
David Lamparter
9f0cf8f435
Merge pull request #2930 from donaldsharp/pim_debug
pimd: Add some more useful data to debug output
2018-08-28 15:56:27 +02:00
Donald Sharp
8cd3830603 pimd: Add some more useful data to debug output
End user was seeing this debug but we are not giving
the user enough information to debug this on his own.
Add a tiny bit of extra information that could point
the user to solving the problem for themselves.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-28 08:50:55 -04:00
Donald Sharp
3e83237244
Merge pull request #2918 from opensourcerouting/fix-watchfrr-sigchld-handling
watchfrr: fix global restart
2018-08-28 07:35:18 -04:00
Lou Berger
95d8c3ce78
Merge pull request #2898 from donaldsharp/vrf_bitmap_is_whack
lib: Convert vrf bit-map to a hash.
2018-08-26 07:49:46 -04:00
David Lamparter
b5d79dbe71
Merge pull request #2920 from donaldsharp/bsd_warnings
Bsd warnings
2018-08-26 04:07:35 +02:00
Donald Sharp
f7dae31211 zebra: No prototype and uninited variables
Add a header to cleanup no declaration and properly
wrapper some variables to appropriate #ifdef.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-25 19:13:32 -04:00
Donald Sharp
184ce1c5d1 lib: Cleanup uninted top variable in ferr.c
The `top` variable could possibly be used without
any initialization, remove the possibility.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-25 19:13:32 -04:00
Donald Sharp
344b4a29bf isisd: Include header for function declaration
isis_handle_pdu is called but not declared for usage
by not including the appropriate header.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-25 19:13:32 -04:00
Renato Westphal
955cb66380
Merge pull request #2897 from donaldsharp/zebra_rnh_fixup
zebra: When registering a nexthop, we do not always need to re-eval
2018-08-25 19:57:58 -03:00
Renato Westphal
6033e33da6
Merge pull request #2895 from donaldsharp/netlink_encap
zebra: Add support for static encap mpls labels
2018-08-25 19:35:52 -03:00
Stephen Worley
87da6a6019 zebra: Add support for static encap mpls labels
We were ignoring mpls labels encapped with static routes.
Added support for single and multipath labels.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-25 13:19:07 -04:00
Christian Franke
7c265f7de1 watchfrr: fix global restart
watchfrr needs to handle a SIGCHLD also when it calls a global restart
command. Before this patch, it would lead to the following behavior:

15:44:28: zebra state -> down : unexpected read error: Connection reset by peer
15:44:33: Forked background command [pid 6392]: /usr/sbin/frr.init watchrestart all
15:44:53: Warning: restart all child process 6392 still running after 20 seconds, sending signal 15
15:44:53: waitpid returned status for an unknown child process 6392
15:44:53: background (unknown) process 6392 terminated due to signal 15
15:45:13: Warning: restart all child process 6392 still running after 40 seconds, sending signal 9
15:45:33: Warning: restart all child process 6392 still running after 60 seconds, sending signal 9
15:45:53: Warning: restart all child process 6392 still running after 80 seconds, sending signal 9
15:46:13: Warning: restart all child process 6392 still running after 100 seconds, sending signal 9
15:46:33: Warning: restart all child process 6392 still running after 120 seconds, sending signal 9
15:46:53: Warning: restart all child process 6392 still running after 140 seconds, sending signal 9

This is obviously incorrect and can be fixed by comparing the pid to
the global restart object as well.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-08-25 18:17:24 +02:00
Donald Sharp
74f0a94efd staticd: refcount the nht add/removal
When we add / remove a nexthop that we need to track,
keep track of the number of times we have done this
for each nexthop.  Consequently keep track of the
number of available nexthops, so that we can
just install new routes when we get one
that uses a pre-existing nexthop.  Deletion of
nexthops is done on refcount going to 0.
Removal of routes is handled elsewhere for removal.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-25 08:11:01 -04:00
Donald Sharp
1d30d1f4a8 zebra: When registering a nexthop, we do not always need to re-eval
The code prior to this change, was allowing clients to register
for nexthop tracking.  Then zebra would look up the rnh and
send to that particular client any known data.  Additionally
zebra was blindly re-evaluating the rnh for every registration.

This leads to interesting behavior in that all people registered
for that nexthop will get callbacks even if nothing changes.

Modify the code to know if we have evaluated the rnh or not
and if so limit the re-evaluation to when absolutely necessary

This is of particular importance to do because of nht callbacks
for protocols cause those protocols to do not insignificant
work and as more protocols are registering for nht callbacks
we will cause more work than is necessary.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-08-25 08:11:01 -04:00
Donald Sharp
18d93bbb5a
Merge pull request #2910 from opensourcerouting/doc-summerclean-20180825
protocol vs. OS docs + SMUX leftovers
2018-08-25 06:35:14 -04:00
Donald Sharp
866ec83b8d
Merge pull request #2911 from opensourcerouting/remove-linux24-tcp-md5
lib: remove Linux 2.4 TCP-MD5 support
2018-08-25 06:35:02 -04:00
David Lamparter
3535a785b8 lib: remove Linux 2.4 TCP-MD5 support
Linux 2.6.0 was released in December of 2003... I'm pretty sure we don't
need this Linux 2.4 support anymore.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-25 02:56:05 +02:00
David Lamparter
086f18fad2 build: drop unused SMUX client OID MIBs
These MIB OIDs were only used to identify clients on the SMUX protocol.
And even for that, they were essentially pointless.

Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-25 02:21:10 +02:00
Russ White
a86b18d82f
Merge pull request #2870 from AnuradhaKaruppiah/bgp-default-del
bgpd: unregister VNI learning from zebra on default instance delete
2018-08-24 20:19:17 -04:00
Russ White
3492362925
Merge pull request #2908 from chiragshah6/ospf_vrf_dev
ospfd: interface speed change during intf add
2018-08-24 20:17:16 -04:00
David Lamparter
3175ea5a14 doc/user: drop SMUX reference, rework intro
Signed-off-by: David Lamparter <equinox@diac24.net>
2018-08-25 02:16:59 +02:00