From aef4ac2a2cab38bb8af58d944d9759728ccae5ea Mon Sep 17 00:00:00 2001 From: chunghh Date: Tue, 1 Aug 2023 16:52:41 +0900 Subject: [PATCH] fixed a bug in dhcp4msg.c --- lib/dhcp/dhcp4msg.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/dhcp/dhcp4msg.c b/lib/dhcp/dhcp4msg.c index 7dba2782..e5911c78 100644 --- a/lib/dhcp/dhcp4msg.c +++ b/lib/dhcp/dhcp4msg.c @@ -212,7 +212,11 @@ qse_dhcp4_opt_hdr_t* qse_dhcp4_find_option (const qse_dhcp4_pktinf_t* pkt, int c qse_dhcp4_opt_hdr_t* opthdr; /* at least 1 byte is available. the check is because of PADDING or END */ - if (*opt == QSE_DHCP4_OPT_PADDING) continue; + if (*opt == QSE_DHCP4_OPT_PADDING) + { + opt++; + continue; + } if (*opt == QSE_DHCP4_OPT_END) { if (code == QSE_DHCP4_OPT_END)