|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] tools/hotplug: validate mtu read from xenstore against RFC 791 minimum
commit 7d6c3308cb6eab5ec3742d24b3d05c934498bcb5
Author: James Dingwall <james@xxxxxxxxxxxxxx>
AuthorDate: Fri Aug 14 07:03:51 2026 +0100
Commit: Anthony PERARD <anthony.perard@xxxxxxxxxx>
CommitDate: Mon Oct 12 17:31:39 2026 +0200
tools/hotplug: validate mtu read from xenstore against RFC 791 minimum
RFC 791 sets the minimum acceptable mtu to 68:
Every internet module must be able to forward a datagram of 68
octets without further fragmentation. This is because an internet
header may be up to 60 octets, and the minimum fragment is 8 octets.
In the Linux kernel source:
include/net/ip.h:#define IPV4_MIN_MTU 68 /* RFC 791
*/
While there is no reason to expect a value <68 to be read from xenstore or
from the bridge make the value test require a number >= this minimum.
Signed-off-by: James Dingwall <james@xxxxxxxxxxxxxx>
Reviewed-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
tools/hotplug/Linux/xen-network-common.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/hotplug/Linux/xen-network-common.sh
b/tools/hotplug/Linux/xen-network-common.sh
index f83eeef030..344730cb42 100644
--- a/tools/hotplug/Linux/xen-network-common.sh
+++ b/tools/hotplug/Linux/xen-network-common.sh
@@ -167,7 +167,7 @@ set_mtu () {
log debug "$bridge MTU is $mtu"
fi
fi
- if [ -n "$mtu" ] && [ "$mtu" -gt 0 ]
+ if [ -n "$mtu" ] && [ "$mtu" -ge 68 ]
then
log debug "setting $dev MTU to $mtu"
ip link set dev ${dev} mtu ${mtu} || :
--
generated by git-patchbot for /home/xen/git/xen.git#master
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |