]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
8 years agopimd: Remove interface type SSM.
anuradhak [Tue, 21 Mar 2017 17:12:30 +0000 (10:12 -0700)]
pimd: Remove interface type SSM.

Interface type has been replaced with the SSM range config. And SSM
groups can now co-exists with ASM groups. I have left the pim ssm
per-interface cli control hidden. It now enables pim-sm with a warning.

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

8 years agopimd: Allow SSM groups to co-exist with ASM groups.
anuradhak [Fri, 17 Mar 2017 18:51:13 +0000 (11:51 -0700)]
pimd: Allow SSM groups to co-exist with ASM groups.

SSM groups (232/8 or user configured SSM range) can exist in the same
multicast network as ASM groups. For such groups all RPT related state
machine operations have to be skipped as defined by section 4.8 of
RFC4601 -
1. Source registration is skipped for SSM groups. For SSM groups mroute
is setup on the FHR when a new multicast flow is rxed; however source
registration (i.e. pimreg join) is skipped. This will let the ASIC black
hole the traffic till a valid OIL is added to the mroute.
2. (*,G) IGMP registrations are ignored for SSM groups.

Sample output:
=============
fhr#  sh ip pim group-type
SSM group range : 232.0.0.0/8
fhr#  sh ip pim group-type 232.1.1.1
Group type: SSM
fhr#  sh ip pim group-type 239.1.1.1
Group type: ASM
fhr#

Sample config:
=============
fhr(config)# ip pim ssm prefix-list ssm-ranges
fhr(config)#

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-15344
Testing Done:
1. SSM/ASM source-registration/igmp-joins.
2. On the fly multicast group type changes.
3. pim-smoke.

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 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>
8 years ago*: add frr_run()
David Lamparter [Mon, 14 Nov 2016 00:56:02 +0000 (09:56 +0900)]
*: add frr_run()

Contains the fetch-and-run-thread logic, and vty startup (which is the
last thing happening before entering the main loop).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years ago*: add frr_config_fork()
David Lamparter [Sun, 13 Nov 2016 08:48:56 +0000 (17:48 +0900)]
*: add frr_config_fork()

Centralise read_config/daemonize/dryrun/pidfile/vty_serv into libfrr.

This also makes multi-instance pid/config handling available as part of
the library.  It's only wired up in ospfd, but the code is in lib/.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years ago*: centralize more into frr_init()
David Lamparter [Sun, 13 Nov 2016 07:23:29 +0000 (16:23 +0900)]
*: centralize more into frr_init()

Move CLI/VTY/Memory accounting init into frr_*

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years ago*: add frr_init() infrastructure
David Lamparter [Sun, 13 Nov 2016 07:02:23 +0000 (16:02 +0900)]
*: add frr_init() infrastructure

Start centralising startup & option parsing into the library.

FRR_DAEMON_INFO is a bit weird, but it will become useful later (e.g.
for killing the ZLOG_* enum, and having the daemon name available)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoMerge pull request #257 from opensourcerouting/nhrpd
Donald Sharp [Tue, 7 Mar 2017 20:15:23 +0000 (15:15 -0500)]
Merge pull request #257 from opensourcerouting/nhrpd

nhrpd

8 years agoMerge pull request #259 from opensourcerouting/vtysh-completion-mtype-underflow
Quentin Young [Tue, 7 Mar 2017 18:24:12 +0000 (13:24 -0500)]
Merge pull request #259 from opensourcerouting/vtysh-completion-mtype-underflow

vtysh: fix completion

8 years agovtysh: fix completion 259/head
David Lamparter [Tue, 7 Mar 2017 18:16:21 +0000 (19:16 +0100)]
vtysh: fix completion

The return value from cmd_complete_command is a VECTOR_INDEX, not TMP.
Use the appropriate vector_only_index_free().

Fixes #223.

Reported-by: https://github.com/k0ste
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoMerge pull request #254 from donaldsharp/shutdown3
Donald Sharp [Tue, 7 Mar 2017 16:29:44 +0000 (11:29 -0500)]
Merge pull request #254 from donaldsharp/shutdown3

Shutdown take 3

8 years agoMerge branch 'frr/pull/250' ("bgpd, zebra: Add ifindex to NEXTHOP_TYPE_IPV4")
David Lamparter [Tue, 7 Mar 2017 16:26:02 +0000 (17:26 +0100)]
Merge branch 'frr/pull/250' ("bgpd, zebra: Add ifindex to NEXTHOP_TYPE_IPV4")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: only default-enable nhrpd on Linux 257/head
David Lamparter [Tue, 7 Mar 2017 15:56:57 +0000 (16:56 +0100)]
build: only default-enable nhrpd on Linux

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agocumulus, tools: Allow nhrpd to be brought up
Donald Sharp [Tue, 7 Mar 2017 15:49:46 +0000 (10:49 -0500)]
cumulus, tools: Allow nhrpd to be brought up

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge pull request #256 from donaldsharp/bgp_bfd_fix
David Lamparter [Tue, 7 Mar 2017 15:49:53 +0000 (16:49 +0100)]
Merge pull request #256 from donaldsharp/bgp_bfd_fix

bgpd: Clean up bfd memory *before* deleting the peer

8 years agoMerge branch 'frr/pull/243' ("Pim jp agg")
David Lamparter [Tue, 7 Mar 2017 15:42:20 +0000 (16:42 +0100)]
Merge branch 'frr/pull/243' ("Pim jp agg")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agopimd: Add copyright Information to pim_jp_agg.[ch] 243/head
Donald Sharp [Tue, 7 Mar 2017 15:40:32 +0000 (10:40 -0500)]
pimd: Add copyright Information to pim_jp_agg.[ch]

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agodistro/redhat: package nhrpd
Timo Teräs [Tue, 14 Feb 2017 11:07:39 +0000 (13:07 +0200)]
distro/redhat: package nhrpd

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
[DL: adapted for FRR, changed port number 2612->2610]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agonhrpd: workaround old kernel vs. glibc definition conflics
Timo Teräs [Tue, 14 Feb 2017 09:55:09 +0000 (11:55 +0200)]
nhrpd: workaround old kernel vs. glibc definition conflics

fixes https://bugzilla.quagga.net/show_bug.cgi?id=908

With kernel-headers-3.10.0 we have:

In file included from netlink_gre.c:15:0:
/usr/include/linux/ipv6.h:19:8: error: redefinition of 'struct in6_pktinfo'
 struct in6_pktinfo {
        ^
In file included from netlink_gre.c:10:0:
/usr/include/netinet/in.h:536:8: note: originally defined here
 struct in6_pktinfo
        ^
In file included from netlink_gre.c:15:0:
/usr/include/linux/ipv6.h:24:8: error: redefinition of 'struct ip6_mtuinfo'
 struct ip6_mtuinfo {
        ^
In file included from netlink_gre.c:10:0:
/usr/include/netinet/in.h:543:8: note: originally defined here
 struct ip6_mtuinfo

So instead of libc's netinet/in.h include kernel's linux/in.h
and the add sys/socket.h for struct sockaddr since it does not
seem to be defined in kernel headers.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agodoc: add initial nhrpd documentation
Timo Teräs [Tue, 24 Jan 2017 14:42:19 +0000 (16:42 +0200)]
doc: add initial nhrpd documentation

[DL: resolved renaming & conflicts]
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>