]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agobgpd: move bgp i/o to a separate source file
Quentin Young [Tue, 18 Apr 2017 18:11:43 +0000 (18:11 +0000)]
bgpd: move bgp i/o to a separate source file

After implement threading, bgp_packet.c was serving the double purpose
of consolidating packet parsing functionality and handling actual I/O
operations. This is somewhat messy and difficult to understand. I've
thus moved all code and data structures for handling threaded packet
writes to bgp_io.[ch].

Although bgp_io.[ch] only handles writes at the moment to keep the noise
on this commit series down, for organization purposes, it's probably
best to move bgp_read() and its trappings into here as well and
restructure that code so that read()'s happen in the pthread and packet
processing happens on the main thread.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: use new threading infra
Quentin Young [Sun, 16 Apr 2017 05:18:07 +0000 (05:18 +0000)]
bgpd: use new threading infra

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: use hash table for bgp_keepalives.c
Quentin Young [Wed, 12 Apr 2017 17:17:30 +0000 (17:17 +0000)]
bgpd: use hash table for bgp_keepalives.c

Large numbers of peers makes insertion and removal time for a linked
list non-negligible.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: correctly schedule select() at session startup
Quentin Young [Thu, 6 Apr 2017 23:45:57 +0000 (23:45 +0000)]
bgpd: correctly schedule select() at session startup

On TCP connection failure during session setup, bgp_stop() checks
whether peer->t_read is non-null to know whether or not to unschedule
select() on peer->fd before calling close() on it. Using the API exposed
by thread.c instead of bgpd's wrapper macro BGP_READ_ON() results in
this thread value never being set, which causes bgp_stop() to skip the
cancellation of select() before calling close(). Subsequent calls to
select() on that fd crash the daemon.

Use the macro instead.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: transfer packets from peer stub to actual peer
Quentin Young [Thu, 6 Apr 2017 01:09:33 +0000 (01:09 +0000)]
bgpd: transfer packets from peer stub to actual peer

During transition from OpenConfirm -> Established, we wipe the peer stub's
output buffer. Because thread.c prioritizes I/O operations over regular
background threads and events, in a single threaded environment this ordering
meant that the output buffer would be happily empty at wipe time.  In MT-land,
this convenient coincidence is no longer true; thus we need to make sure that
any packets remaining on the peer stub get transferred over to the peer proper.

Also removes misleading comment indicating that bgp_establish() sends a
keepalive packet. It does not.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: stop pseudo-blocking in bgp_write
Quentin Young [Fri, 31 Mar 2017 16:55:52 +0000 (16:55 +0000)]
bgpd: stop pseudo-blocking in bgp_write

If write() indicates that we should retry, just move along to the next
peer and come back later. No need to burn write() in a loop.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: dynamically allocate synchronization primitives
Quentin Young [Wed, 29 Mar 2017 19:16:28 +0000 (19:16 +0000)]
bgpd: dynamically allocate synchronization primitives

Changes all synchronization primitives to be dynamically allocated. This
should help catch any subtle errors in pthread lifecycles.

This change also pre-initializes synchronization primitives before
threads begin to run, eliminating a potential race condition that
probably would have caused a segfault on startup on a very fast box.

Also changes mutex and condition variable allocations to use
MTYPE_PTHREAD and updates tests to do the proper initializations.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: remove unused `struct thread` from peer
Quentin Young [Mon, 27 Mar 2017 19:47:23 +0000 (19:47 +0000)]
bgpd: remove unused `struct thread` from peer

* Remove t_write
* Remove t_keepalive

These have been replaced by pthreads and are no longer needed. Since
some code looks at these values to determine if the threads are
scheduled, also add a new bitfield to store the same information.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agolib, bgpd: implement pthread lifecycle management
Quentin Young [Wed, 8 Mar 2017 23:16:15 +0000 (23:16 +0000)]
lib, bgpd: implement pthread lifecycle management

Removes the WiP shim and implements proper thread lifecycle management.

* Declare necessary pthread_t's in bgp_master
* Define new MTYPE in lib/thread.c for pthreads
* Allocate and free BGP's pthreads appropriately
* Terminate and join threads appropriately

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: put BGP keepalives in a pthread
Quentin Young [Thu, 5 Jan 2017 23:13:16 +0000 (23:13 +0000)]
bgpd: put BGP keepalives in a pthread

This patch, in tandem with moving packet writes into a dedicated kernel
thread, fixes session flaps caused by long-running internal operations
starving the (old) userspace write thread.

