]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
7 years agoldpd: no need to synchronize pseudowires with LSPs anymore
Renato Westphal [Thu, 30 Mar 2017 23:19:16 +0000 (20:19 -0300)]
ldpd: no need to synchronize pseudowires with LSPs anymore

Since commit 595b4be, the l2vpn_pw_ok() function doesn't check if there's
a working LSP to the remote end of the pseudowire (we assume that zebra
will do that for us). With that said, the l2vpn_sync_pws() function is
not necessary anymore.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: fix harmless maybe-uninitialized warning
Renato Westphal [Thu, 30 Mar 2017 15:33:46 +0000 (12:33 -0300)]
ldpd: fix harmless maybe-uninitialized warning

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #291 from AnuradhaKaruppiah/pim-ssm
Jafar Al-Gharaibeh [Fri, 31 Mar 2017 05:15:23 +0000 (00:15 -0500)]
Merge pull request #291 from AnuradhaKaruppiah/pim-ssm

Pim ssm

7 years agoMerge branch 'master' into pim-ssm
Donald Sharp [Thu, 30 Mar 2017 21:20:34 +0000 (16:20 -0500)]
Merge branch 'master' into pim-ssm

7 years agoMerge pull request #301 from qlyoung/nhrpd-gitignore
Jafar Al-Gharaibeh [Thu, 30 Mar 2017 21:15:18 +0000 (16:15 -0500)]
Merge pull request #301 from qlyoung/nhrpd-gitignore

nhrpd: add .gitignore

7 years agoMerge pull request #307 from LabNConsulting/working/2.0/patch/rename2
Donald Sharp [Thu, 30 Mar 2017 19:23:55 +0000 (14:23 -0500)]
Merge pull request #307 from LabNConsulting/working/2.0/patch/rename2

Rename: FreeRangeRouting --> FRRouting

7 years agoMerge pull request #305 from opensourcerouting/build-doc-updates
Donald Sharp [Thu, 30 Mar 2017 19:23:15 +0000 (14:23 -0500)]
Merge pull request #305 from opensourcerouting/build-doc-updates

doc: Update for the Building_FRR docs to include new requirements

7 years agoRename: freerangerouting --> frrouting
Lou Berger [Thu, 30 Mar 2017 18:24:05 +0000 (14:24 -0400)]
Rename: freerangerouting --> frrouting

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agoRename: FreeRangeRouting FRRouting
Lou Berger [Thu, 30 Mar 2017 18:22:35 +0000 (14:22 -0400)]
Rename: FreeRangeRouting FRRouting

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agopimd: Fix header to be more descriptive of what it is doing
Donald Sharp [Thu, 30 Mar 2017 14:22:00 +0000 (10:22 -0400)]
pimd: Fix header to be more descriptive of what it is doing

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Receive incoming v6 addresses and place in pim_ifp list
Donald Sharp [Thu, 30 Mar 2017 13:10:05 +0000 (09:10 -0400)]
pimd: Receive incoming v6 addresses and place in pim_ifp list

Add code to properly receive v6 addresses up from zebra and to
properly place them into our interface secondary address list.

Additionally cleanup some code in pim_cmd.c that was broken
by these changes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Use better 5549 resolution
Donald Sharp [Thu, 30 Mar 2017 13:07:06 +0000 (09:07 -0400)]
pimd: Use better 5549 resolution

When we receive a v6 nexthop in v4, lookup the nbr by
it's secondary address.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Send v6 secondary addresses to neighbors in hello
Donald Sharp [Thu, 30 Mar 2017 13:01:09 +0000 (09:01 -0400)]
pimd: Send v6 secondary addresses to neighbors in hello

Send v6 secondary addresses to our neighbor in hello's.

Additionally allow the disabling it via the cli introduced
earlier.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add ability to encode/decode v6 secondary addresses
Donald Sharp [Thu, 30 Mar 2017 04:07:18 +0000 (00:07 -0400)]
pimd: Add ability to encode/decode v6 secondary addresses

Add ability to encode/decode the v6 secondary addresses
if they are passed to us.

This also fixes the issue where if we are passed
a v6 secondary address list we will not refuse
to form neighbors.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add code to find neighbor by secondary
Donald Sharp [Thu, 30 Mar 2017 03:44:12 +0000 (23:44 -0400)]
pimd: Add code to find neighbor by secondary

