Page MenuHomeFreeBSD

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

Authored by rcm on Fri, Oct 9, 4:19 PM.
Tags
None
Referenced Files
F175730162: D60536.diff
Mon, Oct 12, 8:49 PM
F175663068: D60536.diff
Mon, Oct 12, 8:53 AM
F175633716: D60536.id189260.diff
Mon, Oct 12, 4:43 AM
Unknown Object (File)
Sun, Oct 11, 11:58 PM
Unknown Object (File)
Sun, Oct 11, 6:26 AM
Unknown Object (File)
Sun, Oct 11, 2:07 AM
Unknown Object (File)
Sat, Oct 10, 10:45 PM
Unknown Object (File)
Sat, Oct 10, 8:55 PM

Details

Summary

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
d35c4cfad580 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.

MFC after: 3 days
Sponsored by: Rubicon Communications, LLC ("Netgate")

Test Plan

Don't panic

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

rcm requested review of this revision.Fri, Oct 9, 4:19 PM

Is there any reason to use IFT_TUNNEL in if_gre?

Is there any reason to use IFT_TUNNEL in if_gre?

No reason I can find beyond convention; I can certainly change if_gre to OID_AUTO as well.

This revision is now accepted and ready to land.Sat, Oct 10, 11:24 AM