BGP keepalives are now produced by a kernel thread and placed onto the
peer's output queue. These are then consumed by the write thread. Both
of these tasks are concurrent with the rest of bgpd, obviating the
session flaps described above.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: move bgp_connect_check() to bgp_fsm.c
Quentin Young [Fri, 24 Mar 2017 19:05:56 +0000 (19:05 +0000)]
bgpd: move bgp_connect_check() to bgp_fsm.c

Prior to this change, after initiating a nonblocking connection to the
remote peer bgpd would call both BGP_READ_ON and BGP_WRITE_ON on the
peer's socket. This resulted in a call to select(), so that when some
event (either a connection success or failure) occurred on the socket,
one of bgp_read() or bgp_write() would run. At the beginning of each of
those functions was a hook into bgp_connect_check(), which checked the
socket status and issued the correct connection event onto the BGP FSM.

This code is better suited for bgp_fsm.c. Placing it there avoids
scheduling packet reads or writes when we don't know if the socket has
established a connection yet, and the specific functionality is a better
fit for the responsibility scope of this unit.

This change also helps isolate the responsibilities of the
packet-writing kernel thread.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: move update group processing to main thread
Quentin Young [Wed, 22 Mar 2017 17:13:23 +0000 (17:13 +0000)]
bgpd: move update group processing to main thread

Prior to this change, packets generated for update groups were taken off
of the (independent) buffer for the update group, reformatted for the
specific peer under question and sent off inline with bgp_write(). Since
the operations of this code path can include the merging and pruning of
subgroups and are too large to safely synchronize, this change moves
that logic to execute after each tick of the write thread.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: move packet writes into dedicated pthread
Quentin Young [Mon, 6 Feb 2017 23:39:06 +0000 (23:39 +0000)]
bgpd: move packet writes into dedicated pthread

* BGP_WRITE_ON() removed
* BGP_WRITE_OFF() removed
* peer_writes_on() added
* peer_writes_off() added
* bgp_write_proceed_actions() removed

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1493 from donaldsharp/plist_stuff
Rafael Zalamena [Wed, 29 Nov 2017 16:03:56 +0000 (14:03 -0200)]
Merge pull request #1493 from donaldsharp/plist_stuff

lib: Fix prefix-list where le is == prefixlen

6 years agoMerge pull request #1476 from qlyoung/null0-hack
Russ White [Wed, 29 Nov 2017 12:49:04 +0000 (07:49 -0500)]
Merge pull request #1476 from qlyoung/null0-hack

zebra: add back support for nUlL0

6 years agoMerge pull request #1484 from chiragshah6/ospfv3_dev
Russ White [Wed, 29 Nov 2017 12:45:04 +0000 (07:45 -0500)]
Merge pull request #1484 from chiragshah6/ospfv3_dev

ospfd: Display NSSA in show running-config

6 years agoMerge pull request #1482 from chiragshah6/mdev1
Russ White [Wed, 29 Nov 2017 12:44:39 +0000 (07:44 -0500)]
Merge pull request #1482 from chiragshah6/mdev1

ospfd:  Running-config display ospf (non active) vrf config, OSPF Route json support

6 years agoMerge pull request #1477 from chiragshah6/ospf_vrf_dev
Russ White [Wed, 29 Nov 2017 12:39:35 +0000 (07:39 -0500)]
Merge pull request #1477 from chiragshah6/ospf_vrf_dev

ospfd: Forward reference ospf area config

6 years agoMerge pull request #1464 from chiragshah6/mdev
Russ White [Wed, 29 Nov 2017 12:37:58 +0000 (07:37 -0500)]
Merge pull request #1464 from chiragshah6/mdev

ospf6d: SPF consider all Router LSAs

6 years agolib: Fix prefix-list where le is == prefixlen
Donald Sharp [Wed, 29 Nov 2017 00:55:07 +0000 (19:55 -0500)]
lib: Fix prefix-list where le is == prefixlen

This should be allowed:

robot(config)# ip prefix-list outbound_asp_routes seq 33 permit 1.1.1.0/24 le 24
% Invalid prefix range for 1.1.1.0/24, make sure: len < ge-value <= le-value

This commit fixes the issue:

robot(config)# ip prefix-list outbound_asp_routes seq 33 permit 1.1.1.0/24 le 23
% Invalid prefix range for 1.1.1.0/24, make sure: len < ge-value <= le-value
robot(config)# ip prefix-list outbound_asp_routes seq 33 permit 1.1.1.0/24 le 24
robot(config)# ip prefix-list outbound_asp_routes seq 33 permit 1.1.1.0/24 le 25
robot(config)#

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1448 from qlyoung/fix-peer-group-name
Lou Berger [Tue, 28 Nov 2017 19:37:48 +0000 (03:37 +0800)]
Merge pull request #1448 from qlyoung/fix-peer-group-name

