Skip to content
Permalink
Browse files

dhcp: decoded DNS servers should be limited to LWIP_DHCP_PROVIDE_DNS_…

…SERVERS instead of DNS_MAX_SERVERS
  • Loading branch information...
avtolstoy committed Dec 3, 2018
1 parent 9bda655 commit 4fe04959e5665dc58cb2552f750d82e257aab87d
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/core/ipv4/dhcp.c
@@ -1592,7 +1592,7 @@ dhcp_parse_reply(struct pbuf *p, struct dhcp *dhcp)
/* special case: there might be more than one server */
LWIP_ERROR("len %% 4 == 0", len % 4 == 0, return ERR_VAL;);
/* limit number of DNS servers */
decode_len = LWIP_MIN(len, 4 * DNS_MAX_SERVERS);
decode_len = LWIP_MIN(len, 4 * LWIP_DHCP_PROVIDE_DNS_SERVERS);
LWIP_ERROR("len >= decode_len", len >= decode_len, return ERR_VAL;);
decode_idx = DHCP_OPTION_IDX_DNS_SERVER;
break;

0 comments on commit 4fe0495

Please sign in to comment.
You can’t perform that action at this time.