]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agoMerge branch 'master' into pr752
tmartiro [Wed, 5 Jul 2017 07:02:20 +0000 (10:02 +0300)]
Merge branch 'master' into pr752

6 years agoMerge pull request #742 from qlyoung/hashstats
Martin Winter [Tue, 4 Jul 2017 18:58:10 +0000 (11:58 -0700)]
Merge pull request #742 from qlyoung/hashstats

Hashtable statistics

6 years agofix #752 problem: ARP is not updating if mac address changed on remote side
tigranmartirosyan [Mon, 3 Jul 2017 19:05:58 +0000 (23:05 +0400)]
fix #752 problem: ARP is not updating if mac address changed on remote side

6 years agolib, vtysh: rebase hashstats
Quentin Young [Fri, 30 Jun 2017 16:56:10 +0000 (16:56 +0000)]
lib, vtysh: rebase hashstats

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: use doubles instead of long doubles
Quentin Young [Fri, 23 Jun 2017 05:14:54 +0000 (05:14 +0000)]
lib: use doubles instead of long doubles

NetBSD can't take the square root of a long double
and we should be fine just using a double here anyway

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years ago*: update hash_create(), hash_create_size()
Quentin Young [Mon, 19 Jun 2017 22:49:44 +0000 (22:49 +0000)]
*: update hash_create(), hash_create_size()

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib, vtysh: hashtable statistics
Quentin Young [Mon, 19 Jun 2017 14:22:26 +0000 (14:22 +0000)]
lib, vtysh: hashtable statistics

Adds the ability to name hash tables, and a new cli command that will
show various summary statistics for named hash tables.

Statistics computed are
  - load factor
  - full load factor (see comments)
  - stddev of full load factor

Standard deviation is computed by storing the sum of squares of bucket
lengths. This is somewhat susceptible to overflow. On platforms where a
double is 32 bits, placing 65535 or more elements into a hash table
opens up the potential for overflow, depending on how they are arranged
in buckets (which depends on the hash function). For example, placing
65535 elements into one hash bucket would cause ssq overflow, but
distributing 40000000 elements evenly among 400000 buckets (100 elements
per bucket) would not.

These cases are extremely degenerate, so the vague possibility of
overflow in an informational command is deemed an acceptable tradeoff
for constant time calculation of variance without locks or compromising
efficiency of actual table operations.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: add statistics for hash tables
Quentin Young [Tue, 30 May 2017 00:16:52 +0000 (00:16 +0000)]
lib: add statistics for hash tables

Adds a function that calculates various statistics on our implementation
of a hash table. These are useful for evaluating performance.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #771 from qlyoung/printf-madness
Jafar Al-Gharaibeh [Fri, 30 Jun 2017 18:07:23 +0000 (13:07 -0500)]
Merge pull request #771 from qlyoung/printf-madness

lib: printf bugfixes & improvement

6 years agoMerge pull request #740 from donaldsharp/ospf_commands
Jafar Al-Gharaibeh [Fri, 30 Jun 2017 17:28:13 +0000 (12:28 -0500)]
Merge pull request #740 from donaldsharp/ospf_commands

ospfd: Fix 'advanced' type data base show

6 years agolib: printf bugfixes & improvement
Quentin Young [Fri, 30 Jun 2017 16:18:20 +0000 (16:18 +0000)]
lib: printf bugfixes & improvement

* Fix bad format specifier in thread.[ch]
* Move PRINTF_ATTRIBUTE macro to zebra.h
* Use PRINTF_ATTRIBUTE on termtable printers

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #768 from qlyoung/fix-gitignore2
Jafar Al-Gharaibeh [Fri, 30 Jun 2017 15:38:20 +0000 (10:38 -0500)]
Merge pull request #768 from qlyoung/fix-gitignore2

lib, bgpd: fix .gitignore

6 years agoMerge pull request #770 from donaldsharp/zclient
Jafar Al-Gharaibeh [Fri, 30 Jun 2017 15:35:28 +0000 (10:35 -0500)]
Merge pull request #770 from donaldsharp/zclient

Zclient

