diff options
author | Jiri Pirko <jiri@resnulli.us> | 2013-10-07 16:09:53 +0200 |
---|---|---|
committer | Jiri Pirko <jiri@resnulli.us> | 2013-10-07 16:39:18 +0200 |
commit | 41876d610802747316e2d05f2c48d80126e4c8ae (patch) | |
tree | b007f7dafdbad419f59bd5376bb103e7aff2d603 /libndp/libndp.c | |
parent | c6642387d1a2dd0c1ee230c126b629477da3add6 (diff) | |
download | libndp-41876d610802747316e2d05f2c48d80126e4c8ae.tar.gz |
libndp: fix processing for larger options
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Diffstat (limited to 'libndp/libndp.c')
-rw-r--r-- | libndp/libndp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libndp/libndp.c b/libndp/libndp.c index 09ec2aa..73acbd8 100644 --- a/libndp/libndp.c +++ b/libndp/libndp.c @@ -1066,7 +1066,7 @@ int ndp_msg_next_opt_offset(struct ndp_msg *msg, int offset, len -= offset; while (len > 0) { uint8_t cur_opt_raw_type = ptr[0]; - uint8_t cur_opt_len = ptr[1] << 3; /* convert to bytes */ + unsigned int cur_opt_len = ptr[1] << 3; /* convert to bytes */ if (!cur_opt_len || len < cur_opt_len) break; @@ -1093,7 +1093,7 @@ static void ndp_msg_check_opts(struct ndp_msg *msg) while (len > 0) { uint8_t cur_opt_raw_type = ptr[0]; - uint8_t cur_opt_len = ptr[1] << 3; /* convert to bytes */ + unsigned int cur_opt_len = ptr[1] << 3; /* convert to bytes */ if (!cur_opt_len || len < cur_opt_len) break; |