]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
8 years agodoc: minor tweaks in the build instructions 297/head
Renato Westphal [Tue, 28 Mar 2017 00:39:27 +0000 (21:39 -0300)]
doc: minor tweaks in the build instructions

* ldpd is built by default in all platforms, it's not necessary to
  provide --enable-ldpd anymore;
* Remove comment about ldpd not being tested on OpenBSD, it works very
  well on this platform;
* Provide instructions to enable MPLS forwarding in OpenBSD.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agozebra-mpls: replace legacy bzero by memset
Renato Westphal [Tue, 28 Mar 2017 00:17:37 +0000 (21:17 -0300)]
zebra-mpls: replace legacy bzero by memset

bzero() was deprecated in POSIX.1-2001 and removed in POSIX.1-2008 in
deference to memset().

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agozebra-mpls: add support for MPLSv6 in OpenBSD
Renato Westphal [Tue, 28 Mar 2017 00:13:29 +0000 (21:13 -0300)]
zebra-mpls: add support for MPLSv6 in OpenBSD

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: replace all occurrences of '\n' with VTY_NEWLINE
Renato Westphal [Mon, 27 Mar 2017 23:14:09 +0000 (20:14 -0300)]
ldpd: replace all occurrences of '\n' with VTY_NEWLINE

The format of the terse output of several ldpd's show commands was copied
from the OpenBSD's ldpctl(8) control program. In the process of doing
that I forgot to replace the occurrences of '\n' with VTY_NEWLINE.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: update pledge promise in lde
Renato Westphal [Mon, 27 Mar 2017 18:03:34 +0000 (15:03 -0300)]
ldpd: update pledge promise in lde

With the introduction of the label manager, now lde needs to pledge
"unix" as well in order to connect to zebra.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoMerge pull request #292 from donaldsharp/sgrpt_prune
David Lamparter [Sat, 25 Mar 2017 09:10:22 +0000 (10:10 +0100)]
Merge pull request #292 from donaldsharp/sgrpt_prune

Sgrpt prune

8 years agoMerge pull request #286 from opensourcerouting/ldpd-tshoot
Donald Sharp [Fri, 24 Mar 2017 11:17:06 +0000 (07:17 -0400)]
Merge pull request #286 from opensourcerouting/ldpd-tshoot

Ldpd tshoot

8 years agopimd: del_oif and pim_channel_del_oif are the same function 292/head
Donald Sharp [Thu, 23 Mar 2017 11:47:41 +0000 (07:47 -0400)]
pimd: del_oif and pim_channel_del_oif are the same function

These two functions do the exact same thing.  Refactor

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Update inherited_olist when receiving a prune
Donald Sharp [Wed, 22 Mar 2017 14:11:04 +0000 (10:11 -0400)]
pimd: Update inherited_olist when receiving a prune

We were not always updating the inherited_olist
when we received a prune.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix inherited_olist decision for *,G
Donald Sharp [Wed, 22 Mar 2017 14:09:00 +0000 (10:09 -0400)]
pimd: Fix inherited_olist decision for *,G

When we had a *,G join but a Prune S,G,rpt we
were not taking that into account.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: When deleting last intf from an OIL don't delete the mroute
Donald Sharp [Wed, 22 Mar 2017 14:07:18 +0000 (10:07 -0400)]
pimd: When deleting last intf from an OIL don't delete the mroute

In certain conditions when we are deleting the interface
from an OIL do not delete the mroute.  That decision
should be made by the state machine.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Start sending (S,G,rpt) Prune messages
Donald Sharp [Tue, 7 Mar 2017 02:08:12 +0000 (21:08 -0500)]
pimd: Start sending (S,G,rpt) Prune messages

Start sending the (S,G,rpt) Prune messages again.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Add ability to upstream to know when to send S,G,rpt Prune
Donald Sharp [Tue, 7 Mar 2017 02:05:46 +0000 (21:05 -0500)]
pimd: Add ability to upstream to know when to send S,G,rpt Prune

Add flag to 'struct pim_upstream' to allow tracking of when
to send (S,G,rpt) Prune message.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Ensure that *,G is first entry in srcs list
Donald Sharp [Tue, 7 Mar 2017 01:44:25 +0000 (20:44 -0500)]
pimd: Ensure that *,G is first entry in srcs list

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Optimize group size figuring out.
Donald Sharp [Fri, 17 Mar 2017 12:07:19 +0000 (08:07 -0400)]
pimd: Optimize group size figuring out.

