patchlwIP - A Lightweight TCP/IP stack - Patches: patch #10274, dhcp: limit number of dns servers...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #10274: dhcp: limit number of dns servers we parse to LWIP_DHCP_PROVIDE_DNS_SERVERS

Submitter:  Matteo Fumagalli <matteofumagalli>
Submitted:  Wed 31 Aug 2022 07:52:22 AM UTC
 
Category:  DHCP Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Planned Release:  None

Fri 09 Sep 2022 01:57:49 PM UTC, comment #1: 

As I can see this problem is already reported:
here https://savannah.nongnu.org/patch/?10124
and here https://savannah.nongnu.org/bugs/?61590

Karol Domagalski <karol_domag>
Wed 31 Aug 2022 07:52:22 AM UTC, original submission:  

Hi,

I met an issue in the following condition:

DNS_MAX_SERVER: 4
LWIP_DHCP_MAX_DNS_SERVERS: 2

While connecting to a certain network i was getting 3 different DNS servers, but the code on the dhcp side tries to parse 4 entries instead of 2:

/* limit number of DNS servers */
decode_len = LWIP_MIN(len, 4 * DNS_MAX_SERVERS);

causing an assert at:

LWIP_ASSERT("check decode_idx", decode_idx >= 0 && decode_idx < DHCP_OPTION_IDX_MAX);

I think it's correct to use LWIP_DHCP_PROVIDE_DNS_SERVERS instead of DNS_MAX_SERVERS.

Let me know if i'm wrong. Currently i modified it like this to make it work.

Regards.

Matteo Fumagalli <matteofumagalli>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by karol_domag (Posted a comment)
  • -email is unavailable- added by matteofumagalli (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2022-08-31 matteofumagalli Attached File- Added 0001-dhcp-limit-number-of-dns-servers-we-parse-to-LWIP_DH.patch, #53641

    Back to the top


    Powered by Savane 3.9