diff options
author | Denis Kenzior <denkenz@gmail.com> | 2010-06-29 11:55:18 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-06-29 11:55:18 -0500 |
commit | 674625ebe212d2603f57268f7c38c387db3555c9 (patch) | |
tree | 9774d918bfe212dcdf00613828baf6946ad65f1e /gatchat | |
parent | 820b1f55c8f9e615ef860327ef58a54006ec8822 (diff) |
ppp: Don't accept 0 ip-addr/dns1/dns2
Diffstat (limited to 'gatchat')
-rw-r--r-- | gatchat/ppp_ipcp.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gatchat/ppp_ipcp.c b/gatchat/ppp_ipcp.c index f3456070..d64bdedd 100644 --- a/gatchat/ppp_ipcp.c +++ b/gatchat/ppp_ipcp.c @@ -330,19 +330,20 @@ static enum rcr_result ipcp_server_rcr(struct ipcp_data *ipcp, case IP_ADDRESS: memcpy(&addr, data, 4); - FILL_IP(nak_options, addr != ipcp->peer_addr, + FILL_IP(nak_options, + addr != ipcp->peer_addr || addr == 0, type, &ipcp->peer_addr); break; case PRIMARY_DNS_SERVER: memcpy(&addr, data, 4); - FILL_IP(nak_options, addr != ipcp->dns1, + FILL_IP(nak_options, addr != ipcp->dns1 || addr == 0, type, &ipcp->dns1); break; case SECONDARY_DNS_SERVER: memcpy(&addr, data, 4); - FILL_IP(nak_options, addr != ipcp->dns2, + FILL_IP(nak_options, addr != ipcp->dns2 || addr == 0, type, &ipcp->dns2); break; default: |