bgpd: fix `show bgp peer-group NAME`

6 years agoMerge pull request #1491 from qlyoung/vrf-cli-fix
Lou Berger [Tue, 28 Nov 2017 19:32:14 +0000 (03:32 +0800)]
Merge pull request #1491 from qlyoung/vrf-cli-fix

bgpd: fix some vrf related cli

6 years agozebra: add back support for nUlL0
Quentin Young [Wed, 22 Nov 2017 20:45:41 +0000 (15:45 -0500)]
zebra: add back support for nUlL0

Re-add support for typos when specifying a null route.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: fix some vrf related cli
Quentin Young [Tue, 28 Nov 2017 17:46:58 +0000 (12:46 -0500)]
bgpd: fix some vrf related cli

argv_find() searching for wrong thing

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1445 from donaldsharp/rpki_vtysh
Renato Westphal [Tue, 28 Nov 2017 16:44:39 +0000 (14:44 -0200)]
Merge pull request #1445 from donaldsharp/rpki_vtysh

vtysh: If RPKI is not compiled in don't let vtysh think it is.

6 years agoMerge pull request #1438 from donaldsharp/zapi_notify_install
Renato Westphal [Mon, 27 Nov 2017 22:31:20 +0000 (20:31 -0200)]
Merge pull request #1438 from donaldsharp/zapi_notify_install

Zapi notify install

6 years agoMerge pull request #1360 from donaldsharp/show_advertised_routes
Renato Westphal [Mon, 27 Nov 2017 22:14:15 +0000 (20:14 -0200)]
Merge pull request #1360 from donaldsharp/show_advertised_routes

Show advertised routes

6 years agozebra: Allow zebra_find_client to match on instance as well
Donald Sharp [Mon, 27 Nov 2017 14:25:32 +0000 (09:25 -0500)]
zebra: Allow zebra_find_client to match on instance as well

zebra_find_client needs to match on instance as well so
protocols like ospfd will work correctly for notification.

Modify the zebra_find_client code to accept the instance
number and to pass it in appropriately.

Signed-off-by: Doanld Sharp <sharpd@cumulusnetworks.com>
6 years agosharpd: Add Super Happy Advanced Routing Protocol
Donald Sharp [Fri, 10 Nov 2017 17:55:16 +0000 (12:55 -0500)]
sharpd: Add Super Happy Advanced Routing Protocol

Add a daemon that will allow us to test the zapi
as well as test route install/removal times from
the kernel.

The current commands are:

install route <starting ip address> nexthop <nexthop> (1-1000000)

This command starts installing at <starting ip address>/32
(1-100000) routes that it auto-increments by 1
Installation start time is noted in the log and finish
time is noted as well.

remove routes <starting ip address> (1-1000000)

This command removes routes at <starting ip address>/32
and removes (1-100000) routes created by the install route
command.

This code can be considered experimental and *is not*
something that should be run in a production environment.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Start conversion to use route install failure callback
Donald Sharp [Fri, 10 Nov 2017 01:46:11 +0000 (20:46 -0500)]
eigrpd: Start conversion to use route install failure callback

EIGRP must not advertise routes that have failed to install.
This commit turns on the notification for EIGRP.  We still
need to start handling this correctly.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Add notification for Route Install events
Donald Sharp [Thu, 9 Nov 2017 19:42:50 +0000 (14:42 -0500)]
zebra: Add notification for Route Install events

When we are installing into the kernel, not the
change points for notification to a higher level
protocol and make it happen

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years ago*: Make zapi route install Notifications optional
Donald Sharp [Thu, 9 Nov 2017 19:34:42 +0000 (14:34 -0500)]
*: Make zapi route install Notifications optional

Allow the higher level protocol to specify if it would
like to receive notifications about it's routes that
it has installed.

I've purposely made it part of zclient_new_notify because
we need to track the routes on a per daemon basis only.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agolib, zebra: Add ability to notify to Routing Protocols Success/Failure
Donald Sharp [Thu, 9 Nov 2017 18:55:46 +0000 (13:55 -0500)]
lib, zebra: Add ability to notify to Routing Protocols Success/Failure

Provide ZAPI code that can pass to an upper level protocol
what happened to it's route on install.

There are these notifications:
1) ZAPI_ROUTE_FAIL_INSTALL - The route attempted to be
   installed did not work.