We were figuring out the group size 2 times.  Figure it out
1 time and then pass it around.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge pull request #290 from bingen/fix_unused_func
Donald Sharp [Thu, 23 Mar 2017 16:37:02 +0000 (12:37 -0400)]
Merge pull request #290 from bingen/fix_unused_func

ldpd: Remove lde_release_label_chunk to avoid warnings

8 years agoldpd: Remove lde_release_label_chunk to avoid warnings 290/head
ßingen [Thu, 23 Mar 2017 16:35:48 +0000 (17:35 +0100)]
ldpd: Remove lde_release_label_chunk to avoid warnings

8 years agoMerge pull request #288 from bingen/fix_coverity_defects
Donald Sharp [Thu, 23 Mar 2017 13:39:15 +0000 (09:39 -0400)]
Merge pull request #288 from bingen/fix_coverity_defects

lm: Fix some errors detected by Coverity Scan

8 years agolm: Fix some errors detected by Coverity Scan 288/head
ßingen [Wed, 22 Mar 2017 10:34:10 +0000 (11:34 +0100)]
lm: Fix some errors detected by Coverity Scan

8 years agoMerge pull request #287 from donaldsharp/int_fix
Renato Westphal [Tue, 21 Mar 2017 17:59:52 +0000 (14:59 -0300)]
Merge pull request #287 from donaldsharp/int_fix

pimd: Fix interface api

8 years agopimd: Fix interface api 287/head
Donald Sharp [Tue, 21 Mar 2017 16:54:55 +0000 (12:54 -0400)]
pimd: Fix interface api

The interface api has change and the pim changes used
the old api.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge pull request #285 from bingen/label_manager_3
Donald Sharp [Tue, 21 Mar 2017 15:40:20 +0000 (11:40 -0400)]
Merge pull request #285 from bingen/label_manager_3

Implement generic label manager

8 years agoMerge pull request #280 from donaldsharp/more_pim
Jafar Al-Gharaibeh [Tue, 21 Mar 2017 15:34:40 +0000 (10:34 -0500)]
Merge pull request #280 from donaldsharp/more_pim

More pim

8 years agoMerge pull request #278 from donaldsharp/interfaces2
Renato Westphal [Tue, 21 Mar 2017 15:33:00 +0000 (12:33 -0300)]
Merge pull request #278 from donaldsharp/interfaces2

Interfaces2

8 years agoldpd: Fix compilation errors n Ubuntu CI 285/head
ßingen [Tue, 21 Mar 2017 11:44:10 +0000 (12:44 +0100)]
ldpd: Fix compilation errors n Ubuntu CI

Signed-off-by: ßingen <bingen@voltanet.io>
8 years agoldpd: Catch signal on reconnect
ßingen [Tue, 21 Mar 2017 11:06:58 +0000 (12:06 +0100)]
ldpd: Catch signal on reconnect

To be able to interrupt LDE when it's trying to reconnect to label
manager.

Signed-off-by: ßingen <bingen@voltanet.io>
8 years agoldpd: Fix bug in get label func
ßingen [Tue, 21 Mar 2017 08:11:15 +0000 (09:11 +0100)]
ldpd: Fix bug in get label func

Signed-off-by: ßingen <bingen@voltanet.io>
8 years agoldpd: provide more detailed information in some show commands 286/head
Renato Westphal [Sun, 19 Mar 2017 00:58:51 +0000 (21:58 -0300)]
ldpd: provide more detailed information in some show commands

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: change the sorting algorithm of adjacencies
Renato Westphal [Sat, 18 Mar 2017 20:05:35 +0000 (17:05 -0300)]
ldpd: change the sorting algorithm of adjacencies

Now the "show mpls ldp discovery" command will display all LDP
adjancencies sorted by address family, neighbor ID and then type (link
or targeted).

