Page MenuHomeFreeBSD

[netgraph/ng_eiface] Generate MAC address from the FreeBSD OUI range.
ClosedPublic

Authored by afedorov on Jan 14 2020, 10:44 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 20, 2:07 AM
Unknown Object (File)
Fri, Apr 19, 11:50 AM
Unknown Object (File)
Thu, Apr 18, 10:44 AM
Unknown Object (File)
Mar 7 2024, 11:22 AM
Unknown Object (File)
Jan 16 2024, 10:51 PM
Unknown Object (File)
Jan 13 2024, 4:17 AM
Unknown Object (File)
Dec 23 2023, 3:43 AM
Unknown Object (File)
Oct 27 2023, 7:08 PM
Subscribers

Details

Summary

Most network pseudo interfaces (if_tuntap, if_epair ...) generate a MAC address from the FreeBSD OUI range.
ng_eiface by default sets it to 00:00:00:00:00:00. This complicates a setup. So, I don't see any reason to not generate the MAC address as other drivers do.

Test Plan

root@q1u001:~ # ngctl mkpeer eiface test ether
root@q1u001:~ # ifconfig ngeth0
ngeth0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500

options=28<VLAN_MTU,JUMBO_MTU>
ether 58:9c:fc:10:b3:3a
media: Ethernet autoselect
status: no carrier
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

root@q1u001:~ # ngctl mkpeer eiface test ether
root@q1u001:~ # ifconfig ngeth1
ngeth1: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500

options=28<VLAN_MTU,JUMBO_MTU>
ether 58:9c:fc:00:1a:00
media: Ethernet autoselect
status: no carrier
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This seems like a good idea. I'm not well-versed in netgraph, but the manpage here doesn't lead me thinking I'd need to consider setting a MAC address and I certainly don't typically have to for other interfaces- solid +1.

This revision is now accepted and ready to land.Jan 14 2020, 12:13 PM

Because setting a MAC is still possible, the older scripts will not fail with this patch.

This revision was automatically updated to reflect the committed changes.