|
Lines 302-307
Link Here
|
| 302 |
send_ra(sock, iface, NULL); |
302 |
send_ra(sock, iface, NULL); |
| 303 |
|
303 |
|
| 304 |
next = rand_between(iface->MinRtrAdvInterval, iface->MaxRtrAdvInterval); |
304 |
next = rand_between(iface->MinRtrAdvInterval, iface->MaxRtrAdvInterval); |
|
|
305 |
if (iface->InitialAdvLeft > 1) { |
| 306 |
--iface->InitialAdvLeft; |
| 307 |
if (next > MAX_INITIAL_RTR_ADVERT_INTERVAL) |
| 308 |
next = MAX_INITIAL_RTR_ADVERT_INTERVAL; |
| 309 |
} |
| 310 |
|
| 305 |
set_timer(&iface->tm, next); |
311 |
set_timer(&iface->tm, next); |
| 306 |
} |
312 |
} |
| 307 |
|
313 |
|
|
Lines 339-347
Link Here
|
| 339 |
if (iface->AdvSendAdvert) |
345 |
if (iface->AdvSendAdvert) |
| 340 |
{ |
346 |
{ |
| 341 |
/* send an initial advertisement */ |
347 |
/* send an initial advertisement */ |
|
|
348 |
iface->InitialAdvLeft = MAX_INITIAL_RTR_ADVERTISEMENTS - 1; |
| 342 |
send_ra(sock, iface, NULL); |
349 |
send_ra(sock, iface, NULL); |
| 343 |
|
350 |
|
| 344 |
set_timer(&iface->tm, iface->MaxRtrAdvInterval); |
351 |
set_timer(&iface->tm, iface->MaxRtrAdvInterval > MAX_INITIAL_RTR_ADVERT_INTERVAL ? |
|
|
352 |
MAX_INITIAL_RTR_ADVERT_INTERVAL : iface->MaxRtrAdvInterval); |
| 345 |
} |
353 |
} |
| 346 |
} |
354 |
} |
| 347 |
} |
355 |
} |