git: 80bc1d0e3ef7 - main - if_gre: Use OID_AUTO for the net.link.gre sysctl node
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 11 Oct 2026 11:49:28 UTC
The branch main has been updated by rcm:
URL: https://cgit.FreeBSD.org/src/commit/?id=80bc1d0e3ef732c6b58d13d0f223453a2410d8c1
commit 80bc1d0e3ef732c6b58d13d0f223453a2410d8c1
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-11 11:49:09 +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")
---
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 cd0b911e6c6e..c390e552886a 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -139,7 +139,7 @@ static int gre_set_encap_nl(struct gre_softc *, struct nl_pstate *, uint32_t);
static int gre_set_udp_sport_nl(struct gre_softc *, struct nl_pstate *, uint16_t);
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
/*