summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Pirko <jiri@resnulli.us>2013-10-07 16:09:53 +0200
committerJiri Pirko <jiri@resnulli.us>2013-10-07 16:39:18 +0200
commit41876d610802747316e2d05f2c48d80126e4c8ae (patch)
treeb007f7dafdbad419f59bd5376bb103e7aff2d603
parentc6642387d1a2dd0c1ee230c126b629477da3add6 (diff)
downloadlibndp-41876d610802747316e2d05f2c48d80126e4c8ae.tar.gz
libndp: fix processing for larger options
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
-rw-r--r--libndp/libndp.c4
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;