From 14010b357938e818bd33d12a7107c452047f94ed Mon Sep 17 00:00:00 2001 From: rowanG077 Date: Fri, 15 Sep 2023 09:38:55 +0200 Subject: [PATCH] core/dhcp: Add check to ensure DHCP cannot be used without IP broadcast support --- liteeth/core/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/liteeth/core/__init__.py b/liteeth/core/__init__.py index be2995f..c62ee23 100644 --- a/liteeth/core/__init__.py +++ b/liteeth/core/__init__.py @@ -93,6 +93,8 @@ class LiteEthUDPIPCore(LiteEthIPCore): ): # Ensure either IP is external or DHCP is used assert((ip_address is None) == with_dhcp) + # DHCP requres IP broadcast + assert(not with_dhcp or with_ip_broadcast) # Parameters. # -----------