if_me: Do not reuse gre(4)'s static sysctl OID number

if_me(4) registers its net.link.me node with the static OID number
IFT_TUNNEL, the same number if_gre(4) has used for net.link.gre since
2003, so the two tunnel drivers collide under net.link.  Until
d35c4cfad5 that only printed a warning and left two nodes with the
same number; since then sysctl_register_oid() panics, so loading if_me
after if_gre (or the other way round) takes the box down:

  kldload if_gre
  kldload if_me
  panic: sysctl: OID number(131) is already in use for 'me'

Use OID_AUTO like the other tunnel drivers.  Nothing addresses the node
by number.

Reviewed by:		ae
MFC after:		3 days
Sponsored by:		Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D60536
This commit is contained in:
R. Christian McDonald committed 2026-10-10 09:13:22 -04:00
1 parent f627ff51b7
commit 21f2245de2
1 file changed
+1 -1
+1 -1
View File
@@ -125,7 +125,7 @@ static int me_set_tunnel(struct me_softc *, in_addr_t, in_addr_t);
static void me_delete_tunnel(struct me_softc *);
SYSCTL_DECL(_net_link);
static SYSCTL_NODE(_net_link, IFT_TUNNEL, me, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
static SYSCTL_NODE(_net_link, OID_AUTO, me, CTLFLAG_RW | CTLFLAG_MPSAFE, 0,
"Minimal Encapsulation for IP (RFC 2004)");
#ifndef MAX_ME_NEST
#define MAX_ME_NEST 1