diff options
author | Michael Brown | 2017-01-25 11:19:02 +0100 |
---|---|---|
committer | Michael Brown | 2017-01-25 12:29:29 +0100 |
commit | f450c75dad04061f2d51401088f156e1226804ac (patch) | |
tree | 73ac06fd9aecb6275b7f5c08686318457e3f6e22 /src/net/tcpip.c | |
parent | [interface] Remove misleading comment (diff) | |
download | ipxe-f450c75dad04061f2d51401088f156e1226804ac.tar.gz ipxe-f450c75dad04061f2d51401088f156e1226804ac.tar.xz ipxe-f450c75dad04061f2d51401088f156e1226804ac.zip |
[interface] Unplug interface before calling intf_close() in intf_shutdown()
The call to intf_close() may result in the original interface being
reopened. For example: when reading the capacity of a 2TB+ disk via
iSCSI, the SCSI layer will respond to the intf_close() from the READ
CAPACITY (10) command by immediately issuing a READ CAPACITY (16)
command. The iSCSI layer happens to reuse the same interface for the
new command (since it allows only a single concurrent command).
Currently, intf_shutdown() unplugs the interface after the call to
intf_close() returns. In the above scenario, this results in
unplugging the just-reopened interface.
Fix by transferring the interface destination (and its reference) to a
temporary interface, and so effectively performing the unplug before
making the call to intf_close().
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/tcpip.c')
0 files changed, 0 insertions, 0 deletions