2) ZAPI_ROUTE_BETTER_ADMIN_WON - A route that was installed
   has become un-installed due to another routing protocol
   installing a better admin distance
3) ZAPI_ROUTE_INSTALLED - The route specified has been installed

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Free up changes to attr that the speculative route-map applied
Donald Sharp [Wed, 25 Oct 2017 00:57:00 +0000 (20:57 -0400)]
bgpd: Free up changes to attr that the speculative route-map applied

So we have the ability to apply speculative route-maps to
neighbor display to see what the changes would look like
via some show commands.  When we do this we make a
shallow copy of the attr data structure and then pass
it around for applying the routemap.  After we've applied
this route-map and displayed it we really need to clean
up memory that the route-map application applied.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Store original route-map type for the peer
Donald Sharp [Wed, 25 Oct 2017 00:41:59 +0000 (20:41 -0400)]
bgpd: Store original route-map type for the peer

When we are applying an experimental route-map type
to a peer( as part of a show command ) save and
restore the peer's ->rmap_type.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: When we don't have a route-map to apply don't apply the original
Donald Sharp [Wed, 25 Oct 2017 00:23:06 +0000 (20:23 -0400)]
bgpd: When we don't have a route-map to apply don't apply the original

When we display the advertised-routes and we don't have a route-map
to apply do not re-apply the route-map.  This does two things:

1) Fixes a display issue with the show command.
2) More importantly stops leaking memory like a sieve for when
   you have a full bgp table.

Fixes: #1345
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Cleanup indentation a tiny bit
Donald Sharp [Wed, 25 Oct 2017 00:21:09 +0000 (20:21 -0400)]
bgpd: Cleanup indentation a tiny bit

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1481 from xdel/master
Donald Sharp [Mon, 27 Nov 2017 12:55:40 +0000 (07:55 -0500)]
Merge pull request #1481 from xdel/master

bgpd: fix RPKI-enabled build

6 years agoospfd: Display nssa in show running-config
Chirag Shah [Sun, 26 Nov 2017 06:12:46 +0000 (22:12 -0800)]
ospfd: Display nssa in show running-config

Display area x.x.x.x nssa configuration in
running-config. Using nssa translate candiate (default)
case to display 'area x nssa'.

Ticket:CM-18947
Reviewed By:
Testing Done:
Tried various combinations of nssa config,
verified show running-config ospfd output

router ospf
 area 2.2.2.2 nssa
  area 2.2.2.2 nssa no-summary

router ospf
 area 2.2.2.2 nssa translate-always
  area 2.2.2.2 nssa no-summary

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoospfd: show ip ospf route json support
Chirag Shah [Sun, 19 Nov 2017 06:26:50 +0000 (22:26 -0800)]
ospfd: show ip ospf route json support

Define JSON_C_TO_STRING_NOSLASHESCAPE used for
escaping forward slash.

Disply json output for
'show ip ospf route [vrf all] json'

Ticket:CM-18659
Reviewed By:
Testing Done:
Configure multiple non-default VRF, inject external routes
via redistribute to ospf area.
checked show ip ospf route vrf all /json based output.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoospfd: Running config to display VRF aware OSPF
Chirag Shah [Sun, 26 Nov 2017 01:26:00 +0000 (17:26 -0800)]
ospfd: Running config to display VRF aware OSPF

show running-config to display VRF aware ospf instances
even if VRF is not active. This will allow the user to
configured ospf instances configurations even if VRF is not
active. 'show ip ospf vrf all' does not display until VRF
is active.

Ticket:CM-18949
Reviewed By:
Testing Done:
Configure non-default vrf aware ospfs with prior vrf devices
configured.
All vrf aware 'router ospf' displayed in running-configuration.
Disable one of the vrf device still all vrf aware 'router ospf'
displayed in running-config, but 'show ip ospf vrf all' does
not display for which VRF is not active.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agobgpd: fix RPKI-enabled build
Andrey Korolyov [Sun, 26 Nov 2017 01:13:54 +0000 (04:13 +0300)]
bgpd: fix RPKI-enabled build

Signed-off-by: Andrey Korolyov <andrey@xdel.ru>
6 years agoMerge pull request #1473 from chiragshah6/ospfv3_dev
Renato Westphal [Thu, 23 Nov 2017 12:17:37 +0000 (10:17 -0200)]
Merge pull request #1473 from chiragshah6/ospfv3_dev

ospfd: Make external routes in ospf VRF aware

