mirror of
https://github.com/ipxe/ipxe
synced 2025-12-17 01:52:08 +03:00
[cachedhcp] Include VLAN tag in filter for applying cached DHCPACK
When chainloading iPXE from a VLAN device, the MAC address within the cached DHCPACK will match the MAC address of the trunk device created by iPXE, and the cached DHCPACK will then end up being erroneously applied to the trunk device. This tends to break outbound IPv4 routing, since both the trunk and VLAN devices will have the same assigned IPv4 address. Fix by recording the VLAN tag along with the cached DHCPACK, and treating the VLAN tag as part of the filter used to match the cached DHCPACK against candidate network devices. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -18,7 +18,8 @@ extern struct cached_dhcp_packet cached_dhcpack;
|
||||
extern struct cached_dhcp_packet cached_proxydhcp;
|
||||
extern struct cached_dhcp_packet cached_pxebs;
|
||||
|
||||
extern int cachedhcp_record ( struct cached_dhcp_packet *cache, userptr_t data,
|
||||
extern int cachedhcp_record ( struct cached_dhcp_packet *cache,
|
||||
unsigned int vlan, userptr_t data,
|
||||
size_t max_len );
|
||||
|
||||
#endif /* _IPXE_CACHEDHCP_H */
|
||||
|
||||
@@ -11,6 +11,7 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
|
||||
#include <ipxe/efi/efi.h>
|
||||
|
||||
extern int efi_cachedhcp_record ( EFI_HANDLE device );
|
||||
extern int efi_cachedhcp_record ( EFI_HANDLE device,
|
||||
EFI_DEVICE_PATH_PROTOCOL *path );
|
||||
|
||||
#endif /* _IPXE_EFI_CACHEDHCP_H */
|
||||
|
||||
Reference in New Issue
Block a user