]> git.baikalelectronics.ru Git - uboot.git/commit
net: emaclite: fix handling for IP packets with specific lengths
authorSamuel Obuch <samuel.obuch@codasip.com>
Tue, 27 Sep 2022 11:21:03 +0000 (13:21 +0200)
committerMichal Simek <michal.simek@amd.com>
Wed, 5 Oct 2022 09:36:54 +0000 (11:36 +0200)
commit49c5ae0e0263ea7450c3f3aae3a4f4d486be3989
tree68052a42fb5e46b7dde5ea214a9b4eec355b1958
parent2ff9643959363ac1e30bef15559353b612dd904a
net: emaclite: fix handling for IP packets with specific lengths

The maximum length is capped similarly to the emaclite_send function.
Avoid integer underflow for values of ip->ip_len < 30, the minimum
length of an IP packet is 21 bytes.

Signed-off-by: Samuel Obuch <samuel.obuch@codasip.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Link: https://lore.kernel.org/r/20220927112103.155689-3-samuel.obuch@codasip.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
drivers/net/xilinx_emaclite.c