Page MenuHomeFreeBSD

linux: Add STF type and convert some if_type to ARPHRD
ClosedPublic

Authored by pouria on Jul 31 2026, 2:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Aug 30, 2:01 PM
Unknown Object (File)
Sun, Aug 30, 3:43 AM
Unknown Object (File)
Thu, Aug 27, 4:30 PM
Unknown Object (File)
Sun, Aug 23, 8:43 AM
Unknown Object (File)
Fri, Aug 21, 10:58 AM
Unknown Object (File)
Fri, Aug 21, 10:56 AM
Unknown Object (File)
Wed, Aug 19, 6:28 PM
Unknown Object (File)
Wed, Aug 19, 6:25 PM
Subscribers

Details

Summary

Convert IFT_BRIDGE and IFT_L2VLAN to ARPHRD_ETHER, and IFT_LOOP
to ARPHRD_LOOPBACK in linux netlink.
Also, add ARPHRD_SIT and convert IFT_STF to it.

Test Plan

test ip link show under linux compat:

root@ftsr1:/# ip link sh stf0
16: stf0: <> mtu 1280 qdisc noqueue state DOWN qlen 1000
link/sit
root@ftsr1:/# ip link sh vlan0
15: vlan0@bridge0: <BROADCAST,MULTICAST> mtu 1496 qdisc noqueue state UNKNOWN qlen 1000
link/ether 58:9c:fc:10:8c:9b brd ff:ff:ff:ff:ff:ff
root@ftsr1:/# ip link sh bridge0
12: bridge0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state UP qlen 1000
link/ether 58:9c:fc:10:8c:9b brd ff:ff:ff:ff:ff:ff

Diff Detail

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

Event Timeline

pouria edited the test plan for this revision. (Show Details)

Looks good to me, but while you're here, could we also map IFT_LOOP -> LINUX_ARPHRD_LOOPBACK so a Linux ip link show lo under the linuxulator does not look like FireWire? The constant already exists. Fine as a follow-up if you want to keep this patch to bridge/vlan/stf.

This revision is now accepted and ready to land.Wed, Aug 19, 6:51 PM
This revision now requires review to proceed.Wed, Aug 19, 7:02 PM
This revision is now accepted and ready to land.Wed, Aug 19, 7:05 PM
pouria retitled this revision from linux: Add STF type and convert if_bridge and if_vlan to ARPHRD_ETHER to linux: Add STF type and convert some if_type to ARPHRD.Wed, Aug 19, 7:06 PM
pouria edited the summary of this revision. (Show Details)