]>
git.puffer.fish Git - mirror/frr.git/log
Donald Sharp [Mon, 14 Nov 2016 20:28:17 +0000 (15:28 -0500)]
bgpd: Allow 'show bgp neighbor' to indicate authentication or not
When we configure authentication. Allow the 'show bgp neighbor'
commands( and their ilk ) to indicate that the peer has
authentication enabled.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sun, 13 Nov 2016 02:52:32 +0000 (21:52 -0500)]
zebra: Consolidate static_config_ipv[4|6] into one function.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
David Lamparter [Tue, 16 May 2017 11:41:57 +0000 (13:41 +0200)]
Merge pull request #539 from donaldsharp/arm
Arm
Donald Sharp [Tue, 16 May 2017 00:55:33 +0000 (20:55 -0400)]
lib: Improve error message for the developer
I keep getting people asking me about what to do
when this error is generated when they are programming
new cli. Maybe this is a bit better bread-crumb?
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 16 May 2017 00:46:06 +0000 (20:46 -0400)]
eigrpd: Fix arm compile issue with some gcc's
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
David Lamparter [Mon, 15 May 2017 14:55:30 +0000 (16:55 +0200)]
lib: parser: remove forgotten line
MTYPE_CMD_TOKEN_DATA isn't used anymore, I forgot to ditch the line.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Lou Berger [Mon, 15 May 2017 14:34:38 +0000 (10:34 -0400)]
Merge pull request #531 from qlyoung/fix-stack-ref
lib: fix access to stack value
David Lamparter [Fri, 12 May 2017 10:25:26 +0000 (12:25 +0200)]
doc: fix VARIABLE <> WORD confusion in cli.md
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Fri, 12 May 2017 10:22:56 +0000 (12:22 +0200)]
bgpd: autocomplete peer-groups & interface peers
This wasn't quite correct in the previous patch, leading to peer-groups
& interface peers breaking in autocompletion.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Thu, 11 May 2017 09:26:40 +0000 (11:26 +0200)]
lib: cli: fix IPv6 address partial matching
A partially-entered IPv6 address would never return a "partly_match",
meaning some possible completions weren't listed by the matcher.
This specifically breaks autocompleting BGP IPv6 neighbor addresses.
Before:
aegaeon# show ip bg ne 2001:<?>
WORD Neighbor on BGP configured interface
After:
aegaeon# show ip bg ne 2001:<?>
WORD Neighbor on BGP configured interface
X:X::X:X Neighbor to display information about
2001:db8::2
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Thu, 11 May 2017 09:20:20 +0000 (11:20 +0200)]
doc: update CLI documentation
Fix markdown formatting & add variable names.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Wed, 10 May 2017 14:55:42 +0000 (16:55 +0200)]
bgpd: autocomplete neighbor names
Add autocompletion for neighbor IP/IPv6/peer-group names.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Wed, 10 May 2017 14:38:48 +0000 (16:38 +0200)]
vtysh: autocomplete variables
This asks the connected daemons for their variable completions through a
hidden CLI command.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Sat, 19 Nov 2016 10:57:08 +0000 (11:57 +0100)]
lib: cli: autocomplete variables
Shows known values in the appropriate naming domain when the user hits
<?> or <Tab>. This patch only works in the telnet CLI, the next patch
adds vtysh support.
Included completions:
- interface names
- route-map names
- prefix-list names
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Wed, 22 Mar 2017 05:56:17 +0000 (06:56 +0100)]
lib: parser: add pre-merge varname propagation step
Fills token->varname based on context. WORD tokens use the WORD - if it
isn't actually "WORD". Other than that, a preceding constant token is
used as name.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Fri, 18 Nov 2016 15:24:47 +0000 (16:24 +0100)]
lib: parser: split off & rename graph handling
Put core CLI graph stuff in lib/command_graph.[ch] and consistently
prefix all function names with "cmd_".
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Fri, 18 Nov 2016 11:06:57 +0000 (12:06 +0100)]
lib: parser: add named variables in CLI
struct cmd_token now has a "varname" field which is derived from the
DEFUN's string definition. It can be manually specified with "$name"
after some token, e.g. "foo WORD$var". A later commit adds code to
automatically fill the value if nothing is specified.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Donald Sharp [Mon, 15 May 2017 14:01:39 +0000 (10:01 -0400)]
Merge pull request #520 from opensourcerouting/bgpd-fixes-master
bgpd: assorted fixes (master)
Donald Sharp [Mon, 15 May 2017 14:01:04 +0000 (10:01 -0400)]
Merge pull request #527 from LabNConsulting/working/master/patch-set/issue471+473
Master: Restore label distribution for VPN safi
David Lamparter [Mon, 15 May 2017 12:32:13 +0000 (14:32 +0200)]
Merge pull request #526 from donaldsharp/renato_eigrp
Renato eigrp
Quentin Young [Mon, 15 May 2017 06:29:54 +0000 (06:29 +0000)]
lib: fix access to stack value
Passing stack value to thread_add_* causes thread->ref to become an
invalid pointer when the value goes out of scope
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Donald Sharp [Mon, 15 May 2017 01:19:33 +0000 (21:19 -0400)]
Merge remote-tracking branch 'origin/stable/3.0'
Lou Berger [Mon, 15 May 2017 00:24:25 +0000 (20:24 -0400)]
bgpd: fix table leak introduced in labeled unicast (Issue #473)
Fix tested for vpn and encap ribs/safi. Labeled unicast
may still leak as not tested.
Signed-off-by: Lou Berger <lberger@labn.net>
Lou Berger [Sun, 14 May 2017 15:10:42 +0000 (11:10 -0400)]
bgpd: fix v6 encap safi config - more labeled unicast breakage (Issue #473)
Signed-off-by: Lou Berger <lberger@labn.net>
Lou Berger [Sat, 13 May 2017 21:46:05 +0000 (17:46 -0400)]
bgpd: fix rfapi label origination (Issue #473)
Signed-off-by: Lou Berger <lberger@labn.net>
Lou Berger [Sat, 13 May 2017 20:38:35 +0000 (16:38 -0400)]
bgpd: fix VPN SAFI label distribution (Issue #473)
Signed-off-by: Lou Berger <lberger@labn.net>
Lou Berger [Sat, 13 May 2017 20:37:13 +0000 (16:37 -0400)]
bgpd: add epvn as labeled safi type (ISSUE #471)
Signed-off-by: Lou Berger <lberger@labn.net>
Renato Westphal [Thu, 27 Apr 2017 17:55:23 +0000 (14:55 -0300)]
eigrpd: Diverse Fixes
* Correct the metric calculation as well as the default metrics;
* Do not show invalid routes in the "show ip eigrp topology".
* Add support to VRFs;
* When downloading a neighbor remove the related routes;
* Fix bugs in the parser of packages they were creating
Invalid default routes;
* Add and remove routes in the zebra;
* Add command "on router eigrp AS";
* Make "delay" and "bandwitch" commands work as well as
Display them in running config;
* Add "no" version of several commands;
* Fix a serious momory leaks;
* Fix segfault when there is no 'successor' route to a
Given prefix;
* Other minor corrections;
Signed-off-by: Renato Westphal <renatowestphal@gmail.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Renato Westphal [Fri, 12 May 2017 19:38:18 +0000 (15:38 -0400)]
eigrpd: Some Basic Corrections
* Advertise routes to zebra
* Connected routes should not have a nexthop address
* Fix segfaut on exit
Signed-off-by: Renato Westphal <renatowestphal@gmail.com>
Donald Sharp [Fri, 12 May 2017 13:16:23 +0000 (09:16 -0400)]
lib: Cleanup command parsing a tiny bit
The CLI changes now make it impossible for numbers
outside the range specified in the cli to make it to
this code. No need to check for it again.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 13 May 2017 16:24:32 +0000 (12:24 -0400)]
Merge pull request #521 from opensourcerouting/bgpd-fixes-stable
bgpd: assorted fixes (stable/3.0)
David Lamparter [Sat, 13 May 2017 07:10:09 +0000 (09:10 +0200)]
Merge pull request #508 from LabNConsulting/working/3.0/patch/issue198
bgpd: Issue #198 - clean up duplicate encap SAFI commands
David Lamparter [Sat, 13 May 2017 07:09:22 +0000 (09:09 +0200)]
Merge pull request #525 from qlyoung/frr-script-fix
tools: $valgrind --> "$valgrind"
David Lamparter [Sat, 13 May 2017 07:08:55 +0000 (09:08 +0200)]
Merge pull request #524 from qlyoung/blublublub3.0
lib: use %p specifier for pointers
Quentin Young [Fri, 12 May 2017 23:29:58 +0000 (23:29 +0000)]
tools: $valgrind --> "$valgrind"
String cmp missing quotes
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Fri, 12 May 2017 21:37:36 +0000 (21:37 +0000)]
lib: use %p specifier for pointers
Fixes builds on ARM
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Vincent JARDIN [Fri, 12 May 2017 20:51:45 +0000 (22:51 +0200)]
README: add references to EIGRP and NHRP.
Renato Westphal [Fri, 12 May 2017 15:51:06 +0000 (12:51 -0300)]
Merge pull request #518 from dwalton76/zebra-mpls-lsp-uninstall
zebra: zebra_mpls_lsp_uninstall was not being called
Renato Westphal [Fri, 12 May 2017 15:23:52 +0000 (12:23 -0300)]
Merge pull request #495 from donaldsharp/mpls_fixes
Mpls fixes
Renato Westphal [Fri, 12 May 2017 14:01:02 +0000 (11:01 -0300)]
bgpd: fix segfault with '[no] bgp network import-check'
These commands were causing bgpd to crash if a static VPN route was
configured.
While here, fix a bug in bgp_static_add() and bgp_static_delete().
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Fri, 12 May 2017 12:40:21 +0000 (09:40 -0300)]
bgpd: fix duplicate install of command
Only happens when FRR is configured with --enable-oldvpn-commands.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Fri, 12 May 2017 12:19:42 +0000 (09:19 -0300)]
bgpd: fix 'show bgp [...] longer-prefixes'
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Fri, 12 May 2017 14:36:14 +0000 (11:36 -0300)]
bgpd: remove unused bgp_attr_default_intern() function
This function is not used anymore since commit
137446f9 .
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Fri, 12 May 2017 14:04:31 +0000 (11:04 -0300)]
lib: remove gap between AFI_IP6 and AFI_L2VPN
We have several pieces of code like this in FRR:
for (afi = AFI_IP; afi < AFI_MAX; afi++)
for (safi = SAFI_UNICAST; safi < SAFI_MAX; safi++)
bgp_distance_table[afi][safi] = bgp_table_init (afi, safi);
We were creating a lot of useless garbage in the code because of this
gap. Fix this.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Fri, 12 May 2017 14:01:02 +0000 (11:01 -0300)]
bgpd: fix segfault with '[no] bgp network import-check'
These commands were causing bgpd to crash if a static VPN route was
configured.
While here, fix a bug in bgp_static_add() and bgp_static_delete().
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Fri, 12 May 2017 12:40:21 +0000 (09:40 -0300)]
bgpd: fix duplicate install of command
Only happens when FRR is configured with --enable-oldvpn-commands.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Fri, 12 May 2017 12:28:43 +0000 (09:28 -0300)]
bgpd: removed unused parameter from bgp_dump_attr()
Originally we used the 'peer' parameter for this:
if (peer_sort (peer) == BGP_PEER_IBGP)
snprintf (buf + strlen (buf), size - strlen (buf), ", localpref %d",
attr->local_pref);
Now we have this:
if (CHECK_FLAG (attr->flag, ATTR_FLAG_BIT (BGP_ATTR_LOCAL_PREF)))
snprintf (buf + strlen (buf), size - strlen (buf), ", localpref %u",
attr->local_pref);
Remove the now useless 'peer' parameter.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Fri, 12 May 2017 12:21:34 +0000 (09:21 -0300)]
lib: add labeled-unicast in safi2str()
While here, move SAFI_ENCAP above SAFI_MPLS_VPN to keep the ordering
consistent.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Renato Westphal [Fri, 12 May 2017 12:19:42 +0000 (09:19 -0300)]
bgpd: fix 'show bgp [...] longer-prefixes'
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Daniel Walton [Fri, 12 May 2017 13:34:51 +0000 (13:34 +0000)]
zebra: zebra_mpls_lsp_uninstall was not being called
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Old entries were not being removed from the MPLS table.
Jafar Al-Gharaibeh [Fri, 12 May 2017 03:47:22 +0000 (22:47 -0500)]
Merge pull request #511 from donaldsharp/netlink_dump
zebra: Fix kernel netlink hex dump of information
Donald Sharp [Thu, 11 May 2017 15:44:07 +0000 (11:44 -0400)]
zebra: Fix kernel netlink hex dump of information
1) Fix the kernel send and recv hex dump of what we
are sending to the kernel
2) When configuring the debugs under 'conf t' display
it too.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 11 May 2017 13:19:15 +0000 (09:19 -0400)]
Merge pull request #510 from opensourcerouting/update-tools-gitignore
tools: update .gitignore
Christian Franke [Thu, 11 May 2017 13:14:00 +0000 (15:14 +0200)]
tools: update .gitignore
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Lou Berger [Thu, 11 May 2017 12:46:48 +0000 (08:46 -0400)]
bgpd: Issue #198 - clean up duplicate command resulting from CLI refactoring
Signed-off-by: Lou Berger <lberger@labn.net>
Philippe Guibert [Wed, 10 May 2017 17:27:33 +0000 (19:27 +0200)]
bgpd: fixup bgpd: allow VPN next hop to be different AFI than NLRI next
hop for EVPN
In the case of EVPN, add the nexthop attribute.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Adam Fitzgerald [Thu, 11 May 2017 11:03:23 +0000 (21:03 +1000)]
added troubleshooting section to debian 8 build doc
Lou Berger [Thu, 11 May 2017 12:14:33 +0000 (08:14 -0400)]
Merge pull request #503 from pguibert6WIND/issue_473
bgpd: fixup bgpd: allow VPN next hop to be different AFI than NLRI nexthop for EVPN
David Lamparter [Thu, 11 May 2017 11:58:40 +0000 (13:58 +0200)]
Merge pull request #500 from qlyoung/fix-router-rip-3.0-3.0
vtysh: add \n to 'router rip[ng]' docstrings (3.0)
David Lamparter [Thu, 11 May 2017 11:57:45 +0000 (13:57 +0200)]
Merge pull request #496 from donaldsharp/vtysh_pager
*: Allow configure to control VTYSH_PAGER used
Donald Sharp [Wed, 10 May 2017 23:39:26 +0000 (19:39 -0400)]
Merge pull request #502 from opensourcerouting/show-ip-fib
add 'show <ip|ipv6> fib' command
Christian Franke [Wed, 10 May 2017 20:33:51 +0000 (22:33 +0200)]
zebra: add 'show ipv6 fib' command
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Christian Franke [Wed, 10 May 2017 20:33:48 +0000 (22:33 +0200)]
zebra: add 'show ip fib' commands
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Hung-Weic Chiu [Wed, 10 May 2017 02:51:28 +0000 (02:51 +0000)]
Address the error "Dead assignment" of static analysif
- Refer to https://ci1.netdef.org/browse/FRR-FRR4-44/artifact/shared/static_analysis/index.html
- Remove unused variable
Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
Hung-Weic Chiu [Wed, 10 May 2017 01:57:11 +0000 (01:57 +0000)]
- Solve the Coverity Scan PW.ASSIGN_WHERE_COMPARE_MEANT
- Minor refactoring
Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
Quentin Young [Tue, 9 May 2017 21:04:00 +0000 (21:04 +0000)]
vtysh: add \n to 'router rip[ng]' docstrings
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Hung-Weic Chiu [Wed, 10 May 2017 02:51:28 +0000 (02:51 +0000)]
Address the error "Dead assignment" of static analysif
- Refer to https://ci1.netdef.org/browse/FRR-FRR4-44/artifact/shared/static_analysis/index.html
- Remove unused variable
Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
Hung-Weic Chiu [Wed, 10 May 2017 01:57:11 +0000 (01:57 +0000)]
- Solve the Coverity Scan PW.ASSIGN_WHERE_COMPARE_MEANT
- Minor refactoring
Signed-off-by: Hung-Weic Chiu <sppsorrg@gmail.com>
Russ White [Wed, 10 May 2017 17:51:47 +0000 (13:51 -0400)]
Merge pull request #408 from qlyoung/remove-thread-macros
*: remove THREAD_ON macros, add nullity check
Philippe Guibert [Wed, 10 May 2017 17:27:33 +0000 (19:27 +0200)]
bgpd: fixup bgpd: allow VPN next hop to be different AFI than NLRI next
hop for EVPN
In the case of EVPN, add the nexthop attribute.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Donald Sharp [Wed, 10 May 2017 15:09:24 +0000 (11:09 -0400)]
*: Allow configure to control VTYSH_PAGER used
Signed-off-by: Donald Sharp
Daniel Walton [Wed, 10 May 2017 13:56:25 +0000 (09:56 -0400)]
eigrpd: Fix compilation errors for some versions of gcc
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Daniel Walton [Wed, 10 May 2017 13:42:56 +0000 (09:42 -0400)]
zebra: do not crash if zebrad.lsp_process_q is NULL
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Daniel Walton [Wed, 10 May 2017 13:42:00 +0000 (09:42 -0400)]
zebra: lsp_install() failed due to ZEBRA_FLAG_SELECTED check
ZEBRA_FLAG_SELECTED hasn't been set yet by the time lsp_install is
called. The call path is:
rib_process -> rib_process_add_fib -> zebra_mpls_lsp_install -> lsp_install
but ZEBRA_FLAG_SELECTED is set in rib_process after it calls
rib_process_add_fib. I can't think of anything that it would hurt to
install the LSP regardless of whether ZEBRA_FLAG_SELECTED is set later.
I also cleaned up some UI (json and display the pretty label names
instead of their numeric values).
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Daniel Walton [Wed, 10 May 2017 13:41:07 +0000 (09:41 -0400)]
zebra: ZEBRA_MIN_FEC_LENGTH should be 5
If the client registers for 0.0.0.0/0 the length will be 5
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Daniel Walton [Wed, 10 May 2017 13:40:29 +0000 (09:40 -0400)]
bgpd: add ENHE support for "address-family ipv4 labeled-unicast"
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Jafar Al-Gharaibeh [Wed, 10 May 2017 13:57:41 +0000 (08:57 -0500)]
Merge pull request #494 from donaldsharp/community.md
*: Modify documentation to show people where to work
Donald Sharp [Wed, 10 May 2017 12:13:17 +0000 (08:13 -0400)]
*: Modify documentation to show people where to work
Give some guidance to people on where they should work for
bug fixese and features.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 10 May 2017 00:39:35 +0000 (20:39 -0400)]
Merge remote-tracking branch 'origin/stable/3.0'
Russ White [Tue, 9 May 2017 23:56:47 +0000 (19:56 -0400)]
Merge pull request #486 from LabNConsulting/working/3.0/patch/issue483
bgp rfapi: rfapi shouldn't be called (yet) for BGP VRF instances.
Russ White [Tue, 9 May 2017 23:49:27 +0000 (19:49 -0400)]
Merge pull request #480 from donaldsharp/agentx
Agentx
Russ White [Tue, 9 May 2017 23:48:00 +0000 (19:48 -0400)]
Merge pull request #488 from donaldsharp/sudoers3
*: Remove ability to install frr_sudoers for 3.0
Quentin Young [Tue, 9 May 2017 21:09:52 +0000 (21:09 +0000)]
eigrpd: spatch thread_add* calls and macros
As described in previous commits
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Fri, 5 May 2017 21:55:29 +0000 (21:55 +0000)]
ospf6d, zebra: remove unnecessary asserts
These pointers are now guaranteed to be null, so asserting the opposite
will crash.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Fri, 5 May 2017 21:22:25 +0000 (21:22 +0000)]
*: update thread_add_* calls
Pass pointer to pointer instead of assigning by return value. See
previous commit message.
To ensure that the behavior stays functionally correct, any assignments
with the result of a thread_add* function have been transformed to set
the pointer to null before passing it. These can be removed wherever the
pointer is known to already be null.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Fri, 5 May 2017 17:30:21 +0000 (17:30 +0000)]
lib: safely check & set thread pointers
When scheduling a thread, the scheduling function returns a pointer to
the struct thread that was placed on one of the scheduling queues in the
associated thread master. This pointer is used to check whether or not
the thread is scheduled, and is passed to thread_cancel() should the
daemon need to cancel that particular task.
The thread_fetch() function is called to retrieve the next thread to
execute. However, when it returns, the aforementioned pointer is not
updated. As a result, in order for the above use cases to work, every
thread handler function must set the associated pointer to NULL. This is
bug prone, and moreover, not thread safe.
This patch changes the thread scheduling functions to return void. If
the caller needs a reference to the scheduled thread, it must pass in a
pointer to store the pointer to the thread struct in. Subsequent calls
to thread_cancel(), thread_cancel_event() or thread_fetch() will result
in that pointer being nulled before return. These operations occur
within the thread_master critical sections.
Overall this should avoid bugs introduced by thread handler funcs
forgetting to null the associated pointer, double-scheduling caused by
overwriting pointers to currently scheduled threads without performing a
nullity check, and the introduction of true kernel threads causing race
conditions within the userspace threading world.
Also removes the return value for thread_execute since it always returns
null...
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Mon, 24 Apr 2017 22:33:25 +0000 (22:33 +0000)]
*: remove THREAD_ON macros, add nullity check
The way thread.c is written, a caller who wishes to be able to cancel a
thread or avoid scheduling it twice must keep a reference to the thread.
Typically this is done with a long lived pointer whose value is checked
for null in order to know if the thread is currently scheduled. The
check-and-schedule idiom is so common that several wrapper macros in
thread.h existed solely to provide it.
This patch removes those macros and adds a new parameter to all
thread_add_* functions which is a pointer to the struct thread * to
store the result of a scheduling call. If the value passed is non-null,
the thread will only be scheduled if the value is null. This helps with
consistency.
A Coccinelle spatch has been used to transform code of the form:
if (t == NULL)
t = thread_add_* (...)
to the form
thread_add_* (..., &t)
The THREAD_ON macros have also been transformed to the underlying
thread.c calls.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Donald Sharp [Tue, 9 May 2017 20:18:04 +0000 (16:18 -0400)]
*: Remove ability to install frr_sudoers
If the user were to uncomment last line
and allow VTYSH_SHOW to be used as a non-root
account, this would allow arbitrary command completion
inside of vtysh via multiple -c ... -c .... lines
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 9 May 2017 19:45:15 +0000 (15:45 -0400)]
Merge pull request #485 from LabNConsulting/working/3.0/patch-set/missing1
Pick up a couple of patches to master that are needed on 3.0
Lou Berger [Tue, 9 May 2017 18:38:55 +0000 (14:38 -0400)]
bgp rfapi: rfapi shouldn't be called (yet) for BGP VRF instances.
Lou Berger [Sun, 2 Apr 2017 19:34:55 +0000 (15:34 -0400)]
bgpd: restore -S, --skip_runas options
Signed-off-by: Lou Berger <lberger@labn.net>
Lou Berger [Sun, 2 Apr 2017 17:55:58 +0000 (13:55 -0400)]
bgp: fix a couple of instances of bm being used before init'ed
Signed-off-by: Lou Berger <lberger@labn.net>
Donald Sharp [Tue, 9 May 2017 15:55:54 +0000 (11:55 -0400)]
Merge pull request #478 from opensourcerouting/test-extension
tests: allow to use exit_cleanly as test method
David Lamparter [Tue, 9 May 2017 15:54:46 +0000 (17:54 +0200)]
Merge pull request #469 from qlyoung/fix-list-perm-3.0
lib: fix 'list permutations' (3.0)
Lou Berger [Tue, 9 May 2017 15:54:33 +0000 (11:54 -0400)]
Merge pull request #454 from dwalton76/hide-router-bgp-peer-ipv4-unicast-commands
bgpd: hide "router bgp" commands also under "address-family ipv4 unic…
David Lamparter [Tue, 9 May 2017 15:54:22 +0000 (17:54 +0200)]
Merge pull request #468 from qlyoung/fix-list-perm
lib: fix 'list permutations'
Jafar Al-Gharaibeh [Tue, 9 May 2017 15:50:56 +0000 (10:50 -0500)]
Merge pull request #435 from chiragshah6/pim_dev
pimd: Introduce show command for protocol counters
Donald Sharp [Tue, 9 May 2017 14:16:38 +0000 (10:16 -0400)]
debian: Mark FRR as conflicting with Quagga
FRR when compiled with this debian packaging will cause
some issue with the system to work properly due to the
sudoers file conflicts.
So to prevent some level of stupidity, mark them as
conflicting.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 5 May 2017 19:28:38 +0000 (15:28 -0400)]
*: Allow agentx to be displayed as part of vtysh
Modify code so that that vtysh can now accept the
agentx command for snmp support
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 8 May 2017 20:51:21 +0000 (16:51 -0400)]
Merge remote-tracking branch 'origin/stable/3.0'