diff --git a/CHANGELOG b/CHANGELOG index c2149e8a..c97554f5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -41,6 +41,10 @@ HISTORY * api_lib.c: Use memcpy in netbuf_copy_partial. ++ Bug fixes: + + 2007-03-06 Frédéric Bernon, Dmitry Potapov + * tcpip.c, ip_frag.c, ethernetif.c: Fix some build problems, and a redundancy + call to "lwip_stats.link.recv++;" in low_level_input() & ethernetif_input(). 2007-03-06 Simon Goldschmidt * ip_frag.c, ip_frag.h: Reduce code size: don't include code in those files diff --git a/src/api/tcpip.c b/src/api/tcpip.c index 972989bf..7c0f8d24 100644 --- a/src/api/tcpip.c +++ b/src/api/tcpip.c @@ -110,11 +110,7 @@ ethernet_input(struct pbuf *p, struct netif *netif) /* points to packet payload, which starts with an Ethernet header */ ethhdr = p->payload; - -#if LINK_STATS - lwip_stats.link.recv++; -#endif /* LINK_STATS */ - + switch (htons(ethhdr->type)) { /* IP packet? */ case ETHTYPE_IP: diff --git a/src/core/ipv4/ip_frag.c b/src/core/ipv4/ip_frag.c index 94ec8e2c..659bc8cc 100644 --- a/src/core/ipv4/ip_frag.c +++ b/src/core/ipv4/ip_frag.c @@ -37,8 +37,6 @@ * */ -#if (IP_FRAG || IP_REASSEMBLY) - #include #include "lwip/opt.h" @@ -48,6 +46,8 @@ #include "lwip/snmp.h" #include "lwip/stats.h" +#if (IP_FRAG || IP_REASSEMBLY) + static u8_t ip_reassbuf[IP_HLEN + IP_REASS_BUFSIZE]; static u8_t ip_reassbitmap[IP_REASS_BUFSIZE / (8 * 8) + 1]; static const u8_t bitmap_bits[8] = { 0xff, 0x7f, 0x3f, 0x1f, diff --git a/src/netif/ethernetif.c b/src/netif/ethernetif.c index 8fb6dbf5..ef196b75 100644 --- a/src/netif/ethernetif.c +++ b/src/netif/ethernetif.c @@ -168,7 +168,7 @@ low_level_input(struct netif *netif) acknowledge that packet has been read(); #if ETH_PAD_SIZE - pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */ + pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */ #endif #if LINK_STATS @@ -229,13 +229,7 @@ ethernetif_input(struct netif *netif) if (p == NULL) return; /* points to packet payload, which starts with an Ethernet header */ ethhdr = p->payload; - -#if LINK_STATS - lwip_stats.link.recv++; -#endif /* LINK_STATS */ - - ethhdr = p->payload; - + switch (htons(ethhdr->type)) { #if ETHARP_TCPIP_ETHINPUT