6 years agoospfd: Fix 'advanced' type data base show
Donald Sharp [Mon, 19 Jun 2017 15:17:57 +0000 (11:17 -0400)]
ospfd: Fix 'advanced' type data base show

Two things:

1) Some advanced 'show ip ospf database'... code
was not working properly.  Fix the cli to handle
this appropriately

2) Consolidate two cli functions into one.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworkscom>
6 years agoMerge pull request #723 from qlyoung/fix-static-pipe-poker-buf
Jafar Al-Gharaibeh [Fri, 30 Jun 2017 15:00:43 +0000 (10:00 -0500)]
Merge pull request #723 from qlyoung/fix-static-pipe-poker-buf

lib: more multithreading infra work

6 years agoMerge pull request #769 from qlyoung/fix-json-int
Russ White [Fri, 30 Jun 2017 14:44:03 +0000 (10:44 -0400)]
Merge pull request #769 from qlyoung/fix-json-int

lib: always use 64-bit integers for json

6 years agoospf6d: Fix zclient cleanup on shutdown
Donald Sharp [Fri, 30 Jun 2017 14:33:30 +0000 (10:33 -0400)]
ospf6d: Fix zclient cleanup on shutdown

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoospfd: Fix zclient cleanup on shutdown
Donald Sharp [Fri, 30 Jun 2017 14:33:09 +0000 (10:33 -0400)]
ospfd: Fix zclient cleanup on shutdown

Signed-off-by: Donald Sharp <sharpd@cumulunsnetworks.com>
6 years agopimd: Fix zclient cleanup on shutdown
Donald Sharp [Fri, 30 Jun 2017 14:32:45 +0000 (10:32 -0400)]
pimd: Fix zclient cleanup on shutdown

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoripd: Fix zclient cleanup on shutdown
Donald Sharp [Fri, 30 Jun 2017 14:32:26 +0000 (10:32 -0400)]
ripd: Fix zclient cleanup on shutdown

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoripngd: Fix zclient cleanup on shutdown
Donald Sharp [Fri, 30 Jun 2017 14:32:01 +0000 (10:32 -0400)]
ripngd: Fix zclient cleanup on shutdown

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agonhrpd: Fix zclient cleanup on shutdown
Donald Sharp [Fri, 30 Jun 2017 14:31:34 +0000 (10:31 -0400)]
nhrpd: Fix zclient cleanup on shutdown

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoisisd: Fix zclient cleanup on shutdown
Donald Sharp [Fri, 30 Jun 2017 14:31:09 +0000 (10:31 -0400)]
isisd: Fix zclient cleanup on shutdown

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Fix zclient cleanup on shutdown
Donald Sharp [Fri, 30 Jun 2017 14:30:34 +0000 (10:30 -0400)]
eigrpd: Fix zclient cleanup on shutdown

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobabeld: Fix zclient cleanup on shutdown
Donald Sharp [Fri, 30 Jun 2017 14:29:58 +0000 (10:29 -0400)]
babeld: Fix zclient cleanup on shutdown

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib: Fix clang warning
Donald Sharp [Fri, 30 Jun 2017 14:29:14 +0000 (10:29 -0400)]
lib: Fix clang warning

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #767 from donaldsharp/if_update
Jafar Al-Gharaibeh [Fri, 30 Jun 2017 04:42:21 +0000 (23:42 -0500)]
Merge pull request #767 from donaldsharp/if_update

bgpd, lib, zebra: Fix if_update function to represent what it does

6 years agolib: fix merge error
Quentin Young [Thu, 29 Jun 2017 17:49:45 +0000 (17:49 +0000)]
lib: fix merge error

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: more `show thread cpu`
Quentin Young [Thu, 15 Jun 2017 20:17:44 +0000 (20:17 +0000)]
lib: more `show thread cpu`

Add support for naming pthreads. Also, note that we don't have any
records yet if that's the case.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: make `show thread...` commands mt-aware
Quentin Young [Thu, 15 Jun 2017 19:10:57 +0000 (19:10 +0000)]
lib: make `show thread...` commands mt-aware

This patch fixes up show thread commands so that they know about
and operate on all extant thread_masters, since we can now have multiple
running in any given application.

