The variable maxival contains the maximum time in seconds between
successive unsolicited Router Advertisement messages; RFC6275 defines
the Advertisement Interval option as the time in milliseconds.
Therefore convert maxival to milliseconds when populating the
Advertisement Interval option.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
memset(&adv_interval, 0, sizeof(adv_interval));
adv_interval.nd_opt_adv_interval_type = ND_OPT_RTR_ADV_INTERVAL;
adv_interval.nd_opt_adv_interval_len = 1;
- adv_interval.nd_opt_adv_interval_ival = htonl(maxival);
+ adv_interval.nd_opt_adv_interval_ival = htonl(maxival*1000);
iov[IOV_RA_ADV_INTERVAL].iov_base = (char *)&adv_interval;
iov[IOV_RA_ADV_INTERVAL].iov_len = adv_interval.nd_opt_adv_interval_len * 8;