]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
if_ether.h: add 802.1AC, warn about GRE 0x00FE
authorDavid 'equinox' Lamparter <equinox@diac24.net>
Fri, 5 Jun 2026 16:41:44 +0000 (18:41 +0200)
committerJakub Kicinski <kuba@kernel.org>
Tue, 9 Jun 2026 02:13:53 +0000 (19:13 -0700)
Because LLC wasn't complicated/annoying enough, there's 2 more
"ethertypes" being used for it:

- 0x8870 is pretty "normal", it got standardized in
  802.1AC-2016/Cor1-2018 for transporting LLC frames > 1500 bytes.
  It simply replaces the length value (which is no longer encoded, and
  must now be derived from the packet.)  The actual value dates back to
  2001; https://datatracker.ietf.org/doc/html/draft-ietf-isis-ext-eth-01
  (it was used without "proper" standardization for a long time)

- 0x00fe is a doozy - actually "invalid" depending on how you look at
  it; it's used in GRE (and possibly GENEVE) tunnels to transport the
  IS-IS routing protocol.  https://seclists.org/tcpdump/2002/q4/61 is
  the best/oldest source I could find.  It's inspired by the 0xfe SAP
  value, a GRE packet with protocol 0x00fe is followed by a payload "as
  if" it was Ethernet with "<length> 0xfe 0xfe 0x03".  (Again the length
  isn't encoded explicitly anymore.)

The 0x00fe value is quite close to other values the kernel is using
internally for various things (after all they "won't clash for 1500
types").  Except this one does clash, and if someone unknowingly starts
using it for something internal... we end up in a world of pain in
getting IS-IS running on GRE tunnels.  Hence the "WARNING".

Signed-off-by: David 'equinox' Lamparter <equinox@diac24.net>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>
Link: https://patch.msgid.link/20260605164144.81184-1-equinox@diac24.net
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/uapi/linux/if_ether.h

index fb5efc8e06cc1488352efe573f6b031be076d1d1..1ffac52c39df654d6ddbc2b33f682152bfa760e4 100644 (file)
@@ -82,6 +82,7 @@
 #define ETH_P_PPP_DISC 0x8863          /* PPPoE discovery messages     */
 #define ETH_P_PPP_SES  0x8864          /* PPPoE session messages       */
 #define ETH_P_LINK_CTL 0x886c          /* HPNA, wlan link local tunnel */
+#define ETH_P_8021AC   0x8870          /* 802.1AC LLC > 1500 bytes     */
 #define ETH_P_ATMFATE  0x8884          /* Frame-based ATM Transport
                                         * over Ethernet
                                         */
 #define ETH_P_MCTP     0x00FA          /* Management component transport
                                         * protocol packets
                                         */
+#define ETH_P_GRE_OSI  0x00FE          /* GRE tunnels: LLC "fe fe 03" analog,
+                                        * used primarily for IS-IS over GRE
+                                        * WARNING: not internal, used on wire!
+                                        */
 
 /*
  *     This is an Ethernet frame header.