This change also eliminates a heap use after free that appears when
using a single cpu_record shared among multiple threads. Since struct
thread's have pointers to bits of memory that are freed when the global
statistics hash table is freed, later accesses are invalid. By moving
the stats hash to be unique to each thread_master this problem is
sidestepped.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: mt-safe tracebacks
Quentin Young [Thu, 15 Jun 2017 16:05:19 +0000 (16:05 +0000)]
lib: mt-safe tracebacks

can't be using them statics anymore sonny

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: un-static trash buffer for pipe poker
Quentin Young [Thu, 15 Jun 2017 14:24:51 +0000 (14:24 +0000)]
lib: un-static trash buffer for pipe poker

data races

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: always use 64-bit integers for json
Quentin Young [Thu, 29 Jun 2017 23:05:36 +0000 (23:05 +0000)]
lib: always use 64-bit integers for json

json-c does not (yet) offer support for unsigned integer types, and
furthermore, the docs state that all integers are stored internally as
64-bit. So there's never a case in which we would want to limit,
implicitly or otherwise, the range of an integer when adding it to a
json object.

Among other things this fixes the display of ASN values greater than
(1/2) * (2^32 - 1)

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib, bgpd: fix .gitignore
Quentin Young [Thu, 29 Jun 2017 19:39:36 +0000 (19:39 +0000)]
lib, bgpd: fix .gitignore

gotta ignore clippy stuff

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #746 from qlyoung/vty-outln
Jafar Al-Gharaibeh [Thu, 29 Jun 2017 18:22:37 +0000 (13:22 -0500)]
Merge pull request #746 from qlyoung/vty-outln

vty_outln()

6 years ago*: rebase vty_outln() -> master
Quentin Young [Wed, 28 Jun 2017 16:30:14 +0000 (16:30 +0000)]
*: rebase vty_outln() -> master

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years ago*: vty_outln (vty, "") --> vty_out (vty, VTYNL)
Quentin Young [Wed, 21 Jun 2017 18:10:29 +0000 (18:10 +0000)]
*: vty_outln (vty, "") --> vty_out (vty, VTYNL)

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years ago*: s/VTY_NEWLINE/VTYNL/g
Quentin Young [Wed, 21 Jun 2017 17:15:40 +0000 (17:15 +0000)]
*: s/VTY_NEWLINE/VTYNL/g

Should be able to fit more vty_out onto one line now

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years ago*: use vty_outln
Quentin Young [Wed, 21 Jun 2017 03:10:57 +0000 (03:10 +0000)]
*: use vty_outln

Saves 400 lines

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: add vty_outln()
Quentin Young [Wed, 21 Jun 2017 02:47:44 +0000 (02:47 +0000)]
lib: add vty_outln()

Like *.println() in some other unspeakable languages

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #701 from qlyoung/mt-safe-cancel
Russ White [Thu, 29 Jun 2017 15:09:24 +0000 (11:09 -0400)]
Merge pull request #701 from qlyoung/mt-safe-cancel

mt-safe thread_cancel()

6 years agoMerge pull request #735 from qlyoung/fix-routemap
Russ White [Thu, 29 Jun 2017 15:06:52 +0000 (11:06 -0400)]
Merge pull request #735 from qlyoung/fix-routemap

Fix routemap

6 years agoMerge pull request #754 from qlyoung/fix-argv-arg
Russ White [Thu, 29 Jun 2017 15:06:15 +0000 (11:06 -0400)]
Merge pull request #754 from qlyoung/fix-argv-arg

use argv->text where appropriate

6 years agoMerge pull request #759 from qlyoung/remove-vty-argparsers
Jafar Al-Gharaibeh [Thu, 29 Jun 2017 14:36:06 +0000 (09:36 -0500)]
Merge pull request #759 from qlyoung/remove-vty-argparsers

*: remove VTY_GET_*

6 years agoMerge pull request #763 from dslicenc/ospfd-network-statement
Jafar Al-Gharaibeh [Thu, 29 Jun 2017 14:35:36 +0000 (09:35 -0500)]
Merge pull request #763 from dslicenc/ospfd-network-statement

