lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230104125724.3587015-1-laforge@osmocom.org>
Date:   Wed,  4 Jan 2023 13:57:24 +0100
From:   Harald Welte <laforge@...ocom.org>
To:     netdev@...r.kernel.org
Cc:     khc@...waw.pl, Harald Welte <laforge@...ocom.org>
Subject: [PATCH] net: hdlc: Increase maximum HDLC MTU

The FRF 1.2 specification clearly states:

> A maximum frame relay information field size of 1600 octets shall be
> supported by the network and the user.

The linux kernel hdlc/fr code has so far had a maximum MTU of 1500
octets.  This may have been sufficient to transport "regular" Ethernet
frames of MTU 1500 via frame relay net-devices, but there are other
use cases than Ethernet.

One such use case is the 3GPP Gb interface (TS 48.014, 48.016, 48.018)
operated over Frame Relay.  There is open source software [2]
implementing those interfaces by means of AF_PACKET sockets over
Linux kernel hdlcX devices.

And before anyone asks: Even in 2023 there are real-world deployments of
those interfaces over Frame Relay in production use.

This patch doesn't change the default hdlcX netdev MTU, but permits
userspace to configure a higher MTU, in those cases needed.

[1] https://www.broadband-forum.org/technical/download/FRF.1.2.pdf
[2] https://osmocom.org/projects/osmo-gbproxy/wiki
[3] https://gitea.osmocom.org/osmocom/libosmocore/src/branch/master/src/gb/gprs_ns2_fr.c

Signed-off-by: Harald Welte <laforge@...ocom.org>
---
 include/uapi/linux/hdlc.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/uapi/linux/hdlc.h b/include/uapi/linux/hdlc.h
index d89cb3ee7c70..f6b01e883cb5 100644
--- a/include/uapi/linux/hdlc.h
+++ b/include/uapi/linux/hdlc.h
@@ -13,7 +13,9 @@
 #define _UAPI__HDLC_H
 
 
-#define HDLC_MAX_MTU 1500	/* Ethernet 1500 bytes */
+/* FRF 1.2 states the information field should be 1600 bytes. So in case of
+ * a 4-byte header of Q.922, this results in a MTU of 1604 bytes */
+#define HDLC_MAX_MTU 1604	/* as required for FR network (e.g. carrying GPRS-NS) */
 #if 0
 #define HDLC_MAX_MRU (HDLC_MAX_MTU + 10 + 14 + 4) /* for ETH+VLAN over FR */
 #else
-- 
2.39.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