[ipxe-devel] [PATCH] rndis: register netdev with MAC filled
Roman Kagan
rkagan at virtuozzo.com
Mon Jul 9 06:31:00 UTC 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:
>
> http://git.ipxe.org/ipxe.git/commitdiff/16d749530
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
register
open
query
close
so one had to unregister if open failed.
The new sequence is
open
query
close
[the state is clean at this point]
register
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
purpose.
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?
Thanks,
Roman.
More information about the ipxe-devel
mailing list