Update PPP after DNS api change

This commit is contained in:
Erik Ekman 2016-06-13 10:35:27 +02:00
parent 5e7b343d52
commit 25652254a5

View File

@ -1122,17 +1122,18 @@ int sdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2) {
* cdns - Clear the DNS servers
*/
int cdns(ppp_pcb *pcb, u32_t ns1, u32_t ns2) {
ip_addr_t nsa, nsb;
const ip_addr_t *nsa;
ip_addr_t nsb;
LWIP_UNUSED_ARG(pcb);
nsa = dns_getserver(0);
ip_addr_set_ip4_u32(&nsb, ns1);
if (ip_addr_cmp(&nsa, &nsb)) {
if (ip_addr_cmp(nsa, &nsb)) {
dns_setserver(0, IP_ADDR_ANY);
}
nsa = dns_getserver(1);
ip_addr_set_ip4_u32(&nsb, ns2);
if (ip_addr_cmp(&nsa, &nsb)) {
if (ip_addr_cmp(nsa, &nsb)) {
dns_setserver(1, IP_ADDR_ANY);
}
return 1;