6 years agoMerge pull request #1463 from donaldsharp/v6_route_replace
Renato Westphal [Thu, 23 Nov 2017 12:13:50 +0000 (10:13 -0200)]
Merge pull request #1463 from donaldsharp/v6_route_replace

zebra: V6 does not have route replace semantics

6 years agoMerge pull request #1434 from dslicenc/zebra-nexthop-cm8192
Renato Westphal [Thu, 23 Nov 2017 12:13:18 +0000 (10:13 -0200)]
Merge pull request #1434 from dslicenc/zebra-nexthop-cm8192

zebra: fix resolving nexthop through itself

6 years agoospfd: Forward reference ospf area config
Chirag Shah [Wed, 22 Nov 2017 04:57:50 +0000 (20:57 -0800)]
ospfd: Forward reference ospf area config

Upon restart frr interface configuration applied
prior to 'router ospf' configuration. 'ip ospf area x'
config fails if ospf instance is not active.

Allow 'ip ospf area x' configuration to allow in absence
of ospf instance. Upon 'router ospf' walk through vrf
aware interfaces, active area cofigurations.
When vrf is enabled, router-id update also walk through
vrf aware interfaces to enable area configuration
via network_run_interface.

Ticket: CM-18927
Reviewed By:
Testing Done:
Configured multiple interfaces with 'ip ospf area x'
with multiple areas/interface combinations.
Upon router ospf enable along with vrf is active,
interfaces comes up in respective area, ospf neighborship
comes up fine.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agozebra: slight mods to commit for nexthop resolution with /32 nexthop
Don Slice [Wed, 22 Nov 2017 16:25:44 +0000 (16:25 +0000)]
zebra: slight mods to commit for nexthop resolution with /32 nexthop

Contains minor changes in response to code review comments.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
6 years agoMerge pull request #1474 from qlyoung/foreach_afi_safi
Renato Westphal [Wed, 22 Nov 2017 15:54:30 +0000 (13:54 -0200)]
Merge pull request #1474 from qlyoung/foreach_afi_safi

bgpd: use FOREACH_AFI_SAFI where possible

6 years agoospfd: Make external routes in ospf VRF aware
Chirag Shah [Tue, 21 Nov 2017 01:21:03 +0000 (17:21 -0800)]
ospfd: Make external routes in ospf VRF aware

Currently, ospf external routers are part of struct
ospf_master which is not vrf aware ospf instance.
All ospf external routes are injected/leaked into all
vrfs.

Moved ospf external routes db to struct ospf to make
vrf aware, such one external routes learnt in one vrf
is not leaked into another vrf.

Ticket:CM-18855
Testing Done:
Inject external route in non-default vrf x, validated
ospf database across the vrf x, validated ospf routes
for vrf x.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agobgpd: use FOREACH_AFI_SAFI where possible
Quentin Young [Tue, 21 Nov 2017 18:02:06 +0000 (13:02 -0500)]
bgpd: use FOREACH_AFI_SAFI where possible

Improves consistency and readability.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1430 from chiragshah6/ospf_vrf_dev
Olivier Dugeon [Tue, 21 Nov 2017 17:08:54 +0000 (18:08 +0100)]
Merge pull request #1430 from chiragshah6/ospf_vrf_dev

ospfd: flush self-originated LSAs upon Router-ID change/Restart frr

6 years agoMerge pull request #1452 from donaldsharp/rip_nexthops
Renato Westphal [Tue, 21 Nov 2017 16:05:19 +0000 (14:05 -0200)]
Merge pull request #1452 from donaldsharp/rip_nexthops

Blackhole Fixups for bgp and rip

6 years agoMerge pull request #1413 from donaldsharp/bgp_packet_test
Rafael Zalamena [Tue, 21 Nov 2017 14:53:31 +0000 (12:53 -0200)]
Merge pull request #1413 from donaldsharp/bgp_packet_test

tests: Add code to allow us to test packet handling in bgp easier

6 years agoMerge pull request #1470 from donaldsharp/zebra_multicast
Renato Westphal [Tue, 21 Nov 2017 14:50:46 +0000 (12:50 -0200)]
Merge pull request #1470 from donaldsharp/zebra_multicast

Zebra multicast

6 years agoMerge pull request #1462 from donaldsharp/as_path_stuff
Lou Berger [Tue, 21 Nov 2017 12:41:39 +0000 (20:41 +0800)]
Merge pull request #1462 from donaldsharp/as_path_stuff

Json Stuff

