View | Details | Raw Unified | Return to bug 3915
Collapse All | Expand All

(-)zebra-0.94/ripd/rip_interface.c.mcast-leak (-2 / +12 lines)
Lines 309-316 rip_request_neighbor_all () Link Here
309
int
309
int
310
rip_multicast_join (struct interface *ifp, int sock)
310
rip_multicast_join (struct interface *ifp, int sock)
311
{
311
{
312
  struct rip_interface *ri;
312
  listnode cnode;
313
  listnode cnode;
313
314
315
  ri = ifp->info;
316
314
  if (if_is_up (ifp) && if_is_multicast (ifp))
317
  if (if_is_up (ifp) && if_is_multicast (ifp))
315
    {
318
    {
316
      if (IS_RIP_DEBUG_EVENT)
319
      if (IS_RIP_DEBUG_EVENT)
Lines 332-338 rip_multicast_join (struct interface *if Link Here
332
	  if (ipv4_multicast_join (sock, group, p->prefix, ifp->ifindex) < 0)
335
	  if (ipv4_multicast_join (sock, group, p->prefix, ifp->ifindex) < 0)
333
	    return -1;
336
	    return -1;
334
	  else
337
	  else
335
	    return 0;
338
	    {
339
	      ri->joined_multicast = 1;
340
	      return 0;
341
	    }
336
	}
342
	}
337
    }
343
    }
338
  return 0;
344
  return 0;
Lines 342-351 rip_multicast_join (struct interface *if Link Here
342
void
348
void
343
rip_multicast_leave (struct interface *ifp, int sock)
349
rip_multicast_leave (struct interface *ifp, int sock)
344
{
350
{
351
  struct rip_interface *ri;
345
  listnode cnode;
352
  listnode cnode;
346
353
347
  if (if_is_up (ifp) && if_is_multicast (ifp))
354
  ri = ifp->info;
355
356
  if (ri->joined_multicast)
348
    {
357
    {
358
      ri->joined_multicast = 0;
349
      if (IS_RIP_DEBUG_EVENT)
359
      if (IS_RIP_DEBUG_EVENT)
350
	zlog_info ("multicast leave from %s", ifp->name);
360
	zlog_info ("multicast leave from %s", ifp->name);
351
361
(-)zebra-0.94/ripd/ripd.h.mcast-leak (+3 lines)
Lines 226-231 struct rip_interface Link Here
226
  /* RIP is running on this interface. */
226
  /* RIP is running on this interface. */
227
  int running;
227
  int running;
228
228
229
  /* Joined to multicast group for this interface. */
230
  int joined_multicast;
231
229
  /* RIP version control. */
232
  /* RIP version control. */
230
  int ri_send;
233
  int ri_send;
231
  int ri_receive;
234
  int ri_receive;

Return to bug 3915