lib/ospf/eigrp: enable ospf and eigrp to use more specific network st…

6 years agoMerge remote-tracking branch 'origin/stable/3.0'
Donald Sharp [Thu, 29 Jun 2017 14:10:15 +0000 (10:10 -0400)]
Merge remote-tracking branch 'origin/stable/3.0'

6 years agobgpd, lib, zebra: Fix if_update function to represent what it does
Donald Sharp [Thu, 29 Jun 2017 13:09:23 +0000 (09:09 -0400)]
bgpd, lib, zebra: Fix if_update function to represent what it does

The if_update function was taking the interface name as
input and reapplying it, using strncpy to reapply the name.
This has several issues.  strncpy should not be used
to copy memory in place.  The second issue is that
the interface name is not actually changing when we
update interface to be in the new vrf.

Since every usage of if_update was just reapplying the same
name the interface actually had, just remove that part of
the function and rename it to if_update_to_new_vrf
to represent what it is actually doing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #764 from Jafaral/ospfintaddr
Donald Sharp [Thu, 29 Jun 2017 12:16:30 +0000 (08:16 -0400)]
Merge pull request #764 from Jafaral/ospfintaddr

ospfd: Bring in some OSPF changes lost during Quagga fork

6 years agoospfd: The CLI validates the IP address
Jafar Al-Gharaibeh [Thu, 29 Jun 2017 04:21:14 +0000 (23:21 -0500)]
ospfd: The CLI validates the IP address

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
6 years agoMerge remote-tracking branch 'origin/stable/2.0'
Donald Sharp [Wed, 28 Jun 2017 23:10:20 +0000 (19:10 -0400)]
Merge remote-tracking branch 'origin/stable/2.0'

6 years agoospfd: Bring in some OSPF useful changes that were lost during Quagga fork
Jafar Al-Gharaibeh [Thu, 27 Aug 2009 15:51:42 +0000 (16:51 +0100)]
ospfd: Bring in some OSPF useful changes that were lost during Quagga fork

  Several changes were made from the original patch to resolve conflicts
  and also to fix various issues that were discovered during testing. Below
  is the original commit message minus a few parts that correspond to code
  that was dropped during bug fixing.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
  ospfd: Extend 'ip ospf area' to take address argument + rationalise ospf enable
* ospfd.c: (general) Clean up the whole running of OSPF on interfaces.
  (add_ospf_interface) taking (struct interface *) arg is pointless here.
  (ospf_is_ready) new helper.
  (ospf_network_run_subnet) Put all the code for choosing whether to enable
  OSPF on a subnet, and if so which area configuration to use, here. If a
  subnet should not be enabled, ensure an existing oi is freed.
  (ospf_network_run_interface) Just call run_subnet for all subnets on an
  interface.
  (ospf_network_run) Just call run_interface for all interfaces.
  (ospf_if_update) Just call run_interface for the given interface.
  (ospf_network_unset) Just call run_subnet for existing ois.
  (ospf_update_interface_area) helper: update area on an oi, or create it.
  (ospf_interface_set) renamed to ospf_interface_area_set for clarity.
  Ensures OSPF is created, then into if_update.
  (ospf_interface_unset) renamed to ospf_interface_area_unset and collapses
  down to simple loop to call run_subnet for all ois.
* ospf_interface.h: add a more general OSPF_IF_PARAM_IS_SET, which does the
  right thing and takes default config into account.
* doc/ospfd.texi: add 'ip ospf area' command.

Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
  This patch has been part of Quagga since October 2015

  Orignial Author:    Paul Jakma <paul@quagga.net>
  Date:      Thu Aug 27 16:51:42 2009 +0100

6 years agolib/ospf/eigrp: enable ospf and eigrp to use more specific network statements
Don Slice [Wed, 28 Jun 2017 18:53:27 +0000 (14:53 -0400)]
lib/ospf/eigrp: enable ospf and eigrp to use more specific network statements

