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