]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Improve MAC address uniqueness on if_epair(4).
authorpizzamig <pizzamig@FreeBSD.org>
Wed, 23 May 2018 13:10:57 +0000 (13:10 +0000)
committerpizzamig <pizzamig@FreeBSD.org>
Wed, 23 May 2018 13:10:57 +0000 (13:10 +0000)
commitfbb6c8b69167d1fd863cfd96392c98337676c683
tree19b400652f8bcc4280127566a1262c239966b2b4
parent8b00a6cb9a6521a497595ba34590463f3d7df6ea
Improve MAC address uniqueness on if_epair(4).

As reported in PR184149, it can happen that epair devices can have the same
MAC address.
This solution is based on a 32-bit hash, obtained combining the if_index of
the a interface and the hostid.
If the hostid is zero, a random number is used.

PR: 184149
Reviewed by: wollman, eugen
Approved by: cognet
Differential Revision: https://reviews.freebsd.org/D15329
sys/net/if_epair.c