6 years agoMerge pull request #1387 from donaldsharp/save_zserv_incoming
Renato Westphal [Tue, 21 Nov 2017 11:06:06 +0000 (09:06 -0200)]
Merge pull request #1387 from donaldsharp/save_zserv_incoming

configure, zebra: Add some debug code to allow for fuzzing

6 years agoMerge pull request #1375 from donaldsharp/make_dist
Martin Winter [Tue, 21 Nov 2017 02:14:14 +0000 (18:14 -0800)]
Merge pull request #1375 from donaldsharp/make_dist

ldpd, zebra: Allow clippy files to be included in dist

6 years agozebra: When uninstalling a non-unicast route mark it so
Donald Sharp [Mon, 20 Nov 2017 00:44:01 +0000 (19:44 -0500)]
zebra: When uninstalling a non-unicast route mark it so

The rib_uninstall_kernel for non-UNICAST routes when
it is marking a route as no-longer installed should
actually mark it as uninstalled.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Fix 'show ip rpf' to actually work
Donald Sharp [Mon, 20 Nov 2017 00:38:55 +0000 (19:38 -0500)]
zebra: Fix 'show ip rpf' to actually work

Rework of do_show_ip_route caused the 'show ip rpf'
cli to stop working.  This put's it back into working
order.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1466 from opensourcerouting/debpkg-master
Donald Sharp [Sat, 18 Nov 2017 18:49:45 +0000 (13:49 -0500)]
Merge pull request #1466 from opensourcerouting/debpkg-master

Debian Package to Backport Change

6 years agodebianpkg: Update lintian-overrides
Martin Winter [Fri, 27 Oct 2017 08:11:28 +0000 (01:11 -0700)]
debianpkg: Update lintian-overrides

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebpkg: Files from cumulus dir are moved to tools
Martin Winter [Fri, 27 Oct 2017 02:21:45 +0000 (19:21 -0700)]
debpkg: Files from cumulus dir are moved to tools

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoMakefile.am: Fix Merge error - missing char
Martin Winter [Thu, 19 Oct 2017 02:01:17 +0000 (19:01 -0700)]
Makefile.am: Fix Merge error - missing char

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodoc: Adding Doc for building on Debian 9
Martin Winter [Wed, 18 Oct 2017 22:15:55 +0000 (15:15 -0700)]
doc: Adding Doc for building on Debian 9

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Add debian9 backport to distribution tar
Martin Winter [Mon, 16 Oct 2017 11:01:48 +0000 (04:01 -0700)]
debianpkg: Add debian9 backport to distribution tar

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Add Debian 9 Package support
Martin Winter [Mon, 16 Oct 2017 10:31:47 +0000 (03:31 -0700)]
debianpkg: Add Debian 9 Package support

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
Conflicts:
debianpkg/changelog.in

6 years agodebianpkg: Fix non-empty-dependency_libs-in-la-file for frr modules
Martin Winter [Tue, 10 Oct 2017 06:14:27 +0000 (23:14 -0700)]
debianpkg: Fix non-empty-dependency_libs-in-la-file for frr modules

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebian-pkg: Remove hardening-wrapper and replace with dpkg-buildflags
Martin Winter [Tue, 10 Oct 2017 01:17:09 +0000 (18:17 -0700)]
debian-pkg: Remove hardening-wrapper and replace with dpkg-buildflags

* hardening-wrapper is obsolete
* Fixes Issue #967

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Always build FPM module
Martin Winter [Mon, 9 Oct 2017 09:33:11 +0000 (02:33 -0700)]
debianpkg: Always build FPM module

- FPM is a module since 3.0. Always build it and allow user choice to enable or disable it

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Remove -werror from Ubuntu 14.04 and 12.04 build to skip warnings from...
Martin Winter [Fri, 29 Sep 2017 02:59:35 +0000 (19:59 -0700)]
debianpkg: Remove -werror from Ubuntu 14.04 and 12.04 build to skip warnings from flex generated code

- Flex is too old on these releases and misses some prototypes in the generated code. Removing the
werror allows to build the package anyway

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Add missing XSBC-Original-Maintainer field (fixes merge error)
Martin Winter [Fri, 29 Sep 2017 01:09:44 +0000 (18:09 -0700)]
debianpkg: Add missing XSBC-Original-Maintainer field (fixes merge error)

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Fix some old references to freerangerouting instead of frrouting
Martin Winter [Fri, 29 Sep 2017 00:08:31 +0000 (17:08 -0700)]
debianpkg: Fix some old references to freerangerouting instead of frrouting