With RFC 5549 we need a methodology to find
a neighbor based upon a nexthop that is
v6 based.  This commit sets us up for that
by allowing you to find the neigbor by
the secondary list.  In a future commit
we will add code to pass the v6 secondary
addresses.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix RP determination to handle secondary addresses better
Donald Sharp [Thu, 30 Mar 2017 03:27:25 +0000 (23:27 -0400)]
pimd: Fix RP determination to handle secondary addresses better

When we are checking RP addresses and looking at the secondary
address.  With the addition of the ability to handle v6 addresses
in the secondary list.  Assuming that the secondary address
is a v4 address is a no go.

Convert to prefix_same.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Add code to allow backwards compatibility
Donald Sharp [Thu, 30 Mar 2017 03:23:25 +0000 (23:23 -0400)]
pimd: Add code to allow backwards compatibility

This code change adds the ability to specify that
we should be able to work with older versions
of PIM.

In future commits we will actually use this data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Convert pim address family from #define -> enum
Donald Sharp [Thu, 30 Mar 2017 03:02:41 +0000 (23:02 -0400)]
pimd: Convert pim address family from #define -> enum

Convert the pim address family from a #define into
an enum.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #297 from opensourcerouting/ldpd-openbsd
Donald Sharp [Thu, 30 Mar 2017 11:23:59 +0000 (06:23 -0500)]
Merge pull request #297 from opensourcerouting/ldpd-openbsd

Add support for MPLSv6 in OpenBSD + minor fixes

7 years agoMerge pull request #296 from opensourcerouting/ldpd-sighup
Donald Sharp [Thu, 30 Mar 2017 11:18:25 +0000 (06:18 -0500)]
Merge pull request #296 from opensourcerouting/ldpd-sighup

ldpd: do a full configuration reload upon receiving a SIGHUP

7 years agoMerge pull request #299 from opensourcerouting/test-ref-out
Donald Sharp [Thu, 30 Mar 2017 11:14:21 +0000 (06:14 -0500)]
Merge pull request #299 from opensourcerouting/test-ref-out

tests: format TestRefMismatch more readable

7 years agoMerge pull request #298 from opensourcerouting/defaults
Donald Sharp [Thu, 30 Mar 2017 11:13:19 +0000 (06:13 -0500)]
Merge pull request #298 from opensourcerouting/defaults

track version & "defaults" in configs

7 years agonhrpd: add .gitignore
Quentin Young [Wed, 29 Mar 2017 23:40:55 +0000 (23:40 +0000)]
nhrpd: add .gitignore

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agolib: sandbox: print vtysh daemon targets
David Lamparter [Wed, 22 Mar 2017 09:45:51 +0000 (10:45 +0100)]
lib: sandbox: print vtysh daemon targets

This is very useful to check whether a command disappeared from a
specific daemon (by comparing against an earlier output of
"grammar find-ambiguous printall nodescan")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agovtysh: parsing fixes on distribute-list
David Lamparter [Wed, 22 Mar 2017 09:22:14 +0000 (10:22 +0100)]
vtysh: parsing fixes on distribute-list

The vtysh preprocessing stuff doesn't like the first argument to
install_element() being something other than a _NODE constant, and the
comment hack wasn't cutting it... just expand this.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agovtysh: remove ignore list
David Lamparter [Wed, 22 Mar 2017 09:39:06 +0000 (10:39 +0100)]
vtysh: remove ignore list

With DEFUN_NOSH in place everywhere, this is useless.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years ago*: apply DEFUN_NOSH for node-switch CLI commands
David Lamparter [Wed, 22 Mar 2017 09:38:22 +0000 (10:38 +0100)]
*: apply DEFUN_NOSH for node-switch CLI commands

These have copies in vtysh that do the node-switch locally and are
listed in extract.pl's ignore list.  The ignore list however is
redundant since DEFUN_NOSH does the same thing...

ldpd is a bit hacky, but Renato is reworking this anyway.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years ago*: track version & "defaults" in configs
David Lamparter [Thu, 9 Mar 2017 18:00:19 +0000 (19:00 +0100)]
*: track version & "defaults" in configs

[CF]: Move default name to autoconf and update tests

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agotests: format TestRefMismatch more readable
Christian Franke [Tue, 28 Mar 2017 16:23:47 +0000 (18:23 +0200)]
tests: format TestRefMismatch more readable

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agodoc: minor tweaks in the build instructions
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>
7 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>
7 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>
7 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>
7 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>
7 years agoldpd: fix pseudowire merge algorithm
Renato Westphal [Sat, 25 Mar 2017 23:57:03 +0000 (20:57 -0300)]
ldpd: fix pseudowire merge algorithm

