Squid 1.1.8 DNS lookup bug fixed!

From: Adrian Pavlykevych <pam@dont-contact.us>
Date: Sat, 15 Mar 1997 16:10:51 +0200 (EET)

Hi everybody,

I have found and fixed bug in dnsserver which have caused it to fail
Name->IP resolution. Diff for dnsserver.c is attached.

Descrption:

While detecting whenever dnsserver got IP address or host name as input,
result of function inet_addr() - signed integer (inet_addr returns -1 when
IP address is invalid), was compared to unsigned integer variable
inaddr_none. Test failed every time and dnsserver has been treating any
input as IP address.

BTW, there should be such constant declared in system in netinet/in.h,
why to use new variable?

Best regards,

                Adrian Pavlykevych
                System Administrator
                Lviv State University "Lvivska Polytechnica"

*** dnsserver.c Sat Mar 15 15:55:50 1997
--- dnsserver.c.old Sat Mar 15 15:55:22 1997
***************
*** 227,233 ****
  #endif /* _SQUID_NEXT_ */
  
  static int do_debug = 0;
! static unsigned int inaddr_none;
  
  /* error messages from gethostbyname() */
  static char *
--- 227,233 ----
  #endif /* _SQUID_NEXT_ */
  
  static int do_debug = 0;
! static int inaddr_none;
  
  /* error messages from gethostbyname() */
  static char *
Received on Sat Mar 15 1997 - 08:50:00 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:34:42 MST