Commit Graph

4904 Commits

Author SHA1 Message Date
David Lamparter
db2d8df649 lib: replace MIT license with ISC
Since other parts (e.g. ldpd) use the ISC license, and the ISC license
is just a simplified form of the MIT license, just move things over and
reduce the number of different licenses we have in use here.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-01 17:18:57 +01:00
David Lamparter
9b7939d945 build: COMMUNITY.md: add git branch diagram
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-01 17:16:24 +01:00
Christian Franke
aa86a160f4 zebra: check ZEBRA_IFC_REAL on if_up
Only connected routes which have ZEBRA_IFC_REAL set should
be redistributed.

Signed-off-by: Christian Franke <nobody@nowhere.ws>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-01 16:38:36 +01:00
Renato Westphal
ff999357fd bgpd: fix invalid memory access in peer_free()
We shoult not call bgp_unlock() before calling
bgp_delete_connected_nexthop() in the peer_free() function. Otherwise,
if bgp->lock reaches zero, bgp_free() is called and peer->bgp becomes
an invalid pointer in the bgp_delete_connected_nexthop() function.

To fix this, move the call to bgp_unlock() to the end of peer_free().

Bug exposed by commit 37d361e ("bgpd: plug several memleaks").

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-01 16:34:19 +01:00
Donald Sharp
34620e24b5 bgpd: Fix crashes when no default bgp instance is configured.
The vnc code assumes that bgp must have a default instance.
This code change checks to make sure that we do before
proceeding.  It makes no assurances that vnc will behave
correctly without a default instance.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-01 16:28:12 +01:00
Donald Sharp
94d95cde35 pimd: Fix large integer display of drpriority
When displaying drpriority you can enter unsigned
integer values from 1-2^32.  The display was
turning the unsigned value into a signed value
and thus we were displaying the wrong value.

Ticket: CM-13787
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: David Ahern <dsa@cumulusnetworks.com>
(cherry picked from commit db17265f1025e3ec578998ad537c33b49ed33cde)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-01 16:28:12 +01:00
Donald Sharp
0cad6e2653 ospfd: Fix memory leak when not using json
When doing a show command under ospf, if
not using json we would have a small memory
leak in show_ip_ospf_common.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 50750712b1ac8364e290c67782eaf371025dc59e)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-12-01 16:28:12 +01:00
David Lamparter
6d19ff2115 build: drop TODO from redhat/quagga.spec.in
Fixes: 955026c8... "build: ditch outdated documents, including HACKING"
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-29 20:31:43 +01:00
Daniel Walton
fa86975d47 bgpd: fix "show ip bgp" column alignment
The "Weight" column is off:

BGP table version is 0, local router ID is 10.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, =
multipath,
              i internal, r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
*> 4.1.1.2/32       9.9.9.2                  0          32768 ?
*> 4.1.1.4/32       9.9.9.2                  0          32768 ?
Displayed  2 out of 2 total prefixes

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 65c7395b07e8c592c847d4a1e22fc89ddf448341)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-29 19:06:05 +01:00
Daniel Walton
487f230202 ospfd: "ip ospf bfd" removes the "ip ospf bfd 3 250 250" command
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>

Ticket: CM-13712
(cherry picked from commit 367b138748e894bbfaae36d1cf7c90eafebfebc9)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-29 19:05:51 +01:00
David Lamparter
4765f35eb0 build: improve COMMUNITY.md formatting
Add a render_md.py helper to convert it to HTML (needs python "markdown"
module installed).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-29 12:27:06 +01:00
David Lamparter
f6ee5b522c build: add markdown-ised version of new guidelines
This isn't quite done and renders rather badly on markdown_py.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-28 19:25:21 +01:00
David Lamparter
955026c8f0 build: ditch outdated documents, including HACKING
To be re-added with a clean slate.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-28 19:03:10 +01:00
David Lamparter
a9c60ec13b build: bump version to 2.0-rc0
This isn't quite a release candidate yet, but to get things going let's
set this to "2.0-rc0".

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-28 18:58:52 +01:00
David Lamparter
094add014e Merge branch 'cmaster-next-isisd-bpf' into cmaster-next-releng 2016-11-28 17:36:04 +01:00
David Lamparter
cdf7612649 Merge remote-tracking branch 'cmaster-next' into cmaster-next-releng 2016-11-28 17:35:08 +01:00
Renato Westphal
7fc0257282 zebra: add missing license headers to two files
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-11-28 17:34:54 +01:00
Renato Westphal
18653436b7 isisd: fix loss of packets after circuit is brought up
The last parameter of THREAD_TIMER_ON() is the timeout, and we were
using circuit->fd for that. So, when a circuit was brought up, isisd
would miss all received packets on this circuit for quite a few seconds,
slowing down the convergence process.

To fix this, use the same logic we use in isis_receive() to calculate
this timeout.

This bug doesn't happen on Linux, which uses a different method to read
packets from the network.

Fixes the following ANVL tests on FreeBSD: ISIS-17.1, ISIS-18.6 (and
probably others too).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2016-11-24 19:56:59 -05:00
vivek
b4863129a3 lib: Fix nexthop strings to coincide with enum
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
2016-11-24 19:52:30 -05:00
Donald Sharp
7fe3cf138f Merge remote-tracking branch 'origin/cmaster' into cmaster-next
Conflicts:
	debian/changelog
	zebra/zebra_rnh.c
2016-11-19 12:31:41 -05:00
David Lamparter
6a49d0cc12 Merge remote-tracking branch 'cmaster-next' into cmaster-next-releng 2016-11-19 11:58:52 +01:00
Donald Sharp
03f99d9a4d vtysh, zebra: Fix link-params to use exit-link-params
Fix the link-params submode to use the 'exit-link-params'
to indicate we are exiting a submode.