The previous algorithm wasn't failsafe for full configuration reloads
where several pseudowires can be inserted or removed at the same
time. This patch introduces a much simpler logic that solves the problem
in a better way.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: remove a few unnecessary functions
Renato Westphal [Sat, 25 Mar 2017 23:52:42 +0000 (20:52 -0300)]
ldpd: remove a few unnecessary functions

The original ldpd(8) daemon in OpenBSD doesn't allow the user to put
non-existing interfaces in the configuration file. For this reason,
the l2vpn_if_find() and l2vpn_pw_find() functions take an ifindex as
an argument.  In FRR's ldpd we can put non-existing interfaces in the
configuration, and they are activated as soon as they are available. For
this reason, we can't lookup interfaces by their ifindex in this port.
The l2vpn_if_find_name() and l2vpn_pw_find_name() functions were
introduced to address this issue. However, since the "find-by-ifindex"
functions are not being used anymore, we can just remove them and rename
the *_find_name() functions removing the "_name" suffix.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: do a full configuration reload upon receiving a SIGHUP
Renato Westphal [Wed, 22 Mar 2017 15:53:36 +0000 (12:53 -0300)]
ldpd: do a full configuration reload upon receiving a SIGHUP

The rationale here is to do something very similar to what the original
OpenBSD's ldpd(8) does to reload configuration files:
* create a new empty base configuration (vty_conf);
* parse the configuration file and store the result in vty_conf;
* merge the new configuration into the current configuration.

To do this, introduce a new global variable called "sighup" so that ldpd
doesn't attempt to merge vty_conf into ldpd_conf for each command in
the configuration file, which would be very disruptive. vty_conf should
be merged only after the whole configuration file is parsed in order to
avoid taking actions like shutting down neighbors when not necessary.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: ignore the SIGHUP signal in the child processes
Renato Westphal [Sun, 26 Mar 2017 00:28:13 +0000 (21:28 -0300)]
ldpd: ignore the SIGHUP signal in the child processes

Only the parent process should handle the SIGHUP signal, but we need
to make sure that this signal is ignored in the child processes so a
command like "killall -SIGHUP ldpd" won't kill ldpd.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: simplify handling of configuration commands
Renato Westphal [Thu, 23 Mar 2017 17:49:28 +0000 (14:49 -0300)]
ldpd: simplify handling of configuration commands

The logic to make configuration changes in ldpd is as follows:
1 - duplicate the current configuration;
2 - modify the duplicated configuration (delta);
3 - merge the duplicated configuration into the current configuration.

We can however change things a little bit in order to simplify the code.

If we provide a global vty_conf variable and make sure that it's
always an up-to-date duplicate of ldpd_conf, then we don't need to call
ldp_dup_config() in the callback of each configuration command. Instead
of that, we just need to duplicate ldpd_conf in the startup of the daemon
and in the end of the ldp_reload() function. Doing this is safe because,
due to the single-threaded nature of the parent process, it's impossible
to have multiple requests to change the configuration at the same time.

Also, we can remove the *_ref() functions and do something much simpler
instead.  The problem we have to deal with here is that VTY_GET_CONTEXT()
returns a pointer to an element of ldpd_conf, and what we want is a
pointer to an element of vty_conf (e.g. an l2vpn).  To solve this,
we just need to look for the equivalent element inside vty_conf using
standard functions from ldpd like l2vpn_find() and others.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: drop privileges earlier in the parent process
Renato Westphal [Wed, 22 Mar 2017 19:23:46 +0000 (16:23 -0300)]
ldpd: drop privileges earlier in the parent process

This solves a bug where log files created with "log file" were being
created root-owned. So, inserting the "log file" command multiple times
with the same path would fail giving a permission denied error.

Also, rearrange the main() function to call start_child() as soon as
possible to avoid a bunch of unnecessary initializations in the forked
processes.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMerge pull request #295 from opensourcerouting/community_md_edits
Donald Sharp [Sat, 25 Mar 2017 11:36:53 +0000 (07:36 -0400)]
Merge pull request #295 from opensourcerouting/community_md_edits

COMMUNITY.md: update CodingStyle & branching

7 years agoCOMMUNITY.md: update CodingStyle & branching
David Lamparter [Mon, 23 Jan 2017 19:52:13 +0000 (20:52 +0100)]
COMMUNITY.md: update CodingStyle & branching

Also add a note that this is documentation, not law.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 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

