]> git.proxmox.com Git - ovs.git/commit
netdev: netdev_get_etheraddr is not functioning as advertised.
authorYifeng Sun <pkusunyifeng@gmail.com>
Thu, 30 Nov 2017 16:31:24 +0000 (08:31 -0800)
committerBen Pfaff <blp@ovn.org>
Thu, 30 Nov 2017 21:36:29 +0000 (13:36 -0800)
commit59b1e023aed130786c12ff93226224ec82595dfb
tree96ba1dbff26c5940a061794572cf45a7fb04ec8f
parent78b76327d45f0df26293021806e436e7c111af48
netdev: netdev_get_etheraddr is not functioning as advertised.

netdev_get_etheraddr claims to clear 'mac' on error, but it fails to do so.
When looking further into both netdev_windows_get_etheraddr() and
netdev_linux_get_etheraddr(), 'mac' is also not cleared. This will lead to
usage of uninitialised ofputil_phy_port.hw_addr.

v1 -> v2: fixed a bug in v1 found by Ben, thanks Ben.

Signed-off-by: Yifeng Sun <pkusunyifeng@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
lib/netdev.c