Example:
vtysh# show mpls ldp discovery
AF   ID              Type     Source           Holdtime
ipv4 3.3.3.3         Link     rt2-eth1               15
ipv4 3.3.3.3         Link     rt2-eth2               15
ipv4 4.4.4.4         Link     rt2-eth1               15
ipv6 1.1.1.1         Link     rt2-eth0               15
ipv6 3.3.3.3         Link     rt2-eth1               15
ipv6 3.3.3.3         Link     rt2-eth2               15
ipv6 4.4.4.4         Link     rt2-eth1               15

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: add commands to show sent/rcvd capabilities
Renato Westphal [Fri, 17 Mar 2017 23:55:42 +0000 (20:55 -0300)]
ldpd: add commands to show sent/rcvd capabilities

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: provide both a brief and a detailed version of some show commands
Renato Westphal [Fri, 17 Mar 2017 01:11:15 +0000 (22:11 -0300)]
ldpd: provide both a brief and a detailed version of some show commands

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoImplement generic label manager
ßingen [Mon, 20 Mar 2017 14:34:49 +0000 (15:34 +0100)]
Implement generic label manager

Label Manager allows to share MPLS label space among different
daemons. Each daemon can request a chunk of consecutive labels and
release it if it doesn't need them anymore. Label Manager stores the
daemon protocol and instance to identify the owner client. It uses them
to perform garbage collection, releasing all label chunks from a client
when it gets disconnected or reconnected.

Additionally, every client can request that the chunk is never garbage
collected. In that case client has the responsibility to release
non-used labels.

Zebra can host the label manager itself (if no -l param is provided) or
connect to an external one using zserv/zclient (providing its address
with -l param).

Client code is in lib/zclient.c, but currently only LDP is using it.

TODO: Allow for custom ranges requests, i.e., specify the start label
besides the chunk.
TODO: Release labels from LDP.

Signed-off-by: Bingen Eguzkitza <bingen@voltanet.io>
8 years agoMerge pull request #282 from opensourcerouting/ldpd-lspcheck
Donald Sharp [Mon, 20 Mar 2017 12:08:38 +0000 (08:08 -0400)]
Merge pull request #282 from opensourcerouting/ldpd-lspcheck

ldpd: remove pseudowire LSP check

8 years agoldpd: remove pseudowire LSP check 282/head
Renato Westphal [Fri, 17 Mar 2017 18:41:04 +0000 (15:41 -0300)]
ldpd: remove pseudowire LSP check

