buglwIP - A Lightweight TCP/IP stack - Bugs: bug #31828, lwIP AUTOIP addresses accessed...


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

bug #31828: lwIP AUTOIP addresses accessed from a host with a non-AUTOIP

Submitted by:  Bill Auerbach <billauerbach>
Submitted on:  Wed 08 Dec 2010 08:53:03 PM UTC  
Category:  ARP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Invalid
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned Release:  None
lwIP version:  CVS Head

( Jump to the original submission)

Wed 15 Dec 2010 06:04:21 PM UTC, comment #14: 

Ok, I found something to add:

RFC 3927:

1.6.  Alternate Use Prohibition

   Note that addresses in the 169.254/16 prefix SHOULD NOT be configured manually or by a DHCP server.

This will at least leave the breadcrumb for someone to know to not use a link-local static address.

Bill Auerbach <billauerbach>
Wed 15 Dec 2010 05:59:11 PM UTC, comment #13: 

Closing as invalid.

Simon Goldschmidt <goldsimon>
Project Administrator
Wed 15 Dec 2010 05:53:00 PM UTC, comment #12: 

You can close this - I cannot get consistent behavior with other devices and/or with Windows when using static AutoIp (Link local) addresses.  I guess there should be documentation somewhere that Link Local addresses are only valid when assigned using the method described in RFC 3927.  Sorry for the noise.

Bill Auerbach <billauerbach>
Fri 10 Dec 2010 02:31:10 PM UTC, comment #11: 

If lwIP's behavior is correct then go ahead and close this.  I thought it should work and can't find an documentation that says it doesn't have to.  I have another widely distributed embedded device that does work with a static link-local address, but that could be that "it just works" but doesn't have to by RFC.

Bill Auerbach <billauerbach>
Thu 09 Dec 2010 11:41:44 PM UTC, comment #10: 

Oh, you meant another IP subnet while I thought you meant an address routed from another subnet to your device.

Anyway, a host with a link-local address should be able to communicate with all hosts on the same physical local (unrouted) network. This is a two-side issue of course and there may be systems where this doesn't work (as on my windows XP with 2 NICs).

However, did I understand you correctly that you wanted to manually configure an AutoIP address and that didn't work? I'm not convinced it should, but I could imagine checks in lwIP where it checks that it actually uses AutoIP instead of checking the address to be in that range...

Simon Goldschmidt <goldsimon>
Project Administrator
Thu 09 Dec 2010 06:36:34 PM UTC, comment #9: 

Based on the discussion in msg #4, this is the whole point.  I asked the question in this other thread in the first place because windows would talk to 169.254 subnets - which as David pointed out is the main idea because the devices have self-configured link-local addresses.

You quoted the RFC indicating that this connection is possible: RFC 3927 section 1.8.

"This allows, for example, a laptop computer with only a routable address to communicate with web servers world-wide using its globally-routable address while at the same time printing those web pages on a local printer that has only an IPv4 Link-Local address."

What is new this time is I have a link-local static address in the lwIP device and I guessed that it is the difference from using DHCP/AutoIP.

Bill Auerbach <billauerbach>
Thu 09 Dec 2010 05:48:27 PM UTC, comment #8: 

> I believe the problem is a packet from another subnet to an
> AutoIP address is not added to the ARP cache.

By design, an AutoIP address should not receive packets from another subnet.

Simon Goldschmidt <goldsimon>
Project Administrator
Thu 09 Dec 2010 04:17:00 PM UTC, comment #7: 

So I  believe the problem is a packet from another subnet to an AutoIP address is not added to the ARP cache.  So the ping reply doesn't get sent.  I did not debug this further except to turn on LWIP_AUTOIP to see if code was being excluded that was needed for this to work.

Bill Auerbach <billauerbach>
Thu 09 Dec 2010 04:10:55 PM UTC, comment #6: 

I checked the code base I tested this with and it was there - your comment referring to the RFC tipped me off.  Unless there were more than one patch and I have the original.

The key here is I did NOT use DHCP with fallback to AutoIP to get the lwIP device IP set.  I believe the AutoIP ARP exchange may be setting up the ARP and with a static AutoIP address it there is no ARP set up for replying.

Bill Auerbach <billauerbach>
Thu 09 Dec 2010 03:51:12 PM UTC, comment #5: 

I think I already fixed that before savannah was hacked... Let me check that when I'm home again some time next week. I should find the time to backport changes from git then.

Simon Goldschmidt <goldsimon>
Project Administrator
Thu 09 Dec 2010 03:47:16 PM UTC, comment #4: 
Bill Auerbach <billauerbach>
Thu 09 Dec 2010 03:08:16 PM UTC, comment #3: 

It sounds like you expect AutoIP addresses to be treated as a special case with regards to routing.  Do you have a reference for that?  That the Linux box is sending the packets out suggests you're right (or that it's just sending them to the default interface).  I don't know the AutoIP spec very well so it could be that the behaviour you describe is correct, but if we're going to fix it I'd like to understand it first!

Kieran Mansley <kieranm>
Project Member
Thu 09 Dec 2010 02:46:33 PM UTC, comment #2: 



With ping /t running I get no replies - WireShark shows the correct ICMP packet going out on  If I unplug the cable and plug in a cable to a NIC which I also enable (it was disabled prior) at:

It will ping.  If I disable that NIC and go back to the other, the pings stop.  I know it won't work if both NICs are enabled and one is AutoIP and the other isn't and the lwIP device is on the non-AutoIP NIC.  I'm not talking about that case.  Win32 always routes to the AutoIp NIC (as it should).  When that NIC is disabled, it then routes to the other (and only) NIC.

Bill Auerbach <billauerbach>
Thu 09 Dec 2010 02:36:34 PM UTC, comment #1: 

Can you give an example of the IP addresses and network masks configured at both ends?

Kieran Mansley <kieranm>
Project Member
Wed 08 Dec 2010 08:53:03 PM UTC, original submission:  

One cannot talk to an lwIP device with an AUTOIP address from a host that does not have an AUTOIP address.

Test case: LWIP_DHCP and LWIP_AUTOIP are both 0.  Set the device to have an AUTOIP (link-local) address.  You cannot ping or connect to the device from an interface that does not have an AUTOIP address.  If the interface has an AUTOIP address, it does work OK.

There are RFC cases covering assigning AUTOIP addresses and for a device having an AUTOIP address. I'm pretty confident that the first part (assigning) is right. I thought maybe code is removed with LWIP_AUTOIP = 0 to cause this problem, but setting LWIP_AUTOIP to 1 does not change this behavior.

Bill Auerbach <billauerbach>


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by dempson (Interested party)
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by kieranm (Posted a comment)
  • -email is unavailable- added by billauerbach (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-12-15 goldsimon StatusNone => Invalid
        Open/ClosedOpen => Closed
    2010-12-09 dempson Carbon-Copy- => Added dempson

    Back to the top

    Powered by Savane 3.5