git: bf57fe555585 - stable/14 - if_gre: Use OID_AUTO for the net.link.gre sysctl node

From: R. Christian McDonald <rcm_at_FreeBSD.org>
Date: Wed, 28 Oct 2026 20:41:32 UTC
The branch stable/14 has been updated by rcm:

URL: https://cgit.FreeBSD.org/src/commit/?id=bf57fe555585b86b3bb0524a4057c92c595c0825

commit bf57fe555585b86b3bb0524a4057c92c595c0825
Author:     R. Christian McDonald <rcm@FreeBSD.org>
AuthorDate: 2026-10-11 11:49:09 +0000
Commit:     R. Christian McDonald <rcm@FreeBSD.org>
CommitDate: 2026-10-28 20:38:06 +0000

    if_gre: Use OID_AUTO for the net.link.gre sysctl node
    
    if_gre(4) registers net.link.gre with the static OID number IFT_TUNNEL.
    That number is an interface type that several tunnel drivers share, not
    one that belongs to gre(4).  if_me(4) used it too, which made loading
    both modules panic until 21f2245de219.  Nothing addresses the node by
    number, so use OID_AUTO as if_me(4) now does.
    
    Suggested by:   markj
    MFC after:      3 days
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
    
    (cherry picked from commit 80bc1d0e3ef732c6b58d13d0f223453a2410d8c1)
---
 sys/net/if_gre.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index ca9c4835daf6..5f06ede64a6d 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -117,7 +117,7 @@ static int	gre_output(struct ifnet *, struct mbuf *,
 static void	gre_delete_tunnel(struct gre_softc *);
 
 SYSCTL_DECL(_net_link);
-static SYSCTL_NODE(_net_link, IFT_TUNNEL, gre, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
+static SYSCTL_NODE(_net_link, OID_AUTO, gre, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
     "Generic Routing Encapsulation");
 #ifndef MAX_GRE_NEST
 /*