patchlwIP - A Lightweight TCP/IP stack - Patches: patch #9021, nd6: add support for RDNSS option...

 
 

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

patch #9021: nd6: add support for RDNSS option as per RFC 6106

Submitter:  Jan Breuer <jan_breuer>
Submitted:  Tue 07 Jun 2016 02:56:20 PM UTC
   
 
Category:  IPv6 Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  2.0.1

Jump to the original submission

Wed 14 Dec 2016 09:16:34 PM UTC, comment #7: 

I've pushed just pushed this, but I think we'll need to re-think dual-stack behaviour for DNS.

I've added task #14274 for that.

Thanks for the patch.

Oh, and sorry I missed setting you as committer after applying failed. But at least in CHANGELOG it's correct.

Simon Goldschmidt <goldsimon>
Group administrator
Wed 14 Dec 2016 10:44:47 AM UTC, comment #6: 


>> You can just follow the rule "last wins".
> How would that work in dual-stack mode? IPv6 servers should be favoured, so with automatic configuration, you'll have to keep both.

It just results in more complicated dns server list update function but it is still somehow solvable. Another solution is to have enough space in DNS server list so you can keep both. You can just configure this in lwipopt.h how many items you need to keep in memory. If you configure just 2 items, just don't count with full and correct RFC support.

 

>> Also ND6 and DHCPv6 can tell you same DNS servers.
> Yes, they can, but I see an implementation problem here when one has a timeout but the other doesn't. Probably not a real world issue though?

This is out of my knowledge and imagination.

Jan Breuer <jan_breuer>
Wed 14 Dec 2016 09:53:40 AM UTC, comment #5: 


> It still sounds better to me to put everything in dns.c so we have only one list of DNS servers.


That's true.

> We can add pointer to netif to the DNS item struct.


I'm not sure what's best for multiple interfaces, I haven't read up on that, yet.

> You can just follow the rule "last wins".


How would that work in dual-stack mode? IPv6 servers should be favoured, so with automatic configuration, you'll have to keep both.

> Also ND6 and DHCPv6 can tell you same DNS servers.


Yes, they can, but I see an implementation problem here when one has a timeout but the other doesn't. Probably not a real world issue though?

Simon Goldschmidt <goldsimon>
Group administrator
Wed 14 Dec 2016 09:36:54 AM UTC, comment #4: 

It still sounds better to me to put everything in dns.c so we have only one list of DNS servers.

We can add pointer to netif to the DNS item struct.
If the interface goes down, it can easily iterate over all DNS records and delete only records from that interface.

nd6_tmr can still iterate over the list of DNS records and if there is any with expired lifetime, it can send RS.

There is also no need to have so long list of DNS server records. You can just follow the rule "last wins" and you can live with e.g. two records. 10 records is overkill. Also ND6 and DHCPv6 can tell you same DNS servers.

Jan Breuer <jan_breuer>
Wed 14 Dec 2016 09:23:26 AM UTC, comment #3: 

How would an expired entry lead to RS here?
When implementing the timeout in nd6 (we alrady have nd6_tmr() which is called every second), I would have deleted expired servers from dns, so there would be no need to check validity for anyone. The downside would be we'd have to store the servers twice.

Oh, and another thought: multiple interfaces require some attention, too.

Simon Goldschmidt <goldsimon>
Group administrator
Wed 14 Dec 2016 09:17:46 AM UTC, comment #2: 

We can have a look at contiki, there is nice and clean implementation of lifetimes

https://github.com/contiki-os/contiki/blob/master/core/net/ip/uip-nameserver.c

The advantage of this solution is, that anybody can check the validity of the DNS server record. There is no need the check if the DNS was added by ND6 and then ask ND6 if it is still valid.

Jan Breuer <jan_breuer>
Wed 14 Dec 2016 09:04:04 AM UTC, comment #1: 

Good idea, sorry it took me so long to write.

Lifetime should be in nd6.c to be able to issue RS before timeout (and only ND6 seems to have a timeout).

We'd need to add some constants to configure DNS servers from multiple sources. That would result in e.g.:
- index 0: manual server config
- index 1-3: ND6
- index 4-6: DHCPv6
- index 7-9: DHCPv4
And DNS must be changed to check all servers for NULL before giving up (it currently only checks one next server and assumes the list is compacted and starting from index 0).

Simon Goldschmidt <goldsimon>
Group administrator
Tue 07 Jun 2016 02:56:20 PM UTC, original submission:  

This patch is just a first step to accept RDNSS RA options.

It works and configures dns servers via dns_setserver after receiving RA with RDNSS option.

In the RFC 6106, there is defined Lifetime of the DNS server. This lifetime is not handled fully by this patch. There can be different lifetimes per each DNS server.

It is not a question how, but where to implement the lifetime. In nd6.c? In dns.c?

Before lifetime timeout, RS can be send to renew this option. This is also not part of this patch.

Jan Breuer <jan_breuer>

 

(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 goldsimon (Posted a comment)
  • -email is unavailable- added by jan_breuer (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.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-12-14 goldsimon StatusNone Done
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.0.1
    2016-06-07 jan_breuer Attached File- Added 0001-nd6-add-support-for-RDNSS-option-as-per-RFC-6106.patch, #37424

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code