Issue reported that a configuration commonly used on other routing implementations
fails in frr.  If under ospf, "network 172.16.1.1/32 area 0" or under eigrp, "network
172.16.1.1/32" is entered, the appropriate interfaces are not included in the routing
protocol.  This was because the code was calling prefix_match, which did not match if
the network statement had a longer mask than the interface being matched.  This fix
takes away that restriction by creating a "lib/prefix_match_network_statement" function
which doesn't care about the mask of the interface.  Manual testing shows both ospf and
eigrp now can be defined with more specific network statements.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
6 years agoMerge pull request #753 from dslicenc/cm16876-ospfv6-mtu
Olivier Dugeon [Wed, 28 Jun 2017 14:10:58 +0000 (16:10 +0200)]
Merge pull request #753 from dslicenc/cm16876-ospfv6-mtu

ospf6d: fix ifmtu settings when kernel changes values

6 years agoMerge pull request #756 from opensourcerouting/isis-redist-fixes
Donald Sharp [Wed, 28 Jun 2017 13:55:35 +0000 (09:55 -0400)]
Merge pull request #756 from opensourcerouting/isis-redist-fixes

Isis redist fixes

6 years agoMerge pull request #760 from opensourcerouting/rpm-non-redhat-fix
Donald Sharp [Wed, 28 Jun 2017 13:49:10 +0000 (09:49 -0400)]
Merge pull request #760 from opensourcerouting/rpm-non-redhat-fix

