summaryrefslogtreecommitdiff
path: root/accel-pptpd/ppp/lcp_opt_mru.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pptpd/ppp/lcp_opt_mru.c')
-rw-r--r--accel-pptpd/ppp/lcp_opt_mru.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/accel-pptpd/ppp/lcp_opt_mru.c b/accel-pptpd/ppp/lcp_opt_mru.c
index f13b014..096c0d5 100644
--- a/accel-pptpd/ppp/lcp_opt_mru.c
+++ b/accel-pptpd/ppp/lcp_opt_mru.c
@@ -86,6 +86,9 @@ static int mru_recv_conf_req(struct ppp_lcp_t *lcp, struct lcp_option_t *opt, ui
struct mru_option_t *mru_opt = container_of(opt,typeof(*mru_opt),opt);
struct lcp_opt16_t *opt16 = (struct lcp_opt16_t*)ptr;
+ if (!ptr)
+ return LCP_OPT_NAK;
+
if (ntohs(opt16->val) < conf_min_mtu || ntohs(opt16->val) > lcp->ppp->ctrl->max_mtu)
return LCP_OPT_NAK;