]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[interface] Fix debug message values for temporary interfaces 989/head
authorMichael Brown <mcb30@ipxe.org>
Tue, 4 Jul 2023 15:50:03 +0000 (16:50 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 4 Jul 2023 15:54:39 +0000 (16:54 +0100)
commitb5b60ea33dc48a297515f95ac19cca20bb39edd1
treed8eef92727b7ec1af273ddcbe6cae2a462ea949a
parent824441069010806b63cc5d110e5acd1f1d1ee858
[interface] Fix debug message values for temporary interfaces

The interface debug message values constructed by INTF_DBG() et al
rely on the interface being embedded within a containing object.  This
assumption is not valid for the temporary outbound-only interfaces
constructed on the stack by intf_shutdown() and xfer_vredirect().

Formalise the notion of a temporary outbound-only interface as having
a NULL interface descriptor, and overload the "original interface
descriptor" field to contain a pointer to the original interface that
the temporary interface is shadowing.

Originally-fixed-by: Vincent Fazio <vfazio@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/core/interface.c
src/core/xfer.c
src/include/ipxe/interface.h