[patch #9856] sntp: Allow both IPv4 and IPv6 NTP servers to be configured simultaneously via DHCP

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch #9856] sntp: Allow both IPv4 and IPv6 NTP servers to be configured simultaneously via DHCP

Simon Goldschmidt
URL:
  <https://savannah.nongnu.org/patch/?9856>

                 Summary: sntp: Allow both IPv4 and IPv6 NTP servers to be
configured simultaneously via DHCP
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: davefiddes
            Submitted on: Sun 29 Sep 2019 05:00:29 PM UTC
                Category: apps
                Priority: 3 - Low
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

Currently when a DHCP or DHCPv6 updates containing NTP
server addresses is processed all existing NTP server addresses
are wiped. This can lead to problems when there is intermittent
connectivity to an NTP server over a given IP protocol. This
changes DHCP update processing such that it only overwrites
server addresses for the same protocol. It also does the same
for IPv4 NTP server addresses when processing a DHCPv6 update.

The logging for processing DHCP and DHCPv6 updates are now
a bit more useful.

Tests:
 - On a network with DHCP and DHCPv6 configure differing
   numbers (0-3) of NTP servers on each protocol. Ensure that
   as updates are processed the list of 3 LWIP NTP servers is
   updated as expected.
 - On a network with intermittent IPv6 connectivity ensure that
   with both IPv4 and IPv6 servers configured via DHCP that NTP
   updates are requested over IPv4 even if it is not listed first.




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sun 29 Sep 2019 05:00:29 PM UTC  Name:
0001-sntp-Don-t-over-write-IPv6-NTP-server-when-processin.patch  Size: 4KiB  
By: davefiddes

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

    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[patch #9856] sntp: Allow both IPv4 and IPv6 NTP servers to be configured simultaneously via DHCP

Simon Goldschmidt
Follow-up Comment #1, patch #9856 (project lwip):

I could imagine a lot of funny things happen when applying this patch as is.
For example, if the number of available slots was smaller than what we get via
DHCPv6, we wouldn't be able to store IPv4 servers?

Up to now, the assumption was that networks either give us IPv4 or IPv6
servers.

If that's not the case, maybe separate lists (or fixed offsets in a single
list) would be better than this kind of magic?

    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[patch #9856] sntp: Allow both IPv4 and IPv6 NTP servers to be configured simultaneously via DHCP

Simon Goldschmidt
Follow-up Comment #2, patch #9856 (project lwip):

If you're on an IPv4 network you'll get your IPv4 NTP (or DNS) servers via
DHCP. If you are on IPv6 you'll get IPv6 NTP servers over DHCP. If you are
operating dual-stack you have to deal with both.

I did wonder whether these patches would open a can of worms. Dual stack makes
a lot of things ugly unfortunately.

For my own use case ESP8266 Arduino's LwIP configuration has 3 NTP server
slots and only 1 DHCP and 1 DHCPv6 NTP server. This works fine obviously.

I'll need to have a think as to how to achieve it but dividing the allocation
between IPv4 and IPv6 would certainly be more deterministic.

    _______________________________________________________

Reply to this item at:

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

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


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel