Hi,

Long interface names like this may look like an obscure corner case, but
they have become less obscure with systemd's network features,
especially the NamePolicy=mac feature (see systemd.link(5)) which should
cause ethernet interfaces to be renamed to something like
enx00112233445566.

On Linux, isc-dhcp (not only the client) uses the SOCK_PACKET inteface
with the sockaddr_pkt structure. (net/if_packet.h) to send "raw"
packets. sockaddr_pkt.spkt_device[] has room for only 14 characters.
This includes the terminating \0 character, leaving us with 13 useable
characters.

The reason for all this is use of that deprecated interface. isc-dhcp
could use the AF_PACKET introduced with Linux 2.2 instead (as suggested
in a comment in if_packet.h). In that case, the interface name is
irrelevant when sending a packet, only the ifindex is used -- and it's
possible to look that up using interface names of up to 15 characters.
(Which is already done in get_hw_addr.)

Cheers,
-Hilko


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to