In order to bring a pseudowire up, we must make sure that there's at
least one LSP available to its remote end (otherwise the labeled frames
from the CEs wouldn't reach their destination). We were doing this
check in ldpd, but doing so is very limiting because it doesn't consider
other types of LSPs that might be available (static LSPs, RSVP-TE, SR,
etc). Thus remove this check from the l2vpn_pw_ok() function. Later
on we'll implement a pseudowire manager in zebra which will solve this
problem in a much better way (including notifying ldpd about failures
to install a pseudowire in the kernel/hardware).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agopimd: Add display of SGRpt state for ifchannel 280/head
Donald Sharp [Fri, 17 Mar 2017 17:46:47 +0000 (13:46 -0400)]
pimd: Add display of SGRpt state for ifchannel

When we get a SGrpt Prune embedded in the *,G Join,
Display the created ifchannel as being SGRpt state.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix connected data structure not being freed
Donald Sharp [Fri, 17 Mar 2017 00:07:08 +0000 (20:07 -0400)]
pimd: Fix connected data structure not being freed

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix uninitialized access of req
Donald Sharp [Fri, 17 Mar 2017 00:06:31 +0000 (20:06 -0400)]
pimd: Fix uninitialized access of req

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Cleanup pim_register_recv upstream create
Donald Sharp [Thu, 16 Mar 2017 20:43:01 +0000 (16:43 -0400)]
pimd: Cleanup pim_register_recv upstream create

When we get a register packet from a FHR, we
were doing allot of work twice.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Cleanup ref counting
Donald Sharp [Thu, 16 Mar 2017 19:56:54 +0000 (15:56 -0400)]
pimd: Cleanup ref counting

pim_jp_agg list should not ref count pim_upstream as that
the deletion of pim_upstream deletion should remove
the pim_upstream from the j/p agg list.

Cleanup a memory leag of jag

Make comparison of js cleaner in add_group

Move THREAD_OFF to before the neighbor find.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Remove dead code
Donald Sharp [Thu, 16 Mar 2017 19:52:36 +0000 (15:52 -0400)]
pimd: Remove dead code

This code is impossible to reach.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Remove unused value
Donald Sharp [Thu, 16 Mar 2017 18:19:17 +0000 (14:19 -0400)]
pimd: Remove unused value

Dead code, remove.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Remove unneeded debug statement
Donald Sharp [Thu, 16 Mar 2017 18:14:00 +0000 (14:14 -0400)]
pimd: Remove unneeded debug statement

Left over debug statement that is not needed anymore

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Add code to catch J/P Agg list issues
Donald Sharp [Thu, 16 Mar 2017 16:56:59 +0000 (12:56 -0400)]
pimd: Add code to catch J/P Agg list issues

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: When the RPF is changed remove the group
Donald Sharp [Thu, 16 Mar 2017 12:38:03 +0000 (08:38 -0400)]
pimd: When the RPF is changed remove the group

When changing the RPF cleanup the old entry
in the J/P Agg neighbor list.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Consider interface change a RPF_CHANGED event
Donald Sharp [Thu, 16 Mar 2017 15:15:32 +0000 (11:15 -0400)]
pimd: Consider interface change a RPF_CHANGED event

Suppose you have a unnumbered ecmp connections between
two switches:

st1-l3# show ip pim neighbor
Interface         Neighbor    Uptime  Holdtime  DR Pri
swp52             6.0.0.10  00:00:01  00:00:29       1
swp53             6.0.0.10  00:00:06  00:00:26       1

And for a given (S,G) the RPF goes:
st1-l3# show ip nht
99.1.1.1
 resolved via bgp
 fe80::4e76:25ff:fee7:42d1, via swp52
 fe80::4e76:25ff:fee7:42d5, via swp53
 Client list: pim(fd 14)

Now suppose, 52 is the choosen RPF( since we can only pick one )
and the interface goes down.  As such we will choose to use
swp53.

The problem was that the pim_rpf_update call is made
it will change the rpf interface to 53, but not tell
the calling function that the RPF_CHANGED because
it is only looking at the rpf_addr(the nexthop)
to see if it is changed and if we are in an unnumbered
dual ecmp to the same box it was not detecting and
notifying.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Cleanup JP Agg a bit more
Donald Sharp [Fri, 10 Mar 2017 20:01:11 +0000 (15:01 -0500)]
pimd: Cleanup JP Agg a bit more

The J/P Aggregation + the NHT tracking code was not
playing nicely together

1) Clean up pim_upstream ref counting to keep a bit better
track of it.

2) When we delete pim_upstream zero it out to hopefully
catch issues faster in the future

3) Clean up J/P Agg source list a bit better to keep order

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Remember to delete reference to upstream in failure
Donald Sharp [Tue, 14 Mar 2017 11:58:17 +0000 (07:58 -0400)]
pimd: Remember to delete reference to upstream in failure

When creating the pim upstream data structure, if we fail
to create remove the reference we saved to it on the side
in the pnc code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Carefully Reconstruct FHR state when interface bounces
Donald Sharp [Fri, 10 Mar 2017 15:26:00 +0000 (10:26 -0500)]
pimd: Carefully Reconstruct FHR state when interface bounces

When an interface bounces and we receive a packet before
pim has a chance to fully bring the 'struct pim_usptream'
back up correctly, first check to see if we already have
an associated data structure before creating it again.

This removes a case where both the c_oil and up ref counts
were being incremented and never removed properly.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Add additional output to 'show ip pim state json'
Donald Sharp [Fri, 10 Mar 2017 15:23:40 +0000 (10:23 -0500)]
pimd: Add additional output to 'show ip pim state json'

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Nexthop tracking support
Chirag Shah [Wed, 22 Feb 2017 15:28:36 +0000 (07:28 -0800)]
pimd: Nexthop tracking support

Add pim Nexthop tracking feature 1st part where, specific RP or Source address (unicast address)
register with Zebra. Once nexthop update received from Zebra for a given address, scan RP or upstream
entries impacted by the change in nexthop.

Reviewed By: CCR-5761, Donald Sharp <sharpd@cumulusnetworks.com>
Testing Done: Tested with multiple RPs and multiple *,G entries at LHR.
Add new Nexthop or remove one of the link towards RP and verify RP and upstream nexthop update.
similar test done at RP with multiple S,G entries to reach source.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
8 years agobgpd, lib, zebra: Rename if_update_vrf -> if_update 278/head
Donald Sharp [Wed, 15 Mar 2017 14:55:42 +0000 (10:55 -0400)]
bgpd, lib, zebra: Rename if_update_vrf -> if_update

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoldpd: Move if_update to ldp_if_update
Donald Sharp [Wed, 15 Mar 2017 14:49:21 +0000 (10:49 -0400)]
ldpd: Move if_update to ldp_if_update

