summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gatchat/ppp_lcp.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c
index 81182ba1..3faf3ac7 100644
--- a/gatchat/ppp_lcp.c
+++ b/gatchat/ppp_lcp.c
@@ -105,10 +105,19 @@ static guint lcp_option_scan(struct pppcp_data *pppcp,
case ACCM:
case AUTH_PROTO:
/* XXX check to make sure it's a proto we recognize */
- case MAGIC_NUMBER:
case PFC:
case ACFC:
return OPTION_ACCEPT;
+
+ case MAGIC_NUMBER:
+ {
+ guint32 magic = get_host_long(option->data);
+
+ if (magic == 0)
+ return OPTION_REJECT;
+
+ return OPTION_ACCEPT;
+ }
}
return OPTION_REJECT;