summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/eth.c4
-rw-r--r--net/net.c3
2 files changed, 4 insertions, 3 deletions
diff --git a/net/eth.c b/net/eth.c
index 45e4a26..83d559c 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -60,6 +60,8 @@ int eth_getenv_enetaddr_by_index(int index, uchar *enetaddr)
return eth_getenv_enetaddr(enetvar, enetaddr);
}
+#ifdef CONFIG_NET_MULTI
+
static int eth_mac_skip(int index)
{
char enetvar[15];
@@ -68,8 +70,6 @@ static int eth_mac_skip(int index)
return ((skip_state = getenv(enetvar)) != NULL);
}
-#ifdef CONFIG_NET_MULTI
-
/*
* CPU and board-specific Ethernet initializations. Aliased function
* signals caller to move on
diff --git a/net/net.c b/net/net.c
index cda7319..33fcd90 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1201,7 +1201,8 @@ static IP_t *__NetDefragment(IP_t *ip, int *lenp)
h = payload + h->next_hole;
}
- if (offset8 + (len / 8) <= h - payload) {
+ /* last fragment may be 1..7 bytes, the "+7" forces acceptance */
+ if (offset8 + ((len + 7) / 8) <= h - payload) {
/* no overlap with holes (dup fragment?) */
return NULL;
}