diff --git a/CHANGELOG b/CHANGELOG index 40f13a1a..b3217826 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -564,6 +564,10 @@ HISTORY ++ Bug fixes: + 2008-01-09 Jonathan Larmour + * opt.h, ip.c: Rename IP_OPTIONS define to IP_OPTIONS_ALLOWED to avoid + conflict with Linux system headers. + 2008-01-06 Jonathan Larmour * dhcp.c: fix bug #19927: "DHCP NACK problem" by clearing any existing set IP address entirely on receiving a DHCPNAK, and restarting discovery. diff --git a/src/core/ipv4/ip.c b/src/core/ipv4/ip.c index c27eae0a..4b145309 100644 --- a/src/core/ipv4/ip.c +++ b/src/core/ipv4/ip.c @@ -357,7 +357,7 @@ ip_input(struct pbuf *p, struct netif *inp) #endif /* IP_REASSEMBLY */ } -#if IP_OPTIONS == 0 /* no support for IP options in the IP header? */ +#if IP_OPTIONS_ALLOWED == 0 /* no support for IP options in the IP header? */ #if LWIP_IGMP /* there is an extra "router alert" option in IGMP messages which we allow for but do not police */ @@ -365,7 +365,7 @@ ip_input(struct pbuf *p, struct netif *inp) #else if (iphdrlen > IP_HLEN) { #endif /* LWIP_IGMP */ - LWIP_DEBUGF(IP_DEBUG | 2, ("IP packet dropped since there were IP options (while IP_OPTIONS == 0).\n")); + LWIP_DEBUGF(IP_DEBUG | 2, ("IP packet dropped since there were IP options (while IP_OPTIONS_ALLOWED == 0).\n")); pbuf_free(p); IP_STATS_INC(ip.opterr); IP_STATS_INC(ip.drop); @@ -373,7 +373,7 @@ ip_input(struct pbuf *p, struct netif *inp) snmp_inc_ipinunknownprotos(); return ERR_OK; } -#endif /* IP_OPTIONS == 0 */ +#endif /* IP_OPTIONS_ALLOWED == 0 */ /* send to upper layers */ LWIP_DEBUGF(IP_DEBUG, ("ip_input: \n")); diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 461e6f35..a34cc27b 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -342,12 +342,12 @@ #endif /** - * IP_OPTIONS: Defines the behavior for IP options. - * IP_OPTIONS==0: All packets with IP options are dropped. - * IP_OPTIONS==1: IP options are allowed (but not parsed). + * IP_OPTIONS_ALLOWED: Defines the behavior for IP options. + * IP_OPTIONS_ALLOWED==0: All packets with IP options are dropped. + * IP_OPTIONS_ALLOWED==1: IP options are allowed (but not parsed). */ -#ifndef IP_OPTIONS -#define IP_OPTIONS 1 +#ifndef IP_OPTIONS_ALLOWED +#define IP_OPTIONS_ALLOWED 1 #endif /**