[syslinux:lwip] lwip: Allow clearing a dns server

syslinux-bot for H. Peter Anvin hpa at zytor.com
Fri Apr 22 20:05:40 PDT 2011


Commit-ID:  c666a9847ca43806f7096828d00489d514d866ee
Gitweb:     http://syslinux.zytor.com/commit/c666a9847ca43806f7096828d00489d514d866ee
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Wed, 16 Sep 2009 17:48:26 -0700
Committer:  Eric W. Biederman <ebiederm at xmission.com>
CommitDate: Tue, 12 Apr 2011 14:40:52 -0700

lwip: Allow clearing a dns server

  /*
   * hpa: the lwip code has the dnsserver->addr != 0 test, but that would
   * seem to indicate that there is no way to cancel a previously given
   * DNS server...
   */

Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 core/lwip/src/core/dns.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/core/lwip/src/core/dns.c b/core/lwip/src/core/dns.c
index b955538..4021d1d 100644
--- a/core/lwip/src/core/dns.c
+++ b/core/lwip/src/core/dns.c
@@ -292,8 +292,13 @@ dns_init()
 void
 dns_setserver(u8_t numdns, struct ip_addr *dnsserver)
 {
+  /*
+   * hpa: the lwip code has the dnsserver->addr != 0 test, but that would
+   * seem to indicate that there is no way to cancel a previously given
+   * DNS server...
+   */
   if ((numdns < DNS_MAX_SERVERS) && (dns_pcb != NULL) &&
-      (dnsserver != NULL) && (dnsserver->addr !=0 )) {
+      (dnsserver != NULL) /* && (dnsserver->addr !=0) */) {
     dns_servers[numdns] = (*dnsserver);
   }
 }



More information about the Syslinux-commits mailing list