patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9737, Fix DHCPv6 DNS server assignment

 
 

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

patch #9737: Fix DHCPv6 DNS server assignment

Submitter:  David J. Fiddes <davefiddes>
Submitted:  Thu 27 Dec 2018 12:16:28 PM UTC
Votes: 100
 
Category:  IPv6 Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Planned Release:  None

Mon 28 Jan 2019 01:19:32 PM UTC, comment #1: 

Pushed, thanks for the patch!

Dirk Ziegelmeier <dziegel>
Group administrator
Thu 27 Dec 2018 12:16:28 PM UTC, original submission:  

This patch fixes a problem with the storage of DNS server addresses received via DHCPv6. The IP address type is not set which causes the address to be truncated to the first 32-bits of the 128-bit IPv6 address.

The fix is to set the address type of the DNS server to IPv6 when it is being initialized.

I have tested this as part of the ESP8266 Arduino project on a WeMos D1 R1 on a network where the router provides both ND6 RDNSS and DHCPv6 DNS support. The stack was configured to use either option and  a simple IPv6 DNS sample from the ESP8266 Arduino project used to verify that the correct DNS server is received.

There is a race condition with IPv4 DHCP which can cause the DNS server address to be overwritten occasionally. Disabling IPv4 DHCP support stops this behaviour.

It is not straightforward to test DHCPv6 NTP support on my network but code inspection reveals that this bug is not present there.

David J. Fiddes <davefiddes>

 

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

Attached Files
file #45758:  dhcpv6-dns-fix-v2.diff added by davefiddes (545B - text/x-patch - Updated and simplified patch which uses the same mechanism as DHCPv6 NTP server detection)
file #45745:  dhcpv6-dns-fix.diff added by davefiddes (625B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by dziegel (Posted a comment)
  • -email is unavailable- added by dvdgchrd (Voted in favor of this item)
  • -email is unavailable- added by davefiddes (Submitted the item)
  • -email is unavailable- added by davefiddes
  •  

    There are 100 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.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-28 dziegel StatusNone Done
        Open/ClosedOpen Closed
    2018-12-28 davefiddes Attached File- Added dhcpv6-dns-fix-v2.diff, #45758
    2018-12-27 dvdgchrd Carbon-Copy- Added dvdgchrd
    2018-12-27 davefiddes Attached File- Added dhcpv6-dns-fix.diff, #45745
        Carbon-Copy- Added davefiddes

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code