[Top][All Lists]

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

[lwip-users] trying IPv6

From: David Gauchard
Subject: [lwip-users] trying IPv6
Date: Tue, 11 Sep 2018 14:16:08 +0200
User-agent: Mutt/1.5.24 (2015-08-30)


I'm in the process of integrating IPv6 in our user stack.

I'm using lwip-2.1.0RC1, and thanks for that (especially partial SACK since
last stable that saved my day this morning).

Beeing a complete beginner with IPv6, I started with the basics:  ping.

I set up a link-local address by hand on lwip as the linux-peer's + 2.

linux: inet6 addr: fe80::76da:38ff:fe3a:1f61/64 Scope:Link
lwip:  fe80:0:0:0:76da:38ff:fe3a:1f63
       (:: not yet implemented in my code)

I understand linux's link local is built from the mac address, but I assume
one don't care what it is, anything can be setup as soon as it starts with
fe80:: .

Then I pang lwip from linux and check what happens with tcpdump:

13:54:28.502368 IP6 fe80::76da:38ff:fe3a:1f61 > ff02::1:ff3a:1f63: ICMP6, 
neighbor solicitation, who has fe80::76da:38ff:fe3a:1f63, length 32

If I understand well IPv6 addressing, ff02::1:ff3a:1f63 is really


But this packet was never swallowed by lwip ("not for us").

After checking and printing from within lwip, I found that this macro did not 
accept the discovery request,
    src/include/lwip/ip6_addr.h L247

        #define ip6_addr_isallnodes_linklocal(ip6addr) (((ip6addr)->addr[0] == 
PP_HTONL(0xff020000UL)) && \
            ((ip6addr)->addr[1] == 0UL) && \
            ((ip6addr)->addr[2] == 0UL) && \
            ((ip6addr)->addr[3] == PP_HTONL(0x00000001UL)))

That one would accept the request

        #define ip6_addr_isallnodes_linklocal(ip6addr) (((ip6addr)->addr[0] == 
PP_HTONL(0xff020000UL)) && \
            ((ip6addr)->addr[1] == 0UL) && \
            ((ip6addr)->addr[2] == PP_HTONL(0x00000001UL)))

This test is done at src/core/ipv6/ip6.c L598

Before digging further, I was wondering whether I'm not currently going into a 



reply via email to

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