lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #10274] dhcp: limit number of dns servers we parse t


From: Matteo Fumagalli
Subject: [lwip-devel] [patch #10274] dhcp: limit number of dns servers we parse to LWIP_DHCP_PROVIDE_DNS_SERVERS
Date: Wed, 31 Aug 2022 03:52:23 -0400 (EDT)

URL:
  <https://savannah.nongnu.org/patch/?10274>

                 Summary: dhcp: limit number of dns servers we parse to
LWIP_DHCP_PROVIDE_DNS_SERVERS
                 Project: lwIP - A Lightweight TCP/IP stack
               Submitter: matteofumagalli
               Submitted: Wed 31 Aug 2022 07:52:22 AM UTC
                Category: DHCP
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Wed 31 Aug 2022 07:52:22 AM UTC By: Matteo Fumagalli <matteofumagalli>
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.






    _______________________________________________________
File Attachments:


-------------------------------------------------------
Date: Wed 31 Aug 2022 07:52:22 AM UTC  Name:
0001-dhcp-limit-number-of-dns-servers-we-parse-to-LWIP_DH.patch  Size: 1KiB  
By: matteofumagalli

<http://savannah.nongnu.org/patch/download.php?file_id=53641>

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/patch/?10274>

_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]