]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[pxe] Populate ciaddr in fake PXE Boot Server ACK packet
authorMichael Brown <mcb30@ipxe.org>
Tue, 1 Sep 2015 15:52:27 +0000 (16:52 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 1 Sep 2015 20:24:02 +0000 (21:24 +0100)
We currently do not populate the ciaddr field in the constructed PXE
Boot Server ACK packet.  This causes a WDS server to respond with a
broadcast packet, which is then ignored by wdsmgfw.efi since it does
not match the specified IP address filter.

Fix by populating ciaddr within the constructed PXE Boot Server ACK
packet.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/net/fakedhcp.c

index b6c456a5978a474de9bcd1662833f960ba96ea6f..009b12c56a956e92ba768fe7e0c2bf3de465bcd2 100644 (file)
@@ -199,6 +199,10 @@ int create_fakepxebsack ( struct net_device *netdev,
                return rc;
        }
 
+       /* Populate ciaddr */
+       fetch_ipv4_setting ( netdev_settings ( netdev ), &ip_setting,
+                            &dhcppkt.dhcphdr->ciaddr );
+
        /* Merge in ProxyDHCP options */
        if ( proxy_settings &&
             ( ( rc = copy_settings ( &dhcppkt, proxy_settings ) ) != 0 ) ) {