X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fodhcpd.git;a=blobdiff_plain;f=src%2Frouter.h;h=5b5f4d71a5a0ffb29a0e8b86a0043c384253d80e;hp=8d74967ab90b24d1c3bba2a09f8925566adbd8bc;hb=0b45fce0859e4726e27f408016ef2f7d210c847f;hpb=5df476f99b3254bfc26721452b17a5fc23e7142c diff --git a/src/router.h b/src/router.h index 8d74967..5b5f4d7 100644 --- a/src/router.h +++ b/src/router.h @@ -20,30 +20,18 @@ struct icmpv6_opt { uint8_t type; uint8_t len; + uint8_t data[6]; }; -struct nd_opt_slla { - uint8_t type; - uint8_t len; - uint8_t addr[6]; -}; - -struct nd_opt_recursive_dns { - uint8_t type; - uint8_t len; - uint8_t pad; - uint8_t pad2; - uint32_t lifetime; -}; #define icmpv6_for_each_option(opt, start, end)\ for (opt = (struct icmpv6_opt*)(start);\ - (void*)(opt + (opt->len << 3)) <= (void*)(end); opt += (opt->len << 3)) + (void*)(opt + 1) <= (void*)(end) && opt->len > 0 &&\ + (void*)(opt + opt->len) <= (void*)(end); opt += opt->len) + -#define MaxRtrAdvInterval 600 -#define MinRtrAdvInterval (MaxRtrAdvInterval / 3) -#define MaxValidTime 7200 -#define MaxPreferredTime (3 * MaxRtrAdvInterval) +#define MaxValidTime 65535 +#define MaxRtrAdvInterval 1800 #define ND_RA_FLAG_PROXY 0x4 #define ND_RA_PREF_HIGH (1 << 3)