summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
a2d8bf6)
Limit the maximum ra_retranstime value to 60000 milliseconds as
described in RFC7048.
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
- if ((c = tb[IFACE_ATTR_RA_RETRANSTIME]))
+ if ((c = tb[IFACE_ATTR_RA_RETRANSTIME])) {
iface->ra_retranstime = blobmsg_get_u32(c);
iface->ra_retranstime = blobmsg_get_u32(c);
+ if (iface->ra_retranstime > 60000)
+ goto err;
+ }
if ((c = tb[IFACE_ATTR_RA_HOPLIMIT])) {
iface->ra_hoplimit = blobmsg_get_u32(c);
if ((c = tb[IFACE_ATTR_RA_HOPLIMIT])) {
iface->ra_hoplimit = blobmsg_get_u32(c);