Lines 339-344
Link Here
|
339 |
|
339 |
|
340 |
nd_ra = (struct nd_router_advert *)icp; |
340 |
nd_ra = (struct nd_router_advert *)icp; |
341 |
|
341 |
|
|
|
342 |
#define RABOTH (ND_RA_FLAG_OTHER|ND_RA_FLAG_MANAGED) |
343 |
/* |
344 |
* Having both O and M set is undefined. |
345 |
*/ |
346 |
if ((nd_ra->nd_ra_flags_reserved & RABOTH) == RABOTH) { |
347 |
warnmsg(LOG_INFO, __func__, |
348 |
"received RA from %s on IF(%s) with O and M set", |
349 |
inet_ntop(AF_INET6, &from.sin6_addr, ntopbuf, |
350 |
INET6_ADDRSTRLEN), |
351 |
if_indextoname(pi->ipi6_ifindex, ifnamebuf)); |
352 |
return; |
353 |
} |
354 |
|
342 |
/* |
355 |
/* |
343 |
* Process the "O bit." |
356 |
* Process the "O bit." |
344 |
* If the value of OtherConfigFlag changes from FALSE to TRUE, the |
357 |
* If the value of OtherConfigFlag changes from FALSE to TRUE, the |
Lines 346-357
Link Here
|
346 |
* requesting information. |
359 |
* requesting information. |
347 |
* [RFC 2462 Section 5.5.3] |
360 |
* [RFC 2462 Section 5.5.3] |
348 |
*/ |
361 |
*/ |
349 |
if (((nd_ra->nd_ra_flags_reserved) & ND_RA_FLAG_OTHER) && |
362 |
if ((nd_ra->nd_ra_flags_reserved) & ND_RA_FLAG_OTHER) { |
350 |
!ifi->otherconfig) { |
363 |
if (ifi->managedconfig) |
351 |
warnmsg(LOG_DEBUG, __func__, |
364 |
warnmsg(LOG_DEBUG, __func__, |
352 |
"OtherConfigFlag on %s is turned on", ifi->ifname); |
365 |
"ManagedConfigFlag on %s already turned on", |
353 |
ifi->otherconfig = 1; |
366 |
ifi->ifname); |
354 |
call_script(otherconf_script, ifi->ifname); |
367 |
else if (!ifi->otherconfig) { |
|
|
368 |
warnmsg(LOG_DEBUG, __func__, |
369 |
"OtherConfigFlag on %s is turned on", |
370 |
ifi->ifname); |
371 |
ifi->otherconfig = 1; |
372 |
call_script(otherconf_script, ifi->ifname); |
373 |
} |
374 |
} |
375 |
|
376 |
/* |
377 |
* Process the "M bit." |
378 |
*/ |
379 |
if (nd_ra->nd_ra_flags_reserved & ND_RA_FLAG_MANAGED) { |
380 |
if (ifi->otherconfig) |
381 |
warnmsg(LOG_DEBUG, __func__, |
382 |
"OtherConfigFlag on %s already turned on", |
383 |
ifi->ifname); |
384 |
else if (!ifi->managedconfig) { |
385 |
warnmsg(LOG_DEBUG, __func__, |
386 |
"ManagedConfigFlag on %s is turned on", |
387 |
ifi->ifname); |
388 |
ifi->managedconfig = 1; |
389 |
call_script(managed_script, ifi->ifname); |
390 |
} |
355 |
} |
391 |
} |
356 |
|
392 |
|
357 |
ifi->racnt++; |
393 |
ifi->racnt++; |