mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 03:16:18 +00:00
Update PPP after DNS api change
This commit is contained in:
parent
5e7b343d52
commit
25652254a5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user