]>
git.puffer.fish Git - matthieu/frr.git/log
Donald Sharp [Tue, 9 Aug 2016 16:30:26 +0000 (12:30 -0400)]
pimd: Add WRVIFWHOLE callback.
Naive implementation of the WRVIFWHOLE callback
from the kernel.
signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 9 Aug 2016 12:05:48 +0000 (08:05 -0400)]
pimd: Don't pass in src_str and grp_str
Allow sub functions to call pim_str_sg_dump as
appropriate
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 8 Aug 2016 22:56:05 +0000 (18:56 -0400)]
pimd: Allow RP to clear based upon KAT(S,G)
When the KAT(S,G) pops, allow the RP to clear the
mroute.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 8 Aug 2016 19:55:52 +0000 (15:55 -0400)]
pimd: Add the display of the Keep Alive Timer for upstream
Add the ability to see the Keep Alive timer for
upstream information.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 8 Aug 2016 14:24:02 +0000 (10:24 -0400)]
pimd: Fix another SA issue
pim_zebra.c was checking to see if a ifp pointer was null
in some debug statements. This caused the SA code
to assume that if we were at this point then the ifp
could be null and subsuquent code that doesn't check
for it to be wrong.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 8 Aug 2016 13:37:51 +0000 (09:37 -0400)]
pimd: Fix some SA issues
SA found these two issues:
1) Check of ifp non-null caused other non-checks down code
to assume ifp could be null. This is not the case.
If we get a callback at this point we must have a valid ifp pointer.
2) We were inadvertently calling igmp_source_reset_gmi with
a possible NULL source pointer.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 5 Aug 2016 07:23:33 +0000 (03:23 -0400)]
pimd: Some SA analysis fixes.
This commit addresses some SA issues found:
1) double set variables
2) value set but never used.
3) wrong return path used.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 6 Aug 2016 10:26:05 +0000 (06:26 -0400)]
pimd: Send hello immediately with receive of new genid
When we receive a new genid from a neighbor, we need
to form the neigbhor relationship before the join/prune
messages are sent to the neighbor.
Additionally we were calling the
pim_upstream_rpf_genid_changed function 2 times
in a row. This function just spun throught the upstream
list and marked all relevant upstreams to be sent
immediately
Ticket:CM-11979
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 5 Aug 2016 17:08:06 +0000 (17:08 +0000)]
pimd: multiple rp commands
Allow the user to specify multiple rp commands.
'ip pim rp A.B.C.D' -> translates to 'ip pim rp A.G.C.D 224.0.0.0/24'
ip pim rp A.B.C.D A.B.C.D/M
First is the rp, second is the group with mask.
Groups and masks cannot be over each other except 224.0.0.0/24 which
is the fallback if used.
Ticket: CM-7860
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 5 Aug 2016 13:07:46 +0000 (09:07 -0400)]
pimd: Refactor RP code and start the ability to handle ranges
Refactor the qpim_rp into pim_rp.c so that the global data
is protected. This will allow us to easily add the group
ranges.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 4 Aug 2016 16:58:47 +0000 (12:58 -0400)]
pimd: Fix some null register issues
The Null register bit was not properly being set and
the total length was wrong as well.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 4 Aug 2016 16:06:58 +0000 (12:06 -0400)]
pimd: Fix join_desired for (*,G) states
When we are evaluating if we have a inherited_olist, include
the *,G state in determing what to do.
Additionally when we receive a join or prune of *,G
do the right thing.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 4 Aug 2016 15:44:11 +0000 (11:44 -0400)]
pimd: Was removing the wrong channel.
When receiving a prune (*,G), we were removing
from the wrong channel.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 4 Aug 2016 15:09:30 +0000 (11:09 -0400)]
pimd: Enable WrongVif and WRWHOLEVIF callbacks.
Turn on Wrong Vif and Whole packet wrong vif callbacks.
Signed-off-by: Donald Sharp <sharpd@cumuusnetworks.com>
Donald Sharp [Thu, 4 Aug 2016 00:57:47 +0000 (20:57 -0400)]
pimd: Fix broken build
I missed 2 instances of the conversion from struct prefix
to struct prefix_sg
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 3 Aug 2016 23:53:42 +0000 (19:53 -0400)]
zebra: Remove unused variable.
Remove the rtnh variable since it is unused.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 2 Aug 2016 08:38:11 +0000 (04:38 -0400)]
lib, pimd: Fix borked up prefix code
Fix the struct prefix to be an actual struct prefix_sg.
This cleans up a bunch of code to make it look nicer.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 3 Aug 2016 18:40:10 +0000 (14:40 -0400)]
pimd: Add rs_timer display
For the 'show ip pim upstream' command addd the RSTimer to the display
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 3 Aug 2016 15:34:38 +0000 (11:34 -0400)]
pimd: Fix upstream state machine.
RFC 4601 4.5.7:
Joined
The downstream state machines and local membership information
indicate that the router should join the shortest-path tree for
this (S,G).
The code has a upstream state that is in 'J' state already
due to a S,G multicast packet received on an incoming
interface. This packet has been forwarded to the RP.
The RP sees this and immediately sends a join towards
the S,G.
The code as originally written assumed that you could
not transition from a J state to a J state. This is not
true.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 3 Aug 2016 15:32:15 +0000 (11:32 -0400)]
pimd: Change packet debug to pim register specific debug
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 3 Aug 2016 01:44:29 +0000 (21:44 -0400)]
pimd: Add ability to debug pim Register packets
Allow the user to specify the ability to debug
pim register packets.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 2 Aug 2016 18:14:54 +0000 (14:14 -0400)]
pimd: Remove Wrong PIMREG ifchannel state
The PIMREG ifchannel state is an evolutionary dead-end.
I should not have introduced this code.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 2 Aug 2016 17:12:31 +0000 (13:12 -0400)]
pimd: Make the NOCACHE just set the regiface to the coil
When we receive a NOCACHE upcall, add the pimreg interface
to the oil so that we can receive the data.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 2 Aug 2016 15:39:16 +0000 (11:39 -0400)]
pimd: Send join when a S,G is pruned
When a *,G is received, and we have S,G that is in a
non-joined state, Send the join to the S,G.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 2 Aug 2016 15:21:49 +0000 (11:21 -0400)]
pimd: Add upstream children finding
When we receive a *,g find all S,G that
are related and set pointer appropriately
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 2 Aug 2016 13:58:14 +0000 (09:58 -0400)]
pimd: Add Local Genid to 'show ip pim hello'
Display the local idea of what the Genid is
Ticket: CM-11980
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Tue, 2 Aug 2016 13:21:51 +0000 (09:21 -0400)]
pimd: Allow the kernel to forward encap'ed packets for us
When we get a pim register allow the kernel to forward the
saved packets.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 1 Aug 2016 17:06:35 +0000 (13:06 -0400)]
pimd: igmpv3.c was causing prune/join messages to be sent
We were erroneously sending a prune *,G immediately followed
by a join *,G under certain situations
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 1 Aug 2016 16:29:58 +0000 (12:29 -0400)]
pimd: change from ifchannels to oil's
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 1 Aug 2016 13:09:47 +0000 (09:09 -0400)]
pimd: More macro fallout fix.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 1 Aug 2016 12:29:00 +0000 (08:29 -0400)]
pimd: Fix pim_macro downstream_jpstate
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 30 Jul 2016 01:20:19 +0000 (21:20 -0400)]
pimd: Create storage for a raw socket.
Each interface needs the ability to send raw packets
at the RP. Create the data structure to do so.
Further commits will create the socket as necessary
and send the packet.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 30 Jul 2016 01:02:17 +0000 (21:02 -0400)]
pimd: Fix DownstreamJPState(S,G,I) check.
Fix the
DownStreamJPState(S,G,I) and
DownStreamJPState(*,G,I) macros.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 28 Jul 2016 16:21:31 +0000 (12:21 -0400)]
pimd: Allow ifchannel S,G's to know their *,G parent
Given a S,G ifchannel, create a parent pointer for any
*,G state for that interface. When removing a *,G
remove S,G pointers.
We need to think about the case where their is a *,G
but no S,G for a interface when we are determing.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 28 Jul 2016 07:08:03 +0000 (03:08 -0400)]
pimd: pim_str_sg_dump can't be called 2 times in the same debug
When we call pim_str_sg_dump we cannot call the variable twice
for the same debug. This fixes this issue in the 2 places it
was borked.
Ticket: CM-12045
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 28 Jul 2016 06:46:36 +0000 (02:46 -0400)]
pimd: Fix *,g pruning
We were not properly handling the receipt of prune *,g messages.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 28 Jul 2016 02:19:08 +0000 (22:19 -0400)]
pimd: Infrastructure to forward packet down (*,G) tree
When a register is received, forward the packet as appropriate.
This is the infrastructure to make this happen.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 28 Jul 2016 01:17:54 +0000 (21:17 -0400)]
pimd: Create raw socket for register packets to be forwarded.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 28 Jul 2016 00:13:16 +0000 (20:13 -0400)]
pimd: Create pim_socket_bind
Allow a socket to be bound to a specified
interface.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 27 Jul 2016 20:33:41 +0000 (16:33 -0400)]
pimd: Revamp send of join/prune to actually set bits right.
When a *,G report is sent, the RPT and WC bits
are set as well as the source is the RP address
for the group.
If this routers idea of the RP for this group is
different than the idea of the RP from the sender
than that particular *,G can be dropped.
Ticket: CM-12031
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 27 Jul 2016 19:27:52 +0000 (15:27 -0400)]
pimd: Start abstraction for WC and RPT bits
Start the abstraction of the WC and RPT bits
so we can send the data as appropriate.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 27 Jul 2016 19:39:28 +0000 (15:39 -0400)]
pimd: Fixup pim_oil interface to be a bit more consistent.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sun, 24 Jul 2016 05:15:09 +0000 (01:15 -0400)]
pimd: Find the parent on newly created upstream's
When we create a new upstream data structure find the parent.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 23:54:51 +0000 (19:54 -0400)]
pimd: Make kernel upcalls PIM_DEBUG_MROUTE
The kernel upcalls for control messages should
be PIM_DEBUG_MROUTE instead of PIM_DEBUG_PIM_TRACE
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 23:18:19 +0000 (19:18 -0400)]
pimd: Fix Join/Prune logging
For some reason Join/Prune debugs were being
turned on by trace not by the 'debug pim packets join'
command.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 27 Jul 2016 01:00:09 +0000 (21:00 -0400)]
pimd: Add some 'show debug pim' output
Add some missing 'show debug pim' output so that I can
see what I think I'm debugging.
In general the pim debugs need another round of fixing.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 16:30:41 +0000 (12:30 -0400)]
pimd: Some bug fixes for the register receive code path
When we receive a register receive handle it a bit
better.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 10:01:55 +0000 (06:01 -0400)]
pimd: Allow (*,G) joins to join a (s,g) that pre-exists
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 09:36:44 +0000 (05:36 -0400)]
pimd: Add code to handle the inheritance for (s,g)
Add code to handle the inheritance and to send the
join upstream as appropriate.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 08:12:05 +0000 (04:12 -0400)]
pimd: Remove unnecessary QuaggaId
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 07:47:15 +0000 (03:47 -0400)]
pimd: start fix of inherited_olist
We were not correctly determing the inherited olist and
applying it to the s,g.
Start the work to do this.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 07:36:25 +0000 (03:36 -0400)]
pimd: Stop leaving pim_register_recv early
When we received a pim_register_recv we were shortcutting
the algorithm to determine what to do when we receive
a register pim message.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 07:33:53 +0000 (03:33 -0400)]
pimd: Fix _find and switch_to_spt_desired.
The pim_upstream_find function should not be finding a *,G
Find what is asked of it.
The switch_to_spt_desired should return true on the RP currently.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 04:35:35 +0000 (00:35 -0400)]
pimd: pim_br switch to struct prefix
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 04:06:55 +0000 (00:06 -0400)]
pimd: SwitchToSptDesired now uses struct prefix *sg.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 03:58:55 +0000 (23:58 -0400)]
pimd: More conversion of struct prefix *sg
Some more conversion to use struct prefix *sg in pim_ifchannel.c
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 03:50:29 +0000 (23:50 -0400)]
pimd: Convert pim_ifchannel_local_membership_del to struct prefix *sg
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 03:42:11 +0000 (23:42 -0400)]
pimd: convert pim_ifchannel_local_membership_add to use struct prefix sg
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 03:34:27 +0000 (23:34 -0400)]
pimd: Convert pim_ifchannel_prune to use struct prefix *sg
Convert the pim_ifchannel_prune function to use a struct
prefix *sg for the source group.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 03:28:13 +0000 (23:28 -0400)]
pimd: Convert pim_ifchannel_join_add to struct prefix *sg
Convert the pim_ifchannel_join_add to use a struct prefix *sg
instead of struct in_addr's.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 23 Jul 2016 03:12:06 +0000 (23:12 -0400)]
pimd: more source,group conversion to prefix sg
Convert more of the code to pass around a 'struct prefix sg'
instead of individual struct addr's.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 22 Jul 2016 12:57:20 +0000 (08:57 -0400)]
pimd: Refactor s,g information to struct prefix in pim_upstream.h
This change allows us to pass the (s,g) state around as a prefix.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 22 Jul 2016 12:01:43 +0000 (08:01 -0400)]
pimd: Convert ifchannel to using a prefix to store (s,g)
Convert ifchannel to use a prefix to store (s,g) information.
Additionally create pim_str_sg_dump function to output
data when using debugs.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 22 Jul 2016 09:58:08 +0000 (05:58 -0400)]
lib: Setup prefix.h to allow it to store (s,g)
We need the ability to store the (s,g) in a struct prefix.
This will allow us to consolidate some duplicated code in
pimd as well as set us up to switch from a link list to a
table to store (s,g) state.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 22 Jul 2016 14:19:32 +0000 (10:19 -0400)]
pimd: Fix join in register to use correct nexthop
pim was sending the join from the RP towards the FHR with
a address that was the source instead of the nexthop. This join
was treated as a non-local and nothing was done with it.
Ticket: CM-11945
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 22 Jul 2016 13:26:30 +0000 (09:26 -0400)]
pimd: Start switchover to using a PRUNE (S,G) for uninteresting streams
When we receive a register for a (S,G) that we have no interest in
prune it off and send the register stop.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
vivek [Thu, 21 Jul 2016 15:50:17 +0000 (08:50 -0700)]
zebra: API to locate client structure based on protocol
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket:
Reviewed By: CCR-4968
Testing Done: Tested with subsequent patch(es)
Donald Sharp [Sat, 16 Jul 2016 12:27:24 +0000 (08:27 -0400)]
pimd: Make pim_upstream_switch non static
Allow pim_upstream_switch to be called from outside of pim_upstream.c
Also change the assert to an if test to just correctly stop the
timer.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 16 Jul 2016 12:23:22 +0000 (08:23 -0400)]
pimd: change string to JOINPRUNE
Change the JP message string to JOINPRUNE.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 16 Jul 2016 08:49:32 +0000 (04:49 -0400)]
pimd: Refactor pim message type to an enum
Change the pim message type to an enum and add the ability
to output a string based upon message type.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sat, 16 Jul 2016 06:45:33 +0000 (02:45 -0400)]
pimd: Use XCALLOC instead of XMALLOC
Ensure that all data structures start out
as 0 filled.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 15 Jul 2016 19:47:13 +0000 (15:47 -0400)]
pimd: Fix PACKETDUMP compile errors.
signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 15 Jul 2016 19:42:09 +0000 (15:42 -0400)]
pimd: First Schwag at pim_register_stop
Implement the pim_register_stop state machine. There are still a few
bugs still but this is enough to get us rolling a bit more.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 15 Jul 2016 15:03:15 +0000 (11:03 -0400)]
pimd: Refactor ifchannel creation.
Remove unnecessary function.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 15 Jul 2016 13:42:57 +0000 (09:42 -0400)]
pimd: Remove unneeded function.
Remove the prune_echo function as that it just took some
data and passed it into another function.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 18 Jul 2016 13:52:45 +0000 (09:52 -0400)]
pimd: Properly initialize and delete t_rs_timer
Ensure that we properly initialize and stop the t_rs_timer.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 18 Jul 2016 13:47:19 +0000 (09:47 -0400)]
pimd: Create register stop timer for DR
When a register stop is received, create the register stop
timer and associated state machine.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 18 Jul 2016 00:18:33 +0000 (20:18 -0400)]
pimd: Add null_register bit to pim_register_send
When sending a pim register message to an RP, we need
the ability to set the null bit in the message. This
adds the ability to do so.
Additionally we need to switch the ip_hdr to a const uint8_t *buf
because pim_register_send really shouldn't know or care about
the fact it's a 'struct ip'.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sun, 17 Jul 2016 23:51:56 +0000 (19:51 -0400)]
pimd: Add pim_channel_del_oif
For a given interface remove the interface from the list
of outgoing interfaces for a mroute and reinstall it
into the kernel.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Sun, 17 Jul 2016 23:45:16 +0000 (19:45 -0400)]
pimd: create pim_upstream_state2str
Allow update of show command to understant all
pim upstream states.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 14 Jul 2016 21:19:00 +0000 (17:19 -0400)]
pimd: Fix use of 0 for NULL
pimd uses allot of 0's to represent NULL. Not a good
programming practice.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 14 Jul 2016 21:16:42 +0000 (17:16 -0400)]
pimd: Add decision point to send register message
When we receive a register stop we will have created a
timer for this. As such if the t_rs_timer pointer will
be non-NULL at this point.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 14 Jul 2016 14:30:37 +0000 (10:30 -0400)]
pimd: Refactor pim message receive
We were using a variety of techniques to handle
incoming pim packets. Refactor to use a switch
statement to handle the incoming packets.
Also add the ability to notice that we are getting
a register stop.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 14 Jul 2016 14:12:25 +0000 (10:12 -0400)]
pimd: Send Register-Stop from RP
The RP now has the ability to send a register stop message
to the originator of the packet in order to tell it to
stop encapsulating packets to the RP.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 14 Jul 2016 13:09:39 +0000 (09:09 -0400)]
pimd: Set correct parameters to pim_register_stop_send
Setup the pim_register_stop_send function to
take the correct parameters.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 14 Jul 2016 13:05:34 +0000 (09:05 -0400)]
pimd: Fixup some dead code
Remove some dead code.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 13 Jul 2016 01:40:35 +0000 (21:40 -0400)]
pimd: Create pim_encode_addr_group
Create the ability to encode the group address in a message.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Quentin Young [Tue, 20 Dec 2016 06:39:37 +0000 (06:39 +0000)]
lib: add grammar_sandbox to .gitignore
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Mon, 19 Dec 2016 22:35:03 +0000 (17:35 -0500)]
Merge pull request #22 from qlyoung/fix-do-tab
lib: fix crash when tab-completing `do ...` commands
Quentin Young [Sun, 18 Dec 2016 05:14:55 +0000 (05:14 +0000)]
lib: fix crash when tab-completing `do ...` commands
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Donald Sharp [Fri, 16 Dec 2016 20:52:47 +0000 (15:52 -0500)]
Merge pull request #6 from opensourcerouting/dev/osr/vty_pending
parser: accept non-words as first tokens & numbers as word tokens
Donald Sharp [Fri, 16 Dec 2016 20:12:34 +0000 (15:12 -0500)]
Merge pull request #5 from freerangerouting/dev/osr/fixes_plus_vty_keywords
Merge branch 'dev/osr/fixes_plus_vty_keywords'
David Lamparter [Wed, 23 Nov 2016 18:20:15 +0000 (19:20 +0100)]
lib: parser: remove startnode & sentence_root
This removes an artificial restriction for the first token in a
command's graph to be a WORD_TKN. The intention seems to be to prohibit
empty paths through a command, and to restrict "explosion" of choices in
the root node.
The better approach to the former is to check for an empty path after
the definition is parsed. The latter will happen anyway, by duplication
of the command, which just makes it worse...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Fri, 16 Dec 2016 19:43:26 +0000 (20:43 +0100)]
lib: parser: accept number-only word tokens
There seems to be no reason why numbers don't work as plain word tokens;
this is useful to have "number choices" or constants, e.g. <128|192|256>
for bit encryption lengths.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Fri, 16 Dec 2016 16:33:31 +0000 (17:33 +0100)]
build: automake 1.12 to deal with flex & bison
bison conditionally writes its output to different files based on the
filenames specified in the source code. This could be disabled,
however... flex changes its output filenames when "prefix" is
specified. And ylwrap from <1.11 doesn't understand how to handle the
header file...
...so this requires automake 1.12 which can deal with this properly.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Fri, 16 Dec 2016 16:19:37 +0000 (17:19 +0100)]
lib: parser: move allowrepeat to cmd_token
struct graph_node isn't quite the right place to control matcher
behaviour.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Fri, 16 Dec 2016 07:12:54 +0000 (08:12 +0100)]
bgpd: shuffle qobj_init()
bgp_master_init is called first thing in main(), so we need to wedge a
qobj_init() call in there... this needs some improvement...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Fri, 16 Dec 2016 01:10:48 +0000 (02:10 +0100)]
lib: parser: reorder bison incarnations
This shuffles the code blocks in command_parser.y to match file output
order, then adjusts things to make the include handling less messy.
(also dropped unused DECIMAL_STRLEN_MAX define.)
This should hopefully fix the build on NetBSD 6.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Fri, 16 Dec 2016 00:24:53 +0000 (01:24 +0100)]
build: check flex >= 2.5.20 is available
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Thu, 15 Dec 2016 23:37:52 +0000 (00:37 +0100)]
build: fix bison < 3.0 compatibility
bison-2.7.x really wants "foo" for api.prefix while bison-3.0.x really
wants {foo} ... great.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>