6 years agofrr.lintian-overrides: update for current list of built libs
smccroskey [Tue, 8 Aug 2017 21:51:38 +0000 (14:51 -0700)]
frr.lintian-overrides: update for current list of built libs

Because the lintian warning no longer matched exactly due to removal
of unused protobuf libraries from the build, the warning wasn't
masked.  Update it to match the current warning string.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
6 years agoubuntu trusty/precise: remove leftover debconf call
smccroskey [Tue, 8 Aug 2017 19:22:29 +0000 (12:22 -0700)]
ubuntu trusty/precise: remove leftover debconf call

Forgot to unstash this when attempting to rebase it into
1e6df754913b4218ec809742fe0fff4eb8461035.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
6 years agodebianpkg/Makefile.am: remove frr.config
smccroskey [Tue, 8 Aug 2017 18:36:10 +0000 (11:36 -0700)]
debianpkg/Makefile.am: remove frr.config

File was removed by 1e6df754913b4218ec809742fe0fff4eb8461035
but missed removing it from the Makefile.am.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
6 years agodebianpkg/Makefile.am: remove po/ directory
smccroskey [Tue, 8 Aug 2017 18:24:05 +0000 (11:24 -0700)]
debianpkg/Makefile.am: remove po/ directory

Directory was removed by 1e6df754913b4218ec809742fe0fff4eb8461035 but
missed removing it from the Makefile.am.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
6 years agofrr.service: remove explicit dependency on socket-based syslog.target
smccroskey [Sat, 29 Jul 2017 00:29:36 +0000 (17:29 -0700)]
frr.service: remove explicit dependency on socket-based syslog.target

Testing done: built and installed for all ubuntu targets

Socket-based services such as syslog need not be specified as
dependencies in service files, and doing so may slow down boot by
reducing parallelism.  All known supported systemd-based platforms
have syslog as a socket-based service.

Clears the following lintian warnings:
W: frr: systemd-service-file-refers-to-obsolete-target lib/systemd/system/frr.service syslog.target

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
6 years agoubuntu12.04: shorten frr-dbg description
smccroskey [Sat, 29 Jul 2017 00:22:20 +0000 (17:22 -0700)]
ubuntu12.04: shorten frr-dbg description

Testing done: built and installed on all ubuntu

Fix was applied elsewhere but didn't make it into this file.

Clears the following lintian warning:
W: frr-dbg: description too long

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
6 years agodeb-based-distros: clean up leftover debconf references
smccroskey [Thu, 27 Jul 2017 01:45:52 +0000 (18:45 -0700)]
deb-based-distros: clean up leftover debconf references

Testing done: built and installed on all ubuntu

Debconf was in use by this packaging a long time ago, and references to it
were never fully cleaned up when the one question it asked was deleted.

Clears the following lintian warning:
W: frr: no-debconf-templates

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
6 years agobackports: don't install frr-reload.py in frr package
smccroskey [Thu, 20 Jul 2017 18:58:43 +0000 (11:58 -0700)]
backports: don't install frr-reload.py in frr package

Testing done: built in sbuild with lintian enabled
              verified frr-reload.py still in frr-pythontools

Clean up issues missed when moving the script into a separate package.

Clears the following lintian warning:
E: frr: python-script-but-no-python-dep usr/lib/frr/frr-reload.py

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
6 years agodebian: install PNG files in /usr/share/info
smccroskey [Mon, 29 May 2017 22:34:02 +0000 (15:34 -0700)]
debian: install PNG files in /usr/share/info

Testing done: built in sbuild with lintian enabled

Clears lintian warnings of the following form:
W: frr-doc: info-document-missing-image-file

According to the documentation for the lintian warning, certain
applications (e.g.  emacs) can render images from info files inline,
and expect the images to either have their full path defined or be
installed in the same directory as the info files themselves.
Automake doesn't seem to have a primary for handling this sort of
installation (info_DATA is invalid and causes an error), so opted to
handle it in the debian install file itself.

Installing the images elsewhere (another path installed by frr-doc)
and giving a full path to their location in info files might be a
better approach.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
6 years agodebianpkg: Overriding lintian package-name-doesnt-match-sonames warning
Martin Winter [Sat, 8 Jul 2017 01:37:58 +0000 (18:37 -0700)]
debianpkg: Overriding lintian package-name-doesnt-match-sonames warning

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Fix 'make backports' warning about autopkgtest
Silas McCroskey [Fri, 7 Jul 2017 22:16:20 +0000 (15:16 -0700)]
debianpkg: Fix 'make backports' warning about autopkgtest

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Move frr-reload.py to frr-pythontools subpackage
Martin Winter [Fri, 16 Jun 2017 22:49:27 +0000 (15:49 -0700)]
debianpkg: Move frr-reload.py to frr-pythontools subpackage

