|
From: | Tamas Somogyi |
Subject: | [lwip-devel] [bug #27704] autoip starts with wrong address - ntohl |
Date: | Wed, 14 Oct 2009 16:10:10 +0000 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14 (.NET CLR 4.0.20506) |
URL: <http://savannah.nongnu.org/bugs/?27704> Summary: autoip starts with wrong address - ntohl Project: lwIP - A Lightweight TCP/IP stack Submitted by: tsomogyi Submitted on: Wed 14 Oct 2009 16:10:04 GMT Category: IPv4 Severity: 3 - Normal Item Group: Faulty Behaviour Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Planned Release: lwIP version: CVS Head _______________________________________________________ Details: Current code in autoip.c: static void autoip_create_addr(...) { ... u32_t addr = ntohl(LWIP_AUTOIP_CREATE_SEED_ADDR(netif)); ... Should be: u32_t addr = LWIP_AUTOIP_CREATE_SEED_ADDR(netif); So ntohl() should be removed, otherwise it reverses the byte order on little-endian platforms and makes the whole IP address calculation wrong. I'm wondering if nobody noticed this e.g. on Windows so far... _______________________________________________________ Reply to this item at: <http://savannah.nongnu.org/bugs/?27704> _______________________________________________ Message sent via/by Savannah http://savannah.nongnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |