summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
authorMichael Brown2015-11-10 15:05:46 +0100
committerMichael Brown2015-11-10 15:05:46 +0100
commited0d7c4f6f8db7bda1e74567693a0c525b9cf159 (patch)
tree9445c55745f75db057fb88d91c2989b0c7a68c4e /src/config
parent[intel] Add PCI IDs for i210/i211 flashless operation (diff)
downloadipxe-ed0d7c4f6f8db7bda1e74567693a0c525b9cf159.tar.gz
ipxe-ed0d7c4f6f8db7bda1e74567693a0c525b9cf159.tar.xz
ipxe-ed0d7c4f6f8db7bda1e74567693a0c525b9cf159.zip
[dhcp] Limit maximum number of DHCP discovery deferrals
For switches which remain permanently in the non-forwarding state (or which erroneously report a non-forwarding state), ensure that iPXE will eventually give up waiting for the link to become unblocked. Originally-fixed-by: Wissam Shoukair <wissams@mellanox.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/config')
-rw-r--r--src/config/dhcp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/config/dhcp.h b/src/config/dhcp.h
index 49fe16b9..bff5b56d 100644
--- a/src/config/dhcp.h
+++ b/src/config/dhcp.h
@@ -25,6 +25,12 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
//#define DHCP_DISC_END_TIMEOUT_SEC 32 /* as per PXE spec */
/*
+ * Maximum number of discovery deferrals due to blocked links
+ * (e.g. from non-forwarding STP ports)
+ */
+#define DHCP_DISC_MAX_DEFERRALS 60
+
+/*
* ProxyDHCP offers are given precedence by continue to wait for them
* after a valid DHCPOFFER is received. We'll wait through this
* timeout for it. The PXE spec indicates waiting through the 4 & 8