7 years agodoc: document loadable module support
David Lamparter [Sat, 25 Mar 2017 09:05:19 +0000 (10:05 +0100)]
doc: document loadable module support

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agodoc: Update for the Building_FRR docs to include new requirements
Martin Winter [Sat, 25 Mar 2017 07:57:53 +0000 (00:57 -0700)]
doc: Update for the Building_FRR docs to include new requirements

* Added libc-ares
* Added python-dev

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agozebra: fpm: convert into module
David Lamparter [Sun, 12 Feb 2017 23:29:37 +0000 (00:29 +0100)]
zebra: fpm: convert into module

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years ago*: snmp: convert into modules
David Lamparter [Sun, 12 Jun 2016 15:52:50 +0000 (17:52 +0200)]
*: snmp: convert into modules

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years ago*: use hooks for sending SNMP traps
David Lamparter [Sun, 12 Jun 2016 15:32:23 +0000 (17:32 +0200)]
*: use hooks for sending SNMP traps

This means there are no ties into the SNMP code anymore other than the
init call at startup.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobuild: split off libfrrsnmp
David Lamparter [Mon, 13 Jun 2016 13:44:26 +0000 (15:44 +0200)]
build: split off libfrrsnmp

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: add hook infrastructure
David Lamparter [Sun, 12 Jun 2016 15:31:50 +0000 (17:31 +0200)]
lib: add hook infrastructure

Please refer to lib/hook.h for a description/documentation.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: add "show modules" CLI command
David Lamparter [Sun, 12 Feb 2017 22:23:02 +0000 (23:23 +0100)]
lib: add "show modules" CLI command

(for simplicity, this is stuffed in with memory_vty.c)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: dynamic module loading
David Lamparter [Tue, 31 May 2016 17:25:46 +0000 (19:25 +0200)]
lib: dynamic module loading

This adds a "-M" option to each daemon, to load dynamic modules at
startup.  Modules are by default located in /usr/lib/frr/modules (lib64
if appropriate).  Unloading or loading at runtime is not supported at
this point to keep things simple.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: remove unused add_snmp_pollfds()
David Lamparter [Sun, 12 Feb 2017 21:40:11 +0000 (22:40 +0100)]
lib: remove unused add_snmp_pollfds()

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoripd: fix snmp compile
David Lamparter [Fri, 24 Mar 2017 09:56:35 +0000 (10:56 +0100)]
ripd: fix snmp compile

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agozebra: fpm: fix protobuf compile
David Lamparter [Sun, 12 Feb 2017 23:35:43 +0000 (00:35 +0100)]
zebra: fpm: fix protobuf compile

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 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

7 years agopimd: Fix pim_ssm build failure by including zebra.h
anuradhak [Thu, 23 Mar 2017 21:20:56 +0000 (14:20 -0700)]
pimd: Fix pim_ssm build failure by including zebra.h

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
7 years agopimd: del_oif and pim_channel_del_oif are the same function
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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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

7 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.

7 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

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

7 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

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

7 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

7 years agopimd: Fix interface api
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>
7 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

7 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

7 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

7 years agoMerge pull request #277 from donaldsharp/proto-dev-build
Renato Westphal [Tue, 21 Mar 2017 15:31:41 +0000 (12:31 -0300)]
Merge pull request #277 from donaldsharp/proto-dev-build

Proto dev build

7 years agoMerge pull request #281 from opensourcerouting/snapcraft-fixes
Donald Sharp [Tue, 21 Mar 2017 15:11:16 +0000 (11:11 -0400)]
Merge pull request #281 from opensourcerouting/snapcraft-fixes

Snapcraft fixes

7 years agoldpd: Fix compilation errors n Ubuntu CI
ß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>
7 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>
7 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>
7 years agoldpd: provide more detailed information in some show commands
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>
7 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>
7 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>
7 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>
7 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>
7 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

7 years agoldpd: remove pseudowire LSP check
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>
7 years agosnapcraft: Change setup/ to snap/ directory based on new snap format
Martin Winter [Sat, 18 Mar 2017 03:50:09 +0000 (20:50 -0700)]
snapcraft: Change setup/ to snap/ directory based on new snap format

DEPRECATED: Assets in 'setup/gui' should now be placed in 'snap/gui'.
See http://snapcraft.io/docs/deprecation-notices/dn3 for more information.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agosnapcraft: Add missing snapcraft files from dist (make dist) archive
Martin Winter [Sat, 18 Mar 2017 03:43:27 +0000 (20:43 -0700)]
snapcraft: Add missing snapcraft files from dist (make dist) archive

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agopimd: Add display of SGRpt state for ifchannel
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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>