summaryrefslogtreecommitdiff
path: root/net/net.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-06-03 15:42:13 -0400
committerTom Rini <trini@konsulko.com>2022-06-03 15:42:13 -0400
commit90189ecd59cdf14afbe6014be5c068e599b65a72 (patch)
treea0b1987265474d5f4ceeaf03b4acfcca80962a28 /net/net.c
parent3053b781465711fd05b88ab141b1f2b55a875516 (diff)
parentc30f6d62f07d788263e1f1ac4909f929feefba3f (diff)
Merge branch '2022-06-03-assorted-fixes'
- armv8 TCR write bugfix, ubifs bugfix, imx8mq clk bugfixes, two network fixes, Add U-Boot version to chosen node, update TI AM64x board maintainers
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/net.c b/net/net.c
index 034a5d6e67c..81905f63159 100644
--- a/net/net.c
+++ b/net/net.c
@@ -907,6 +907,9 @@ static struct ip_udp_hdr *__net_defragment(struct ip_udp_hdr *ip, int *lenp)
int offset8, start, len, done = 0;
u16 ip_off = ntohs(ip->ip_off);
+ if (ip->ip_len < IP_MIN_FRAG_DATAGRAM_SIZE)
+ return NULL;
+
/* payload starts after IP header, this fragment is in there */
payload = (struct hole *)(pkt_buff + IP_HDR_SIZE);
offset8 = (ip_off & IP_OFFS);