The if_update function should be owned
by lib/if.h.  Move the function out of the
way so we can rename lib/if.h if_update_vrf -> if_update

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Fix non-Null Terminated help string
Donald Sharp [Sun, 12 Mar 2017 00:06:09 +0000 (19:06 -0500)]
zebra: Fix non-Null Terminated help string

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Some nexthop display code needs to be VRF aware
Donald Sharp [Sat, 11 Mar 2017 12:56:55 +0000 (07:56 -0500)]
bgpd: Some nexthop display code needs to be VRF aware

When displaying nexthops we need to be able to handle
the correct VRF.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd, lib, zebra: Refactor ifname2ifindex to be VRF aware
Donald Sharp [Sat, 11 Mar 2017 12:52:59 +0000 (07:52 -0500)]
bgpd, lib, zebra: Refactor ifname2ifindex to be VRF aware

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years ago*: Refactor ifindex2ifname to be VRF aware
Donald Sharp [Sat, 11 Mar 2017 12:47:46 +0000 (07:47 -0500)]
*: Refactor ifindex2ifname to be VRF aware

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Refactor if_get_by_name_len to be VRF aware
Donald Sharp [Sat, 11 Mar 2017 12:34:21 +0000 (07:34 -0500)]
lib: Refactor if_get_by_name_len to be VRF aware

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years ago*: Refactor if_get_by_name to be VRF aware
Donald Sharp [Sat, 11 Mar 2017 12:30:52 +0000 (07:30 -0500)]
*: Refactor if_get_by_name to be VRF aware

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years ago*: Refactor if_lookup_by_name to be VRF aware
Donald Sharp [Sat, 11 Mar 2017 12:27:15 +0000 (07:27 -0500)]
*: Refactor if_lookup_by_name to be VRF aware

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib, ospf6d: Refactor if_lookup_prefix
Donald Sharp [Sat, 11 Mar 2017 12:13:49 +0000 (07:13 -0500)]
lib, ospf6d: Refactor if_lookup_prefix

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib, ospfd: Refactor if_lookup_by_name_len
Donald Sharp [Sat, 11 Mar 2017 12:09:21 +0000 (07:09 -0500)]
lib, ospfd: Refactor if_lookup_by_name_len

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib, ospfd, ripd: Convert if_lookup_address to be vrf aware
Donald Sharp [Fri, 10 Mar 2017 20:54:53 +0000 (15:54 -0500)]
lib, ospfd, ripd: Convert if_lookup_address to be vrf aware

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib, pimd, zebra: Convert if_lookup_exact_address to VRF only
Donald Sharp [Fri, 10 Mar 2017 20:51:36 +0000 (15:51 -0500)]
lib, pimd, zebra: Convert if_lookup_exact_address to VRF only

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib, ospfd, pimd: Convert to using VRF based interface creation
Donald Sharp [Fri, 10 Mar 2017 20:48:43 +0000 (15:48 -0500)]
lib, ospfd, pimd: Convert to using VRF based interface creation

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years ago*: Remove non-vrf based ifindex lookup
Donald Sharp [Fri, 10 Mar 2017 20:45:28 +0000 (15:45 -0500)]
*: Remove non-vrf based ifindex lookup

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge pull request #270 from donaldsharp/cares
David Lamparter [Fri, 10 Mar 2017 19:53:42 +0000 (20:53 +0100)]
Merge pull request #270 from donaldsharp/cares

debian: Allow building the .deb to know about new dependency

8 years agoMerge pull request #271 from AnuradhaKaruppiah/master
David Lamparter [Fri, 10 Mar 2017 19:53:30 +0000 (20:53 +0100)]
Merge pull request #271 from AnuradhaKaruppiah/master

pimd: Separate the register and upstream join states

8 years agopimd: display reg-state and join-state info in the pim_upstream output 271/head
anuradhak [Thu, 9 Mar 2017 19:42:55 +0000 (11:42 -0800)]
pimd: display reg-state and join-state info in the pim_upstream output

