lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #45120] Broadcast & multiple interfaces handling


From: Jens Nielsen
Subject: [lwip-devel] [bug #45120] Broadcast & multiple interfaces handling
Date: Sun, 17 May 2015 20:06:04 +0000
User-agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36

URL:
  <http://savannah.nongnu.org/bugs/?45120>

                 Summary: Broadcast & multiple interfaces handling
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: deft
            Submitted on: sön 17 maj 2015 20.06.02
                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: git head

    _______________________________________________________

Details:

This is a follow up to the discussion on
https://savannah.nongnu.org/bugs/?38803

Since I wasn't happy with my first patch (because it was wrong) and I also
found some other issues with broadcast packets I tried to straighten out what
I believe would be the correct implementation with regards to handling of
broadcasts and ping when having multiple interfaces.

The attached patch covers:
* ICMP echo reply should use specific-destination address from request as
source address, as per RFC 1122 3.2.1.3 "the destination address in the IP
header unless the header contains a broadcast or multicast address, in which
case the specific-destination is an IP address assigned to the physical
interface on which the datagram arrived". The current implementation is
incorrect when unicast ping is received on one interface but matching another,
as Valery commented on bug #38803.
* In most cases ip_addr_isbroadcast() compares with the netif the datagram
arrived on, not the netif it actually matched.

Also attached a wireshark trace as demonstration of various pings.
192.168.5.198 is my PC, .88 is the main netif of my target, and 192.168.6.211
is a dummy netif I added to be able to test this.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: sön 17 maj 2015 20.06.02  Name: broadcast.patch  Size: 4 kB   By: deft

<http://savannah.nongnu.org/bugs/download.php?file_id=34035>
-------------------------------------------------------
Date: sön 17 maj 2015 20.06.02  Name: broadcast_ping.pcap  Size: 834 B   By:
deft

<http://savannah.nongnu.org/bugs/download.php?file_id=34036>

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Meddelandet skickades via/av Savannah
  http://savannah.nongnu.org/




reply via email to

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