mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-30 12:32:37 +00:00
* opt.h, ip.c: Rename IP_OPTIONS define to IP_OPTIONS_ALLOWED to avoid
conflict with Linux system headers.
This commit is contained in:
parent
de4b9b584c
commit
b333b7c9dc
@ -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.
|
||||
|
@ -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"));
|
||||
|
@ -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
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user