]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
[PPC64] pseries llan: fix MAC address
authorLeandro Lupori <luporl@FreeBSD.org>
Thu, 4 Jul 2019 12:31:24 +0000 (12:31 +0000)
committerLeandro Lupori <luporl@FreeBSD.org>
Thu, 4 Jul 2019 12:31:24 +0000 (12:31 +0000)
commit57d0d4a271b13a912dfa2ba3321a4a0a75d0bff8
tree34227ec237334cdf15e7cb1bc3d4beb11b201bb5
parente86b9096262054dbb4228fb94def3728edcc8a37
[PPC64] pseries llan: fix MAC address

There was an issue in pseries llan driver, that resulted in the first 2 bytes
of the MAC address getting stripped, and the last 2 being always 0.

In most cases the network interface still worked, despite the MAC being
different of what was specified to QEMU, but when some other host or DHCP
server expected a specific MAC, this would fail.

This change fixes this by shifting right by 2 the local-mac-address read from
device tree, if its length is 6 instead of 8, as observed in QEMU DT, that
always presents a 6 bytes value for this property.

PR: 237471
Reported by: Alfredo Dal'Ava Junior
Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D20843
sys/powerpc/pseries/phyp_llan.c