aboutsummaryrefslogtreecommitdiffstats
path: root/ggsn/ggsn.c
diff options
context:
space:
mode:
Diffstat (limited to 'ggsn/ggsn.c')
-rw-r--r--ggsn/ggsn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ggsn/ggsn.c b/ggsn/ggsn.c
index 72bf61c..3a8c4be 100644
--- a/ggsn/ggsn.c
+++ b/ggsn/ggsn.c
@@ -418,7 +418,7 @@ static struct ipcp_option_hdr *ipcp_contains_option(struct ipcp_hdr *ipcp, enum
uint8_t *cur = ipcp->options;
/* iterate over Options and check if protocol contained */
- while (cur + 2 <= ((uint8_t *)ipcp) + ipcp->len) {
+ while (cur + 2 <= ((uint8_t *)ipcp) + ntohs(ipcp->len)) {
struct ipcp_option_hdr *cur_opt = (struct ipcp_option_hdr *) cur;
if (cur_opt->type == opt)
return cur_opt;