Changed the state field in the "sh ip pim upstream" output to include
register and join state info as a comma separated value. Register info
is supressed if reg-state=NoInfo.

Sample output:
=============
root@fhr:/home/cumulus# net show pim upstream
Iif       Source          Group           State       Uptime   JoinTimer
RSTimer   KATimer   RefCnt
swp1      33.1.1.1        239.1.1.2       J,RegP      00:00:18 --:--:--
00:00:44  00:03:24       2
root@fhr:/home/cumulus#

root@rp:/home/cumulus# net show pim upstream
Iif       Source          Group           State       Uptime   JoinTimer
RSTimer   KATimer   RefCnt
lo        *               239.1.1.2       J           00:02:08 00:00:52
--:--:--  --:--:--       1
swp1      33.1.1.1        239.1.1.2       J           00:00:16 00:00:11
--:--:--  00:03:26       1
root@rp:/home/cumulus#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-14700
Testing Done: pim-smoke

8 years agopimd: simplify pim upstream state transitions
anuradhak [Thu, 9 Mar 2017 18:47:50 +0000 (10:47 -0800)]
pimd: simplify pim upstream state transitions

This is another follow-up change to the reg-state and up-join-state
separation. The upstream join state machine can now respond to
JoinDesired macro changes independent of router role.

I have also dropped the PRUNE state from the upstream-join-state
enumeration. RFC4601 only defines JOINED and NOTJOINED states. And PRUNE
can really be replace by NOTJOINED.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-14700
Testing Done: Register state machine in FHR only, combined FHR-RP and
FHR-RP-LHR/all-in-one setups. Also ran pim-smoke.

8 years agopimd: add new/distinct enumeration for pim register state
anuradhak [Thu, 9 Mar 2017 17:52:59 +0000 (09:52 -0800)]
pimd: add new/distinct enumeration for pim register state

With the separation of register-state and upstream-join-state we no
longer need an enumeration that covers both states. This commit includes
the following -
1. Defined new enumeration for reg state (this 1:1 with RFC4601).
2. Dropped JOIN_PENDING enum value from upstream join state. RFC4601
only define two values NOT_JOINED and JOINED for this state.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-14700
Testing Done: Verified register setup manually and ran pim-smoke

8 years agopimd: Separate the register and upstream join states on the FHR
anuradhak [Wed, 8 Mar 2017 17:29:40 +0000 (09:29 -0800)]
pimd: Separate the register and upstream join states on the FHR

On the FHR upstream-join-state is not particularly relevant as we
don't need to send upstream JPs for the SG. So that field was being
overloaded with the register-state. However some of the events that
triggered changes to the JoinDesired macro were accidentally overwriting
the state with join info (instead of treating it as register info)
confusing the register state machine.

To make the PIM RFC macros' implemention simple I have separated out
the register-state. And upstream->state now solely describes the
upstream-join-state independent of the role of the PIM router.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-14700
Testing Done: verified pim-register state-machine with separate and
combined FHR/RP routers. Also ran pim-smoke.

8 years agodebian: Allow building the .deb to know about new dependency 270/head
Donald Sharp [Fri, 10 Mar 2017 18:02:09 +0000 (13:02 -0500)]
debian: Allow building the .deb to know about new dependency

libc-ares-dev and libc-ares2 are now dependencies to build nhrpd

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge pull request #269 from donaldsharp/libfrr
David Lamparter [Fri, 10 Mar 2017 13:29:58 +0000 (14:29 +0100)]
Merge pull request #269 from donaldsharp/libfrr

lib: Fix missed code

8 years agolib: Fix missed code 269/head
Donald Sharp [Thu, 9 Mar 2017 21:31:44 +0000 (16:31 -0500)]
lib: Fix missed code

When converting to new format we missed some code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge branch 'stable/2.0'
David Lamparter [Fri, 10 Mar 2017 13:20:40 +0000 (14:20 +0100)]
Merge branch 'stable/2.0'

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agomerge: pre-revert inapplicable changes
David Lamparter [Fri, 10 Mar 2017 13:16:37 +0000 (14:16 +0100)]
merge: pre-revert inapplicable changes

The following changes do not apply on master because the code has
changed:

- "vtysh: fix completion"
  reverts commit 09e61a383facd3c9e3e52162e98302c7cba15ecc.