redhat: Fix fallout from PR722 (accidently disabled PIMd on non-Redha…

6 years agoMerge pull request #714 from opensourcerouting/cli_magic_defpy
Donald Sharp [Wed, 28 Jun 2017 13:48:33 +0000 (09:48 -0400)]
Merge pull request #714 from opensourcerouting/cli_magic_defpy

CLI magic: part 1 (DEFPY)

6 years agoospf6d: add buffer length check to ifmtu changes
Don Slice [Wed, 28 Jun 2017 12:37:32 +0000 (08:37 -0400)]
ospf6d: add buffer length check to ifmtu changes

Previous fix was missing the possibility of having to modify the io
buffer size if the kernel reports an new mtu value.  This fix adds
that check.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
6 years agoredhat: On CentOS/RedHat 6, use python27-devel from iuscommunity.org
Martin Winter [Wed, 28 Jun 2017 02:49:38 +0000 (19:49 -0700)]
redhat: On CentOS/RedHat 6, use python27-devel from iuscommunity.org

FRR requires now Python 2.7 development libraries, but CentOS 6
does not provide this (not in main and not in EPEL library)
This is only a build limitation.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoredhat: Fix fallout from PR722 (accidently disabled PIMd on non-Redhat systems)
Martin Winter [Wed, 28 Jun 2017 02:09:59 +0000 (19:09 -0700)]
redhat: Fix fallout from PR722 (accidently disabled PIMd on non-Redhat systems)

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoredhat: python-devel is now a build requirement for main package
Martin Winter [Wed, 28 Jun 2017 01:10:29 +0000 (18:10 -0700)]
redhat: python-devel is now a build requirement for main package

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebian: python3-dev is now a build requirement for main package
Martin Winter [Wed, 28 Jun 2017 01:09:38 +0000 (18:09 -0700)]
debian: python3-dev is now a build requirement for main package

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodoc: Update to reflect Python Development Library dependency for all builds
Martin Winter [Wed, 28 Jun 2017 01:08:55 +0000 (18:08 -0700)]
doc: Update to reflect Python Development Library dependency for all builds

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoMerge pull request #722 from drizzt/rpm-fixes-2.0
Martin Winter [Wed, 28 Jun 2017 00:03:44 +0000 (17:03 -0700)]
Merge pull request #722 from drizzt/rpm-fixes-2.0

redhat/frr.spec.in: Avoid expand when possible

6 years ago*: remove VTY_GET_*
Quentin Young [Tue, 27 Jun 2017 18:47:03 +0000 (18:47 +0000)]
*: remove VTY_GET_*

CLI validates input tokens, so there's no need to do it in handler
functions anymore.

spatch follows
----------------

@getull@
expression v;
expression str;
@@
<...
- VTY_GET_ULL(..., v, str)
+ v = strtoull (str, NULL, 10)
...>

@getul@
expression v;
expression str;
@@
<...
- VTY_GET_ULONG(..., v, str)
+ v = strtoul (str, NULL, 10)
...>

@getintrange@
expression name;
expression v;
expression str;
@@
<...
- VTY_GET_INTEGER_RANGE(name, v, str, ...)
+ v = strtoul (str, NULL, 10)
...>

@getint@
expression v;
expression str;
@@
<...
- VTY_GET_INTEGER(..., v, str)
+ v = strtoul (str, NULL, 10)
...>

@getv4@
expression v;
expression str;
@@
<...
- VTY_GET_IPV4_ADDRESS(..., v, str)
+ inet_aton (str, &v)
...>

@getv4pfx@
expression v;
expression str;
@@
<...
- VTY_GET_IPV4_PREFIX(..., v, str)
+ str2prefix_ipv4 (str, &v)
...>

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: argv->arg grab bag
Quentin Young [Tue, 27 Jun 2017 17:42:43 +0000 (17:42 +0000)]
bgpd: argv->arg grab bag

* Pass ->text to functions that now do full string matching
* Remove cases for l2vpn and evpn where they cannot occur

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: more cli-ening
Quentin Young [Mon, 26 Jun 2017 19:08:31 +0000 (19:08 +0000)]
bgpd: more cli-ening

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years ago*: use ->text and strmatch where appropriate
Quentin Young [Mon, 26 Jun 2017 18:15:19 +0000 (18:15 +0000)]
*: use ->text and strmatch where appropriate

Still need to go fix all the places where we do a 1-char strncmp...

spatch follows
------------------

@asdf@
expression idx;
@@
<...
 strcmp (
- argv[idx]->arg,
+ argv[idx]->text,
  ...)
...>

@depends on asdf@
expression idx;
@@
<...
- !strcmp (argv[idx]->text,
+ strmatch (argv[idx]->text,
           ...)
...>

@depends on asdf@
expression idx;
expression arg;
@@
<...
- strcmp (argv[idx]->text, arg) == 0
+ strmatch (argv[idx]->text, arg)
...>

@depends on asdf@
expression idx;
expression arg;
@@
<...
- strcmp (argv[idx]->text, arg) != 0
+ !strmatch (argv[idx]->text, arg)
...>

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #757 from donaldsharp/extract_sort
Jafar Al-Gharaibeh [Tue, 27 Jun 2017 15:56:56 +0000 (10:56 -0500)]
Merge pull request #757 from donaldsharp/extract_sort

vtysh: Sort ordering of vtysh_cmd.c

6 years agoMerge pull request #748 from qlyoung/fix-vtysh-exit
Jafar Al-Gharaibeh [Tue, 27 Jun 2017 15:47:45 +0000 (10:47 -0500)]
Merge pull request #748 from qlyoung/fix-vtysh-exit

lib: actually exit when asked to 'do' so

6 years agoMerge pull request #747 from qlyoung/fix-various-vtysh-do
Jafar Al-Gharaibeh [Tue, 27 Jun 2017 15:46:21 +0000 (10:46 -0500)]
Merge pull request #747 from qlyoung/fix-various-vtysh-do

vtysh: fix various show commands

6 years agoMerge pull request #709 from opensourcerouting/ldpd-dual-stack
ßingen [Tue, 27 Jun 2017 13:37:52 +0000 (15:37 +0200)]
Merge pull request #709 from opensourcerouting/ldpd-dual-stack

ldpd: fix issues with dual-stack adjacencies

6 years agovtysh: Sort ordering of vtysh_cmd.c
Donald Sharp [Tue, 27 Jun 2017 12:15:45 +0000 (08:15 -0400)]
vtysh: Sort ordering of vtysh_cmd.c

When we created the vtysh_cmd.c file the vtysh_cmd.c output
is slightly different for every run, even when none of the
inputs have changed.

Add the ability to sort the output so that the output is
the same for every build.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #749 from qlyoung/fix-json-cli
Jafar Al-Gharaibeh [Mon, 26 Jun 2017 19:18:56 +0000 (14:18 -0500)]
Merge pull request #749 from qlyoung/fix-json-cli

lib: look at the correct token for json

6 years agoospf6d: fix ifmtu settings when kernel changes values
Don Slice [Thu, 22 Jun 2017 16:17:24 +0000 (09:17 -0700)]
ospf6d: fix ifmtu settings when kernel changes values

Problem reported by customer that if an mtu value was set in the kernel,
quagga/frr would get very confused about what had been configured and
what had been learned.  This caused peers to not be successfully established.
Resolved by keeping a configuration value separate than the operational value
and set the operational accordingly.  If configured, it wins unless the config
defines a value that is higher than the kernel supports.

Ticket: CM-16876
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed By: CCR-6399
Testing Done: Manual testing successful, submitter tested, ospf-smoke completed
with no new failures.

6 years agoMerge pull request #704 from chiragshah6/pim_dev_3_0
Jafar Al-Gharaibeh [Fri, 23 Jun 2017 15:29:27 +0000 (10:29 -0500)]
Merge pull request #704 from chiragshah6/pim_dev_3_0

ospfd: ospf bandwidth handling

6 years agolib: look at the correct token for json
Quentin Young [Thu, 22 Jun 2017 00:19:24 +0000 (00:19 +0000)]
lib: look at the correct token for json

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: actually exit when asked to do so
Quentin Young [Wed, 21 Jun 2017 20:06:44 +0000 (20:06 +0000)]
lib: actually exit when asked to do so

When vtysh sends 'exit' to a daemon, we set the vty->status to
VTY_CLOSE but never actually close the connection. Lovely.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agovtysh: fix various show commands
Quentin Young [Wed, 21 Jun 2017 18:42:17 +0000 (18:42 +0000)]
vtysh: fix various show commands

need 'do' to force ENABLE_NODE

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #745 from qlyoung/fix-lookup
Olivier Dugeon [Wed, 21 Jun 2017 16:22:52 +0000 (18:22 +0200)]
Merge pull request #745 from qlyoung/fix-lookup

*: simplify log message lookup

6 years agolib: some minor cli fixups for routemap
Quentin Young [Wed, 21 Jun 2017 15:41:35 +0000 (15:41 +0000)]
lib: some minor cli fixups for routemap

Need to use the appropriate token field

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years ago*: simplify log message lookup
Quentin Young [Tue, 20 Jun 2017 23:56:50 +0000 (23:56 +0000)]
*: simplify log message lookup

log.c provides functionality for associating a constant (typically a
protocol constant) with a string and finding the string given the
constant. However this is highly delicate code that is extremely prone
to stack overflows and off-by-one's due to requiring the developer to
always remember to update the array size constant and to do so correctly
which, as shown by example, is never a good idea.b

The original goal of this code was to try to implement lookups in O(1)
time without a linear search through the message array. Since this code
is used 99% of the time for debugs, it's worth the 5-6 additional cmp's
worst case if it means we avoid explitable bugs due to oversights...

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoisisd: fix to adhere to new cli api
Christian Franke [Tue, 20 Jun 2017 20:49:37 +0000 (22:49 +0200)]
isisd: fix to adhere to new cli api

6 years agoisisd: fix memtype counting issue
Christian Franke [Tue, 20 Jun 2017 20:48:36 +0000 (22:48 +0200)]
isisd: fix memtype counting issue

6 years agoisisd: adjust redist functionality to current zapi
Christian Franke [Tue, 20 Jun 2017 20:47:54 +0000 (22:47 +0200)]
isisd: adjust redist functionality to current zapi

6 years agoisisd: fix formatting in metrics when showing database
Christian Franke [Tue, 20 Jun 2017 20:46:41 +0000 (22:46 +0200)]
isisd: fix formatting in metrics when showing database

6 years agoMerge pull request #741 from qlyoung/fix-vtysh-buffer-overrun
Russ White [Tue, 20 Jun 2017 02:02:49 +0000 (22:02 -0400)]
Merge pull request #741 from qlyoung/fix-vtysh-buffer-overrun

vtysh: fix stack buffer overflow

6 years agoMerge pull request #698 from dslicenc/cm16737-srgb-block
Russ White [Tue, 20 Jun 2017 02:00:57 +0000 (22:00 -0400)]
Merge pull request #698 from dslicenc/cm16737-srgb-block

zebra: define default segment routing global block values

6 years agoMerge pull request #707 from donaldsharp/debian_babel
Russ White [Tue, 20 Jun 2017 01:58:36 +0000 (21:58 -0400)]
Merge pull request #707 from donaldsharp/debian_babel

tools: Fix startup to include babel

6 years agoMerge pull request #728 from donaldsharp/owner
Russ White [Tue, 20 Jun 2017 01:55:43 +0000 (21:55 -0400)]
Merge pull request #728 from donaldsharp/owner

bgpd: Remove unset table.owner

6 years agoMerge pull request #731 from qlyoung/fix-bgp-misc-cli
Russ White [Tue, 20 Jun 2017 01:53:05 +0000 (21:53 -0400)]
Merge pull request #731 from qlyoung/fix-bgp-misc-cli

bgpd: fix misc cli ranges & config writes

6 years agoMerge pull request #732 from qlyoung/coverity-memes
Russ White [Tue, 20 Jun 2017 01:52:10 +0000 (21:52 -0400)]
Merge pull request #732 from qlyoung/coverity-memes

lib: termtable coverity warnings

6 years agoMerge pull request #730 from opensourcerouting/rbtree-improvement
Donald Sharp [Mon, 19 Jun 2017 21:27:55 +0000 (17:27 -0400)]
Merge pull request #730 from opensourcerouting/rbtree-improvement

RB tree improvement

6 years agovtysh: fix stack buffer overflow
Quentin Young [Mon, 19 Jun 2017 20:34:22 +0000 (20:34 +0000)]
vtysh: fix stack buffer overflow

VARIABLE accepts arbitrary input

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: fix __unused compilation on old platforms
Rafael Zalamena [Mon, 19 Jun 2017 16:24:04 +0000 (13:24 -0300)]
lib: fix __unused compilation on old platforms

Expand the macro __attribute__ to avoid problem with old platforms that
do not define this.

6 years agolib: rename rb_tree to fix NetBSD compilation
Rafael Zalamena [Mon, 19 Jun 2017 16:17:35 +0000 (13:17 -0300)]
lib: rename rb_tree to fix NetBSD compilation

Change rb_tree struct name to rbt_tree to avoid conflicts with NetBSD.

6 years agoospfd: fix route-map brokenness
Quentin Young [Fri, 16 Jun 2017 22:43:56 +0000 (22:43 +0000)]
ospfd: fix route-map brokenness

ospf redefines the standard route map commands which causes ambiguity
issues in the CLI parser, it also uses a signed integer to hold an
unsigned quantity leading to weirdness when specifying metrics larger
than 2,147,483,647

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: improve routemap error messages
Quentin Young [Fri, 16 Jun 2017 22:43:09 +0000 (22:43 +0000)]
lib: improve routemap error messages

indicate which daemon was the source of the message and that it may be a
question of daemon support rather than a malformed argument

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib: Fix ordering of RB Tree
Donald Sharp [Fri, 16 Jun 2017 21:40:17 +0000 (17:40 -0400)]
lib: Fix ordering of RB Tree

So the *bsd implementations of RB Tree's for older
platforms use a macro implementation.  New platforms
have converted to a function implementation that uses
a different calling parameter list.  So when
we attempt to build FRR on older *bsd implementations
the macro's and functions do not interact too well.

As a workaround put the openbsd-tree.h #include
inside of zebra.h at a point before the particular
platforms version is included.  Since we use
the same #if guard for the header we should be ok.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoldpd: fix fallouts from the rb-tree conversion
Renato Westphal [Fri, 16 Jun 2017 20:30:35 +0000 (17:30 -0300)]
ldpd: fix fallouts from the rb-tree conversion

Signed-off-by: Renato Westphal <renato@openbsd.org>
6 years agoMerge pull request #725 from donaldsharp/vrf_completion
David Lamparter [Fri, 16 Jun 2017 19:59:23 +0000 (21:59 +0200)]
Merge pull request #725 from donaldsharp/vrf_completion

Vrf completion