Fixup all the relevant bits.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-11-18 15:42:41 -05:00
Donald Sharp
80922366a0 Merge remote-tracking branch 'opensourcerouting/cmaster-next-linkpar' into cmaster-next 2016-11-18 13:51:33 -05:00
Donald Sharp
50e24903ba *: Fix up licensing to be right
These files were submitted by Cumulus but did
not properly setup the licensing of them.
This fixes that issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-11-18 10:14:03 -05:00
Daniel Walton
e08ac8b7af bgpd: 'show ip bgp neighbor json' some keys are in the wrong place
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   Sam Tannous <stannous@cumulusnetworks.com>

Ticket: CM-13511
2016-11-16 15:33:35 +00:00
Daniel Walton
58433ae670 bgpd: 'show ip bgp neighbor json' some keys are in the wrong place
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>

Ticket: CM-13511

connectionsEstablished, etc are no longer under the addressFamilyInfo
keyword, they are now at the top level
2016-11-16 14:25:04 +00:00
David Lamparter
4fa80053a3 isisd: use BPF on Linux/PF_PACKET
we *really* don't want to receive every single packet (of any protocol
type) coming in on an IS-IS enabled interface.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 17:51:16 +09:00
David Lamparter
c5d9d3bb36 lib: replace strlcpy & strlcat with glibc versions
It seems these two were at some point copied in from rsync; replace with
more recent versions that will hopefully become available in glibc as
well.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 17:35:36 +09:00
David Lamparter
8ce70b1f5e build: remove LGPL v2.0, add LGPL v2.1
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 17:19:38 +09:00
David Lamparter
5ee1bde73d build: use ac_configure_args for CONFIG_ARGS
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 14:23:20 +09:00
David Lamparter
24f5e2fc62 build: massively remove needless checks
Since we have autoconf results from a wide swath of target platforms, we
can go remove checks that have the same result on all systems.

This also removes several "fallback" implementations of functions that,
at some point in the history, weren't available on all target platforms.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 14:23:17 +09:00
David Lamparter
a89b1641fd build: chop down complicated CFLAGS logic
Other packages don't have --with-cflags; we don't need it either.  The
user can specify CFLAGS= in the environment or on ./configure and that
would work perfectly fine.  If only it weren't for autoconf being an
idiot and adding its own "-g -O2" ... so we work around that.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 14:07:27 +09:00
Martin Winter
491871f72d bgpd/rfapi: Fix missing files in distribution ("make dist") package
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 14:07:27 +09:00
David Lamparter
fac5f48064 build: don't use deprecation warning on ICC
icc doesn't do the pragma warning push/pop thing to selectively disable
the warning.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 14:06:59 +09:00
David Lamparter
7961551a1c zebra: fix sign warning in SNMP code
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 14:06:13 +09:00
David Lamparter
45ef430000 build: fix -Wmaybe-uninitialized warnings
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 11:17:50 +09:00
David Lamparter
2e83e8e94c build: unconditionally try -rdynamic
-rdynamic is needed for useful backtraces and future plugin loading
support.  Try and enable it unconditionally.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 10:52:09 +09:00
David Lamparter
428cd73fdc build: fix some minor autoconf & automake breakage
- use AS_HELP_STRING in configure.ac
- don't define HAVE_SETNS twice
- remove unused AM_LDFLAGS
- AC_PROG_RANLIB is automatically called by LT_INIT

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-15 10:28:15 +09:00
Don Slice
71c35aae1d Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster 2016-11-14 08:37:47 -08:00
Don Slice
9274cde5dc zebra: remove recursively derived static routes correctly
Problem reported that in certain configs, when a router is initially
booted and the link is bounced, we can end up with a bogus static route
in the table.  This was due to the assumption in zebra_rnh that a static
route would not be recursively resolved through another static route with
a different next-hop. This fix changes this assumption.  Tested manually
and bgp-min, ospf-min, and vrf-min run with no new failures.

Ticket: CM-13328
Signed-off-by: Don Slice
Reviewed-by: CCR-5338
2016-11-14 07:06:46 -08:00
David Lamparter
095f8fae64 isisd: remove topology generator
Licensing is unclear and the tool is a testbed-only half-broken pile of
goo.  Remove.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-14 11:28:04 +09:00
David Lamparter
3c3877cd7d *: fix some licensing SNAFUs
bgpd/bgpd.c had a typo
zebra/zebra_mpls_netlink.c was derived from rt_netlink.c
isisd/include-netbsd/* are not needed (2 constants moved over)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-14 11:27:08 +09:00
David Lamparter
95c2af68ea zebra: fix link-params CLI handling
vtysh was breaking in a rather ugly way, and some "no" forms were
missing too.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-12 17:45:11 +09:00
Donald Sharp
8ceb45dc1c Cumulus: Fixup changelog and version string.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2016-11-11 19:31:05 -05:00
Donald Sharp
11ec76edb2 Merge remote-tracking branch 'opensourcerouting/cmaster-next-vty2' into cmaster-next
Conflicts:
	watchquagga/watchquagga.c
2016-11-10 08:08:23 -05:00
David Lamparter
9f1f8df328 vtysh: fix config write 2016-11-10 14:01:15 +01:00
Donald Sharp
82b4d5da4b Merge remote-tracking branch 'origin/cmaster' into cmaster-next 2016-11-10 07:57:51 -05:00
David Lamparter
e68ab6bb0f doc: vtysh doc updates 2016-11-10 10:48:12 +01:00
David Lamparter
9b7f18cf6b doc: generic updates 2016-11-10 10:15:30 +01:00
David Lamparter
c10c5926cb vtysh: improve config-write error reporting
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2016-11-10 10:15:30 +01:00