lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #51492] IPv6 DNS fix, was using sizeof(ip6_addr_t) whi


From: David van Moolenbroek
Subject: [lwip-devel] [bug #51492] IPv6 DNS fix, was using sizeof(ip6_addr_t) which is not always 16.
Date: Mon, 17 Jul 2017 16:35:15 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0

Follow-up Comment #3, bug #51492 (project lwip):

Hmm well, here's my advice:
- for now, it is most consistent (within lwIP) to use ip6_addr_p_t for stored
IPv6 addresses (i.e. on-the-wire, part of a packet header or packet data);
- as such, for the byte size of an IPv6 address (16), I'd use
sizeof(ip6_addr_p_t), just like the rdnss code in nd6.c does already, instead
of a new #define;
- using ip6_addr_p_t in core/dns.c also means that
ip_addr_copy_from_ip6_packed() should be used instead of the current
non-_packed version;
- that way the DNS answer does indeed end up with a zone of zero (i.e. no
zone); it would be possible to assign a zone based on the netif receiving the
DNS response, but does that really make sense? I am not familiar with
scenarios where DNS is used for link-local addresses at all, but maybe someone
with more practical experience can weigh in here;
- the sif6addr code only passes the produced IPv6 address to
netif_ip6_addr_set(), which in turn assigns a zone by itself, so the PPP code
should already be fine as is.

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?51492>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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