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.
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>
Add the ability for PIM to send Join/Prunes as an
aggregated message instead of individual messages
for each S,G.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When we are at scale, it is possible that
we have a very large number of ifchannels
per interface. So make lookup for
that situation to be a hash lookup.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When we are only looking at one ifchannel, for inheritance, narrow
the search down to only the interface/ifchannel we are interested in
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When receiving a J/P packet, only check to see if we should
log when the J/P packet is not for us.
Very slight performance improvement additionally
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pim_upstream_join_timer_decrease_to_t_override passed in
a `struct in_addr` that in all cases was part of the
upstream data structure that was passed in already.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When on the RP we received a prune *,G for an established S,G
If join_desired is no longer true we need to prune and
reset some timers, in addition to removing the inherited
interface from the olist.
This was not happening because we were just removing
the inherited oif from the *,G.
Ticket: CM-14561
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Valgrind noticed that we have a read of uninitialized memory:
Conditional jump or move depends on uninitialised value(s)
==13749== at 0x428067: pim_ifassert_winner_set (pim_assert.c:57)
==13749== by 0x4266F0: pim_ifchannel_add (pim_ifchannel.c:535)
==13749== by 0x426CC1: pim_ifchannel_join_add (pim_ifchannel.c:730)
==13749== by 0x427B5B: recv_join (pim_join.c:95)
==13749== by 0x427B5B: pim_joinprune_recv (pim_join.c:270)
==13749== by 0x42354F: pim_pim_packet (pim_pim.c:249)
==13749== by 0x4236C0: pim_sock_read (pim_pim.c:349)
==13749== by 0x4E60587: thread_call (thread.c:1462)
==13749== by 0x40C75E: main (pim_main.c:266)
==13749==
This commit fixes that issue.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When we are creating the igmp ifchannel we were creating
it with both a P and a I flag. This was causing
it to not be cleaned up properly when the interface
was shut down. Subsuquently when the interface
came back up we would attempt to add it back in
but it would fail.
Ticket: CM-14586
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit does these three things:
1) Add code to 'show ip pim state' to show where OIF's got their
decision to include that interface
2) Add code in pim_mroute_[add|del] to display what we think we are
adding to the kernel
3) Add code to properly track where we got the incoming request from and
to appropriately not remove a OIL if we have state still
Ticket: CM-14034
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Chirag Shah <chirag@cumulusnetworks.com>
Bridges and bonds when ifdowned are removed from
the kernel in it's entirety, while pim assumed
that interfaces were kept around in some fashion.
Basically when we had an ifdown event, for all ifchannels
on that interface delete from the OIF. Also note
the fact that the vif has gone away and we need to
recreate it on the next ifup.
Ticket: CM-13896
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When we receive a new *,G ifchannel, handle the inherited_olist
for S,G mroutes in a place where it is more appropriate.
Ticket: CM-13892
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
So there exist conditions where we can start the Prune
Pending Timer and receive other packets that cause
us to not stop the pending timer. This was
due to a missread of the state machine.
Additionally when the prune pending timer pops and
we are not in prune pending state, note the fact
and move on with our life instead of crashing and burning
Ticket: CM-13851
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:
When receiving a JOIN/PRUNE message if we have trace
turned on we output this:
2016/11/28 17:11:46.368827 PIM: pim_socket_recvfromto: HAVE_IP_PKTINFO to=224.0.0.13,103
2016/11/28 17:11:46.368956 PIM: Recv PIM JOINPRUNE packet from 169.254.0.6 to 224.0.0.13 on swp31s1: ttl=255 pim_version=2 pim_msg_size=34 checksum=e623
2016/11/28 17:11:46.369003 PIM: pim_joinprune_recv: from 169.254.0.6 on swp31s1
2016/11/28 17:11:46.369053 PIM: recv_prune: prune (S,G)=(20.0.11.253,229.1.2.3) rpt=0 wc=0 upstream=169.254.0.5 holdtime=210 from 169.254.0.6 on swp31s1
2016/11/28 17:11:46.369099 PIM: nonlocal_upstream: recv prune (S,G)=(20.0.11.253,229.1.2.3) to local upstream=169.254.0.5 on swp31s1
Clean up the messaging to this:
2016/11/28 17:11:46.368956 PIM: Recv PIM JOINPRUNE packet from 169.254.0.6 to 224.0.0.13 on swp31s1: ttl=255 pim_version=2 pim_msg_size=34 checksum=e623
2016/11/28 17:11:46.369053 PIM: recv_prune: prune (S,G)=(20.0.11.253,229.1.2.3) rpt=0 wc=0 upstream=169.254.0.5 holdtime=210 from 169.254.0.6 on swp31s1
Ticket: CM-13752
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Debugs are extremely expensive currently. Let's
store 'struct prefix_sg sg' string format in
the ifchannel, upstream and msdp_sa structures.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Add some more code to handle the prune(S,G) with the
sptbit set. Turns this ifchannel into a (S,G,rpt).
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When leaving a channel, there exists a possibility
that we have not created the channel oil yet.
Ensure that we have channel oil before dereferencing
Ticket: CM-13522
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When we handle the thread arguments,
there is no need to assert. As that
if they are wrong, we are going down
shortly anyways.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
According to Figure 5( Downstream per-interface (S,G,rpt)
state when we receive a (*,G) we need to move (S,G,rpt)
children of the (*,G) into different states. This
implements that.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Don't delete the ifchannel if the expiry timer is still running.
We might need to add the prune pending timer as well? Not sure
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Add the ability for pim ifchannels *,G's to know their
corresponding S,G's. This will facilitate handling
S,G,rpt state information better.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This fix handles two issues:
1) Searching entire vrf_iflist to get per interface pim_ifchannel_list
2) Display of ifchannel information in pim not being ordered correctly.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When sending a join/prune send in the upstream pointer.
this will allow us to implement some of the other state
machines necessary.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Fix possible double free of upstream and in
addition add some debug code to help find
where the problem is coming from.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When outputting data about ifchannels due to debug
include the interface this is happening on.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
In some situations, the deletion of the ifchannel would
not ocurr if the last flag cleared was the assert flag.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When we have pim_mroute.c or pim_register.c create
the upstream state, only delete it then when
the KAT timer expires, else we will not have
the refcount right and we will do bad things.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When we do a RPF lookup return a path that we have
neighbors for in those cases where we need to have
a neighbor to pass along the SG state via a pim
join/prune message.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
mrib_nexthop_addr and rpf_addr should be 'struct prefix'
so that we can safely handle unnumbered data from a nexthop
lookup in zebra
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
If we receive a join for a upstream interface that hasn't
yet been added to pim for working under it, we never
go back and add the forwarding on when we get the
interface added to pim.
Ticket: CM-11800
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When we are a FHR, and the upstream state is in Prune or Prune Pending
allow the join because we know we want to forward traffic to the RP.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When we receive a (*,G) route decide if we
need to cause any output interfaces to be
added to any S,G route associated.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
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>
The PIMREG ifchannel state is an evolutionary dead-end.
I should not have introduced this code.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
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>
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>
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>
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>
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>
Allow pim to separate out the pim vif index from the ifindex.
This change will allow pim to work with up to 255(MAXVIFS)
interfaces, while also allowing the interface ifindex to
be whatever number it needs to be.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
When the kernel sends a NOCACHE message to
pim we were looking up the interface to
use for the incoming multicast packet
based upon the source. No need to do
that trust that the kernel has properly
identified it and use that.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Valgrind is reporting that pimd is using uninitialized
memory for comparisons. This commit addresses
the issues found there.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd is very chatty without any pim debugs turned on.
This commit fixes a bunch of the debugs to be protected
by appropriate pim debug statement.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Welcome pimd to the Quagga daemon zoo!
This is a merge of commit 77ae369 ("pimd: Log ifindex found for an
interface when zebra lib reports a new connected address."), with
the intermediate "reconnect" changes removed (c9adf00...d274381).
d274381 is replaced with b162ab7, which includes some changes. In
addition, 4 reconnect-related changes and 1 cosmetic one have been
bumped out.
The rebase command used to produce the branch that is merged here is:
git rebase --onto b162ab7 c9adf00 77ae369
Note that 3 patches had their author rewritten from
"Anonymous SR#108542 <>" (which is not a valid git author ID)
to: "Savannah SR#108542 <nbahr@atcorp.com>" (which is the e-mail address
listed in the associated Savannah ticket)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>