[ipxe-devel] [PATCH] rndis: register netdev with MAC filled
rkagan at virtuozzo.com
Mon Jul 9 07:31:00 BST 2018
On Sat, Jul 07, 2018 at 08:21:47PM +0100, Michael Brown wrote:
> On 01/06/18 07:59, Roman Kagan wrote:
> > register_netdev expects ->hw_addr and ->ll_addr to be already filled, so
> > move it towards the end of register_rndis, after the respective fields
> > have been successfully queried from the underlying device.
> Applied, with the error handling path fixed up:
You must have missed my response to Geert Stappers' message where I
explained the error handling path.
With your modification rndis_halt and rndis->op->close() will be called
for the second time on err_register.
The original sequence was
so one had to unregister if open failed.
The new sequence is
[the state is clean at this point]
so the cleanup needed after a failed register_netdev is the same as
after a failed open, and I left err_register label where it was on
While at this, I'm also curious what the reason is to add this
unreachable unregister_netdev? I think I already saw this pattern in
other places in iPXE so I assume you didn't do it by mistake, did you?
More information about the ipxe-devel