]> git.ipfire.org Git - thirdparty/qemu.git/commit
tulip: Assign default MAC address if not specified
authorHelge Deller <deller@gmx.de>
Thu, 10 Mar 2022 16:55:50 +0000 (17:55 +0100)
committerJason Wang <jasowang@redhat.com>
Tue, 17 May 2022 08:48:23 +0000 (16:48 +0800)
commit052c2579b89b0d87debe8b05594b5180f0fde87d
treedc46ca7444d5c7d94ffc9d0a96c0dcc3c24ea464
parentfd8c8c056d17e78efdcfe680b4830cd646d5d5a0
tulip: Assign default MAC address if not specified

The MAC of the tulip card is stored in the EEPROM and at startup
tulip_fill_eeprom() is called to initialize the EEPROM with the MAC
address given on the command line, e.g.:
    -device tulip,mac=00:11:22:33:44:55

In case the mac address was not given on the command line,
tulip_fill_eeprom() initializes the MAC in EEPROM with 00:00:00:00:00:00
which breaks e.g. a HP-UX guest.

Fix this problem by moving qemu_macaddr_default_if_unset() a few lines
up, so that a default mac address is assigned before tulip_fill_eeprom()
initializes the EEPROM.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Jason Wang <jasowang@redhat.com>
hw/net/tulip.c