- "Revert "lib: Fix tab completions memleak, memory stats corruption""
  reverts commit 4dcee34bd603645e53f8a8265dd263a85422b63d.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoMerge pull request #266 from donaldsharp/nht
David Lamparter [Fri, 10 Mar 2017 13:10:10 +0000 (14:10 +0100)]
Merge pull request #266 from donaldsharp/nht

bug fixes

8 years agozebra: Fix specific prefix handling 266/head
Donald Sharp [Fri, 10 Mar 2017 00:37:23 +0000 (19:37 -0500)]
zebra: Fix specific prefix handling

Suppose we are handling the process_workq and either a new static
route is installed or a Routing Protocol installs a new route.
We will call evaluate_rnh with a specific prefix.  We might
have a situation where we clear the NHC flag prematurely.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge pull request #267 from opensourcerouting/vty-completion-again
Donald Sharp [Thu, 9 Mar 2017 20:34:57 +0000 (15:34 -0500)]
Merge pull request #267 from opensourcerouting/vty-completion-again

vty completion memory counting redux

8 years agolib: handle case specifc types, protect against double free (issue #144) 267/head
Lou Berger [Wed, 8 Mar 2017 17:14:15 +0000 (12:14 -0500)]
lib: handle case specifc types, protect against double free (issue #144)

Signed-off-by: Lou Berger <lberger@labn.net>
[DL: dropped changes except the two NULL assignments]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoRevert "lib: Fix tab completions memleak, memory stats corruption"
David Lamparter [Thu, 9 Mar 2017 18:23:00 +0000 (19:23 +0100)]
Revert "lib: Fix tab completions memleak, memory stats corruption"

This reverts commit 039dc61292de5f3ed5f46316b1940ab6bb184c3f.

The patch actually made the situation worse since the return value from
cmd_complete_command_real() was now inconsistently allocated from
different memory stat pools.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoLowercase frr.conf
Martín Beauchamp [Mon, 27 Feb 2017 18:26:20 +0000 (13:26 -0500)]
Lowercase frr.conf

8 years agozebra: Notify all nexthops that we've changed
Donald Sharp [Tue, 7 Mar 2017 20:13:04 +0000 (15:13 -0500)]
zebra: Notify all nexthops that we've changed

Zebra when it was scanning the tree would unset NEXTHOPS_CHANGED
after the first notification.  If the route we are notifying because
of covers multiple interesting nexthops then we would be unable
to know that we need to notify for that one as well because of
the flag removal.

Ticket: CM-15157
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge pull request #263 from opensourcerouting/assorted-20170308
Donald Sharp [Thu, 9 Mar 2017 11:52:56 +0000 (06:52 -0500)]
Merge pull request #263 from opensourcerouting/assorted-20170308

assorted bits

8 years agopimd: fix clang warning 263/head
David Lamparter [Wed, 8 Mar 2017 15:37:42 +0000 (16:37 +0100)]
pimd: fix clang warning

pimd/pim_sock.c:178:13: error: implicit conversion from
'int' to 'char' changes value from 148 to -108
[-Werror,-Wconstant-conversion]
    ra[0] = 148;

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agowatchfrr: make min/max restart interval longopts
David Lamparter [Wed, 8 Mar 2017 15:22:43 +0000 (16:22 +0100)]
watchfrr: make min/max restart interval longopts

-m/-M seem to be seldomly used...
... and I kindof need/want -M for module loading.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years ago*: fix some user-visible Quagga remnants
David Lamparter [Wed, 8 Mar 2017 15:13:12 +0000 (16:13 +0100)]
*: fix some user-visible Quagga remnants

(Note: the allow_delete thing is called "zebra" on the commandline
because that's the clearest context there, while it is called "FRR" in
the CLI because that's considerably less confusing in a vtysh env.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoisisd: remove reload-by-reexec
David Lamparter [Wed, 8 Mar 2017 15:03:35 +0000 (16:03 +0100)]
isisd: remove reload-by-reexec

This is a quite horrible mechanism...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoospfd: remove unused usage() function
David Lamparter [Wed, 8 Mar 2017 15:00:45 +0000 (16:00 +0100)]
ospfd: remove unused usage() function

... forgot this one in the previous patchset.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoMerge pull request #262 from donaldsharp/pim_jp_fixes frr-3.0-branchpoint
Jafar Al-Gharaibeh [Wed, 8 Mar 2017 14:59:07 +0000 (08:59 -0600)]
Merge pull request #262 from donaldsharp/pim_jp_fixes

Pim jp fixes

8 years agopimd: Don't double include Source 262/head
Donald Sharp [Wed, 8 Mar 2017 12:50:55 +0000 (07:50 -0500)]
pimd: Don't double include Source

When we are adding to a J/P Agg list, don't
double add the source.

Ticket: CM-15189
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix various ifdown/ifup scenarios w/ J/P Agg
Donald Sharp [Mon, 6 Mar 2017 17:56:32 +0000 (12:56 -0500)]
pimd: Fix various ifdown/ifup scenarios w/ J/P Agg

There exists situations where we may have cleaned not
properly cleaned up the various J/P aggregation lists.
This commit fixes those issues.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge pull request #261 from opensourcerouting/lib_cleanup
Donald Sharp [Wed, 8 Mar 2017 12:38:21 +0000 (07:38 -0500)]
Merge pull request #261 from opensourcerouting/lib_cleanup

startup, option parsing & logging refactor

8 years ago*: fix some option descriptions and make -e work 261/head
David Lamparter [Wed, 8 Mar 2017 00:56:02 +0000 (01:56 +0100)]
*: fix some option descriptions and make -e work

There were some typos in command line help, also the "e:" spec was
missing for getopt in zebra/bgpd (even before the refactor).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: time: remove leftover declarations
David Lamparter [Fri, 10 Feb 2017 22:10:06 +0000 (23:10 +0100)]
lib: time: remove leftover declarations

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: hide away logging internals
David Lamparter [Tue, 23 Feb 2016 12:01:47 +0000 (13:01 +0100)]
lib: hide away logging internals

... no need to have struct zlog generally-exposed.

A few files get to include log_int.h because they use zlog/vzlog.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: remove remaining struct zlog * args
David Lamparter [Tue, 23 Feb 2016 11:49:45 +0000 (12:49 +0100)]
lib: remove remaining struct zlog * args

These don't serve any purpose either.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: simplify protocol/log naming
David Lamparter [Tue, 23 Feb 2016 11:38:23 +0000 (12:38 +0100)]
lib: simplify protocol/log naming

The protocols enum serves no purpose other than adding potential for
bugs and making it complicated to add a new protocol... nuke.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: ditch struct zlog * argument on zlog/vzlog()
David Lamparter [Tue, 23 Feb 2016 10:59:36 +0000 (11:59 +0100)]
lib: ditch struct zlog * argument on zlog/vzlog()

It's completely useless...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years ago*: get rid of zlog(*, LOG_LEVEL, ...)
David Lamparter [Sun, 13 Nov 2016 03:19:14 +0000 (12:19 +0900)]
*: get rid of zlog(*, LOG_LEVEL, ...)

Result of running the following Coccinelle patch + fixups:
<<EOF
/* long-forms: zlog(NULL, <level>, ...)
 *    =>       zlog_level(...)
 */

@@
expression list args;
@@
- zlog(NULL, LOG_DEBUG, args)
+ zlog_debug(args)

@@
expression list args;
@@
- zlog(NULL, LOG_NOTICE, args)
+ zlog_notice(args)

@@
expression list args;
@@
- zlog(NULL, LOG_INFO, args)
+ zlog_info(args)

@@
expression list args;
@@
- zlog(NULL, LOG_WARNING, args)
+ zlog_warn(args)

@@
expression list args;
@@
- zlog(NULL, LOG_ERR, args)
+ zlog_err(args)

/* long-forms: zlog(base->log, <level>, ...)
 *    =>       zlog_level(...)
 */

@@
expression base;
expression list args;
@@
- zlog(base->log, LOG_DEBUG, args)
+ zlog_debug(args)

@@
expression base;
expression list args;
@@
- zlog(base->log, LOG_NOTICE, args)
+ zlog_notice(args)

@@
expression base;
expression list args;
@@
- zlog(base->log, LOG_INFO, args)
+ zlog_info(args)

@@
expression base;
expression list args;
@@
- zlog(base->log, LOG_WARNING, args)
+ zlog_warn(args)

@@
expression base;
expression list args;
@@
- zlog(base->log, LOG_ERR, args)
+ zlog_err(args)

EOF

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>