summaryrefslogtreecommitdiffstats
path: root/pimd (follow)
Commit message (Collapse)AuthorAgeFilesLines
* build: get rid of INCLUDES, use AM_CPPFLAGSDavid Lamparter2016-06-031-1/+1
| | | | | | | | | | | | | INCLUDES in configure.ac was not used at all, and INCLUDES in Makefile.am is supposed to be AM_CPPFLAGS these days. Reduces warnings spewed during bootstrap/autoreconf. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Greg Troxel <gdt@ir.bbn.com> Acked-by: Feng Lu <lu.feng@6wind.com> Acked-by: Paul Jakma <paul@jakma.org> (cherry picked from commit 237aac56960575f6ad2451ba2796d94bd5ae4b33)
* pimd: Fix compiler warning in pim_mroute.cDonald Sharp2016-06-031-2/+2
| | | | | | Another compiler another warning. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add support for displaying ip mrouteDonald Sharp2016-06-013-0/+37
| | | | | | | | | | | When you enter a static mroute under an interface the 'show run' is not displaying this information. Add code to allow this. Ticket: CM-11257 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
* pim: Fix 'no ip pim sm'Donald Sharp2016-06-012-3/+4
| | | | | | | The 'no ip pim sm' command was not being accepted. Additionally fix the help output Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Allow command zclient to find it's dataDonald Sharp2016-06-011-28/+25
| | | | | | | | | | | | | | | | | | | pim has two zclient sockets to zebra. One is used exclusively to do mrib lookups. The other is to do the normal day to day communication between pim and zebra. With the change to the zebra api to send up all data to all sockets this caused the mrib lookup socket to accumulate data in between mrib lookups. So if at some point in time we get upcoming data but no mrib lookups modify the code to find the mrib lookup it is looking for. Long term we need to figure something else out but this change will get us moving forward again. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
* lib: Fix vrf_id_t data typeDonald Sharp2016-05-271-2/+2
| | | | | | | | We were reading a u_int16_t for vrf_id_t. While technically the same thing, I'd like to make sure we think about vrf_id_t's as vrf_id_t's. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fixup some clang compiler warningsDonald Sharp2016-05-272-2/+2
| | | | | | | clang run on a fairly recent fedora complains about some code. Fixup the warnings. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add ability to safely ignore route-mapsDonald Sharp2016-05-274-1/+40
| | | | | | | | | | pim was not parsing route-map code and causing issues using vtysh because of this. Add code to safely ignore the route-map code and set us up for future expansion into route-maps if neeeded. Ticket: CM-11219 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Double read of streamDonald Sharp2016-05-271-9/+0
| | | | | | | | | | | The addition of the zclient_read_header call reads the entirety of the stream for you and makes sure it's consistent with the header. When the function call was added it read the stream data in zclient_read_header and then reread the data after that. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Forgot to add the vrf_init callDonald Sharp2016-05-272-0/+8
| | | | | | | | | | | | Forward port of vrf code didn't have the pimd code. So when it was forward ported we lost the vrf_init. Now that we have pimd let's add it back in. Additionally forward port lost the additional zclient->zebra_connect call. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* quagga: Additional centos 6 -enable-werror fixesDonald Sharp2016-05-261-10/+12
| | | | | | | | | | | This commit fixes these warnings: 1) bgpd/bgp_nexthop.c - dereferencing pointer 'X' does break strict-aliasing rules 2) pimd/pim_igmp_join.c - dereferencing pointer 'X' does break strict-aliasing rules 3) ripd/ripd.c - 'ifaddr.prefixlen' may be used uninitialized in this function Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> (cherry picked from commit 26a18eb223d26011ac4f1d608f6775ed7ebf8efb)
* pimd: Fix some static analysisDonald Sharp2016-05-261-2/+2
| | | | | | Using && instead of &. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* build: Remove the old PIC/PIE patch, let libtool sort it outPaul Jakma2016-05-261-2/+1
| | | | | | | * Remove the old change from '08 to add in PIE arguments at automake level. Versions of libtool since then know how to deal with -fpie and do the right thing according to whether its building shared or executable objects. So just pass '-fpie' as CFLAG and let libtool do its thing.
* pimd: Clean up some more compile warningsDonald Sharp2016-05-263-7/+7
| | | | | | | Turns out we were missing $(WERROR) for compiling pimd so we were not catching compile warning issues. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix SPT bit initial settingDonald Sharp2016-05-261-1/+1
| | | | | | The initial setting of the SPT bit was incorrect. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix pim_upstream_find to match on INADDR_ANY for sourceDonald Sharp2016-05-261-5/+5
| | | | | | Fix the pim_upstream_find code to match on INADDR_ANY for source. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Pimd: pim register send is being sent and received at the RPDonald Sharp2016-05-263-3/+51
| | | | | | | | Modify the code to send a register packet upstream to the RP. Packet is currently being received but not properly decoded currently. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Modify NOCACHE code to create (S,G) routeDonald Sharp2016-05-261-18/+42
| | | | | | | | The code was hard-coding the (S,G) route to get the multicast packet up into pimd. This code fixes this issue. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Create special pimreg interfaceDonald Sharp2016-05-264-8/+27
| | | | | | | | | | | | The linux kernel wants a pimreg vif device. The pimd code wants a 'struct interface *' for anything it works with. Since the pimreg vif device is not a real linux device that zebra knows about. Cheat by creating a pimreg interface pointer and setup the code to properly be able to handle the registration of the vif device. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix some file inclusion issues.Donald Sharp2016-05-262-0/+2
| | | | Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Move add_oif into pim_oil.cDonald Sharp2016-05-266-152/+167
| | | | | | | | This commit does two things: (A) Sets up #defines for the pimreg to be used in pim_mroute.c (B) Moves add_oif into pim_oil.c where it belongs Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add New Source type for where a (S,G) mroute is learnedDonald Sharp2016-05-262-4/+17
| | | | | | | | | Add Source type for (S,G) mroute. This will allow us to know that a (S,G) route came from an actual Source( ie the kernel called us back with information about a multicast packet it received with no mroute for it ). Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Convert the RP(G) code to return a struct pim_rpfDonald Sharp2016-05-264-8/+11
| | | | | | This will facilitate sending packets to the right spot Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Modify the RP data structure.Donald Sharp2016-05-267-21/+41
| | | | | | Modify the RP data structure to know how to get to it from here. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Move I_am_DR macro to more appropriate placeDonald Sharp2016-05-263-4/+6
| | | | | | | Move the I_am_DR(ifp) outside of pim_macro.c and into pim_iface.h where it belongs. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add some code to intelligently handle WHOLEPKT generationDonald Sharp2016-05-263-3/+26
| | | | | | | | | When we get a NOCACHE call from the kernel, there is no point generating a mcast route for the packet if there is no RP configured, or if PIM-SSM is configured on the interface. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add some debug code to unknown packet upcallsDonald Sharp2016-05-261-2/+5
| | | | | | | | When receiving data from the kernel from the kernel socket, some calls that are received are not known what they are. Provide some more debug code to handle appropriately Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fixup some broken code for the register receiveDonald Sharp2016-05-261-9/+11
| | | | | | Some of the register receive code was broken. This fixes that Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Cleanup some comments and documentationDonald Sharp2016-05-262-2/+1
| | | | | | | | Starting the transition of PIM-SSM to PIM-SM means that we have to cleanup some internal code comments so that the code will match the comments. Signed-off-by: Donald Sharp<sharpd@cumulusnetworks.com
* pimd: Start handling of pim REGISTER packet typeDonald Sharp2016-05-263-19/+84
| | | | | | | This code starts the handling of the pim register type. No guarantees that it works correctly, just that it compiles and the start of the code is in there. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Cause NOCACHE event to create WHOLEPKT events for pimdDonald Sharp2016-05-261-0/+14
| | | | | | | | | pimd needs the ability to send the multicast packet to the RP. This code causes the incoming unknown multicast packet to be send to pimd so it can be sent as a REGISTER packet towards the RP. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix nexthop resolution breakageDonald Sharp2016-05-261-14/+18
| | | | | | Nexthop resolution was broken due to some ill placed debug statements. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fixup kernel callbacks to handle them betterDonald Sharp2016-05-261-107/+141
| | | | | | | | | | | This patch sets up the handling of the 3 basic kernel callbacks: IGMPMSG_WRONGVIF - When a multicast message comes in the wrong vif IGMPMSG_NOCACHE - There is no multicast route associated with a received(S,G) IGMPMSG_WHOLEPKT - There is no outgoing interface for a packet. The code's debugs are cleaned up to be covered by debug statements Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Register with kernel to get unknown multicast packetsDonald Sharp2016-05-264-6/+9
| | | | | | | Start the process of creating the pimreg vif device so that we can get the callbacks from the kernel with the multicast packets Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: SwitchToSptDesired additionDonald Sharp2016-05-262-2/+39
| | | | | | Add code to tell us if we want to switch to a SPT for the (S,G) Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com
* pimd: Add code to start the KAT(S,G) as neededDonald Sharp2016-05-264-0/+55
| | | | | | | | | | The KAT(S,G) timer can now be started and on expiry the timer clears the PMBR(S,G). More work needs to be done for when this timer pops, but good enough of a start now. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Create some infrastructure code for RST(S,G) and KAT(S,G)Donald Sharp2016-05-264-3/+24
| | | | | | | | These two timers have some default values. Create the default defines to be used and start setting up the data structures for them. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Start work for handling of register commandDonald Sharp2016-05-263-2/+230
| | | | | | Start the coding of the REGISTER receive and send. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Check to see if we are the RPDonald Sharp2016-05-261-0/+5
| | | | | | | Add code to allow on interface up/down events the check of whether or not this process is the RP. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add SPTbit(S,G) supportDonald Sharp2016-05-264-4/+15
| | | | | | | Add code to allow pimd to store the SPTbit as needed and to properly test against it. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Start adding the ability to handle the Bridge RouterDonald Sharp2016-05-263-2/+129
| | | | | | | Add code to allow the check and set the PMBR(S,G) if the register.borderbit is set. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add code to get RP(G)Donald Sharp2016-05-262-0/+17
| | | | | | Add code to figure out who the RP is for group G. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Add RP check codeDonald Sharp2016-05-262-0/+50
| | | | | | | Add the ability for the node to determine if it is the RP or not. Currently this only allows static RP's. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Receive and transmit (*,G) to the RPDonald Sharp2016-05-267-8/+104
| | | | | | | Receive a (*,G) route and send it upstream to the RP. The RP at this time does not properly handle the route. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix test_igmp_join code to handle thread_master * changesDonald Sharp2016-05-262-0/+3
| | | | | | Fixup of pimd to be cognizant of thread_master pointer changes Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* Implement "ip pim rp X.Y.Z.A" and "ip pim sm" commandsDonald Sharp2016-05-265-21/+134
| | | | | | | Allow the user to specify the static Rendevous point as well as specifying that an interface is Sparse Mode. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Limit pim hello log messagesDonald Sharp2016-05-263-80/+89
| | | | | | | | pimd was outputting allot of data surrounding pim hello packets. In addition the debugging was inconsistent and not all turned on via 'debug pim packet hello'. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Fix size_t zlog_err format string warningPaul Jakma2016-05-261-1/+1
| | | | * fc1c114aa / "pimd: Fix warning", the size_t arg should have a %zu format.
* pimd: Cleanup interface startupDonald Sharp2016-05-262-55/+18
| | | | | | | This patch cleans up some interface startup, removes duplicate debug messages and protects against some always being displayed. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
* pimd: Notice when we receive a packet type we can't handle yetDonald Sharp2016-05-261-0/+14
| | | | | | | There are PIM packet types that have not been implemented yet. Notice when we get one of those and safely do nothing. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>