lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [patch #9006] Prefer non-same interfaces in IPv4 routing


From: Brian Armstrong
Subject: [lwip-devel] [patch #9006] Prefer non-same interfaces in IPv4 routing
Date: Sat, 21 May 2016 01:19:03 +0000 (UTC)
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:46.0) Gecko/20100101 Firefox/46.0

URL:
  <http://savannah.nongnu.org/patch/?9006>

                 Summary: Prefer non-same interfaces in IPv4 routing
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: brian_armstrong
            Submitted on: Sat 21 May 2016 01:19:00 AM GMT
                Category: IPv4
                Priority: 3 - Low
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

Hi!

I love this project. It's going to be perfect for what I need. I'm writing an
entirely software-based device -- there's no hardware component to my eth
except for a D/A converter and an amp.

I was testing my new device driver in a sort of virtualized way, with two
interfaces added (via netif_add) on the same subnet. I then forward data
between these devices over virtual links. I suspect this a relatively common
way of bootstrapping for soft devices, however uncommon this use case might
be.

Unfortunately, when you bootstrap this way, the default routing behavior
causes lwIP to always prefer one interface, meaning that it's possible to send
from interface A to B, but not B to A (since we're really sending A to A, in
that case).

I humbly submit this as an easy fix to the issue. When routing, we will prefer
a non-same interface, that is, an interface with a different address than the
destination. We will still fall back to the same one if no other suitable
interface is found. I suspect this yields mostly the same behavior in lwIP,
except that this particular sort of bootstrapping is now much easier to test.

Cheers.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Sat 21 May 2016 01:19:00 AM GMT  Name: patch.txt  Size: 949B   By:
brian_armstrong

<http://savannah.nongnu.org/patch/download.php?file_id=37219>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?9006>

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




reply via email to

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