summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhduffddybz <[email protected]>2014-08-30 10:56:56 +0800
committerhduffddybz <[email protected]>2014-08-30 10:59:33 +0800
commitc9aba13f40a62f4f950b1e53a4250cc629c085f6 (patch)
tree23ca4cc1839e1db2cc2076d77ade2bbf89e1e011
parent69d089cac0849222190b63ba7eef97bb2a72663b (diff)
update lwip git head
-rw-r--r--components/net/lwip-head/CHANGELOG4
-rw-r--r--components/net/lwip-head/src/core/init.c2
-rw-r--r--components/net/lwip-head/src/include/lwip/netif.h7
-rw-r--r--components/net/lwip-head/src/include/lwip/opt.h2
-rw-r--r--components/net/lwip-head/test/unit/dhcp/test_dhcp.c9
5 files changed, 15 insertions, 9 deletions
diff --git a/components/net/lwip-head/CHANGELOG b/components/net/lwip-head/CHANGELOG
index 32ca51a5e7..b2a735ce5a 100644
--- a/components/net/lwip-head/CHANGELOG
+++ b/components/net/lwip-head/CHANGELOG
@@ -6,6 +6,10 @@ HISTORY
++ New features:
+ 2013-08-19: Simon Goldschmidt
+ * netif.h: bug #42998: made NETIF_MAX_HWADDR_LEN overridable for some special
+ networks
+
2013-03-17: Simon Goldschmidt (patch by Ghobad Emadi)
* opt.h, etharp.c: Added LWIP_HOOK_ETHARP_GET_GW to implement IPv4 routing with
multiple gateways
diff --git a/components/net/lwip-head/src/core/init.c b/components/net/lwip-head/src/core/init.c
index a9bf679722..cfd7ff5aae 100644
--- a/components/net/lwip-head/src/core/init.c
+++ b/components/net/lwip-head/src/core/init.c
@@ -106,7 +106,7 @@
#error "If you want to use Sequential API, you have to define MEMP_NUM_TCPIP_MSG_API>=1 in your lwipopts.h"
#endif
/* There must be sufficient timeouts, taking into account requirements of the subsystems. */
-#if (LWIP_TIMERS && (MEMP_NUM_SYS_TIMEOUT < (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_SUPPORT + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0))))
+#if LWIP_TIMERS && (MEMP_NUM_SYS_TIMEOUT < (LWIP_TCP + IP_REASSEMBLY + LWIP_ARP + (2*LWIP_DHCP) + LWIP_AUTOIP + LWIP_IGMP + LWIP_DNS + PPP_SUPPORT + (LWIP_IPV6 ? (1 + LWIP_IPV6_REASS + LWIP_IPV6_MLD) : 0)))
#error "MEMP_NUM_SYS_TIMEOUT is too low to accomodate all required timeouts"
#endif
#if (IP_REASSEMBLY && (MEMP_NUM_REASSDATA > IP_REASS_MAX_PBUFS))
diff --git a/components/net/lwip-head/src/include/lwip/netif.h b/components/net/lwip-head/src/include/lwip/netif.h
index 8a9a9a3a0f..5c7bf164c3 100644
--- a/components/net/lwip-head/src/include/lwip/netif.h
+++ b/components/net/lwip-head/src/include/lwip/netif.h
@@ -60,9 +60,12 @@ extern "C" {
/* Throughout this file, IP addresses are expected to be in
* the same byte order as in IP_PCB. */
-/** must be the maximum of all used hardware address lengths
- across all types of interfaces in use */
+/** Must be the maximum of all used hardware address lengths
+ across all types of interfaces in use.
+ This does not have to be changed, normally. */
+#ifndef NETIF_MAX_HWADDR_LEN
#define NETIF_MAX_HWADDR_LEN 6U
+#endif
/** Whether the network interface is 'up'. This is
* a software flag used to control whether this network
diff --git a/components/net/lwip-head/src/include/lwip/opt.h b/components/net/lwip-head/src/include/lwip/opt.h
index 2a96b5477a..c0af6d0212 100644
--- a/components/net/lwip-head/src/include/lwip/opt.h
+++ b/components/net/lwip-head/src/include/lwip/opt.h
@@ -502,7 +502,7 @@
* Old packets are dropped, new packets are queued.
*/
#ifndef ARP_QUEUE_LEN
-#define ARP_QUEUE_LEN 3
+#define ARP_QUEUE_LEN 3
#endif
/**
diff --git a/components/net/lwip-head/test/unit/dhcp/test_dhcp.c b/components/net/lwip-head/test/unit/dhcp/test_dhcp.c
index 0055b49298..2d59036ede 100644
--- a/components/net/lwip-head/test/unit/dhcp/test_dhcp.c
+++ b/components/net/lwip-head/test/unit/dhcp/test_dhcp.c
@@ -369,7 +369,6 @@ static err_t lwip_tx_func(struct netif *netif, struct pbuf *p)
case 3:
case 4:
case 5:
- case 6:
{
const u8_t arpproto[] = { 0x08, 0x06 };
@@ -379,7 +378,7 @@ static err_t lwip_tx_func(struct netif *netif, struct pbuf *p)
check_pkt(p, 12, arpproto, sizeof(arpproto)); /* eth level proto: ip */
break;
}
- case 7:
+ case 6:
{
const u8_t fake_arp[6] = { 0x12, 0x34, 0x56, 0x78, 0x9a, 0xab };
const u8_t ipproto[] = { 0x08, 0x00 };
@@ -773,13 +772,13 @@ START_TEST(test_dhcp_relayed)
}
fail_unless(netif_is_up(&net_test));
- fail_unless(txpacket == 6, "txpacket = %d", txpacket);
+ fail_unless(txpacket == 5, "txpacket = %d", txpacket);
/* We need to send arp response here.. */
send_pkt(&net_test, arp_resp, sizeof(arp_resp));
- fail_unless(txpacket == 7, "txpacket = %d", txpacket);
+ fail_unless(txpacket == 6, "txpacket = %d", txpacket);
fail_unless(netif_is_up(&net_test));
xid = htonl(net_test.dhcp->xid); /* xid updated */
@@ -790,7 +789,7 @@ START_TEST(test_dhcp_relayed)
tick_lwip();
}
- fail_unless(txpacket == 7, "txpacket = %d", txpacket);
+ fail_unless(txpacket == 6, "txpacket = %d", txpacket);
netif_remove(&net_test);