- avoids python dependency on main frr package

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Register/remove init script on init.d based systems
Martin Winter [Fri, 16 Jun 2017 00:30:08 +0000 (17:30 -0700)]
debianpkg: Register/remove init script on init.d based systems

- Ubuntu 12.04 and Ubuntu 14.04 need init script registered during
  install and removed at uninstall

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Fix description (make shorter - max 80 chars)
Martin Winter [Thu, 15 Jun 2017 21:23:09 +0000 (14:23 -0700)]
debianpkg: Fix description (make shorter - max 80 chars)

- Fixes lintian error 'description-too-long'

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Support --with-pkg-extra-version and other modifier to build custom packag...
Martin Winter [Wed, 14 Jun 2017 01:06:14 +0000 (18:06 -0700)]
debianpkg: Support --with-pkg-extra-version and other modifier to build custom package version

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Cleanup configure options
Martin Winter [Tue, 13 Jun 2017 02:32:02 +0000 (19:32 -0700)]
debianpkg: Cleanup configure options

- Make them configurable (with WANT_xxx env variables)
- Adjust defaults to generic package
- remove obsolete configure options

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Do not start package after installation
Martin Winter [Mon, 12 Jun 2017 23:14:03 +0000 (16:14 -0700)]
debianpkg: Do not start package after installation

- Remove auto-start from Ubuntu 12.04 Backport
- Update Doc to explain on how to enable startup

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agotools: Rename to FRRouting in frr.service file
Martin Winter [Sat, 10 Jun 2017 09:20:29 +0000 (02:20 -0700)]
tools: Rename to FRRouting in frr.service file

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg/Ubuntu12.04-backport: Remove accidental reference to frr_sudoers
Martin Winter [Sat, 10 Jun 2017 03:41:09 +0000 (20:41 -0700)]
debianpkg/Ubuntu12.04-backport: Remove accidental reference to frr_sudoers

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Update control to fix maintainer email
Martin Winter [Fri, 9 Jun 2017 22:57:32 +0000 (15:57 -0700)]
debianpkg: Update control to fix maintainer email

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Fix Date format in changelog and version numbering to make sure custom...
Martin Winter [Fri, 9 Jun 2017 22:30:21 +0000 (15:30 -0700)]
debianpkg: Fix Date format in changelog and version numbering to make sure custom build is newer

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Add backport for Debian 8
Martin Winter [Fri, 9 Jun 2017 08:58:31 +0000 (01:58 -0700)]
debianpkg: Add backport for Debian 8

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: debian rules file needs to be executable
Martin Winter [Fri, 9 Jun 2017 06:30:09 +0000 (23:30 -0700)]
debianpkg: debian rules file needs to be executable

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Update Build-Depends to use libjson-c-dev / libjson-c2 instead of libjson0...
Martin Winter [Fri, 9 Jun 2017 06:12:02 +0000 (23:12 -0700)]
debianpkg: Update Build-Depends to use libjson-c-dev / libjson-c2 instead of libjson0 on newer debian systems

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebianpkg: Add initial README to document the steps required to build the debian...
Martin Winter [Fri, 9 Jun 2017 03:34:22 +0000 (20:34 -0700)]
debianpkg: Add initial README to document the steps required to build the debian packages with backports

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebian->debianpkg: Move debian files from debian dir to debianpkg dir.
Martin Winter [Fri, 9 Jun 2017 02:14:41 +0000 (19:14 -0700)]
debian->debianpkg: Move debian files from debian dir to debianpkg dir.

Debian build systems use debian subdir for building and having a debian
dir in the source package causes issues.
Moving it to debianpkg avoids the issue and allows us to ship debian
package files in the source distribution

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agobackports: minimize diffs with base debian files
smccroskey [Fri, 28 Apr 2017 07:00:53 +0000 (00:00 -0700)]
backports: minimize diffs with base debian files

minimize diffs between the base debian files and each backport to the
changes that actually matter, so that they aren't lost in the noise of
capitalization and ordering differences.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
6 years agodebian: clean up, update base debian/control
smccroskey [Fri, 28 Apr 2017 06:58:13 +0000 (23:58 -0700)]
debian: clean up, update base debian/control

this removes some cruft -- old/outdated/incorrect information,
trailing whitespace, etc., and updates the descriptions.  Some small
changes were made where appropriate to minimize the diff between the
base control file and those of the various backports.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>