[bug #56925] Functions to obtain effective reachability (ARP or NDP) status of an IP address

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug #56925] Functions to obtain effective reachability (ARP or NDP) status of an IP address

David GIRAULT-2
URL:
  <https://savannah.nongnu.org/bugs/?56925>

                 Summary: Functions to obtain effective reachability (ARP or
NDP) status of an IP address
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: s_a
            Submitted on: Fri 20 Sep 2019 06:34:40 PM UTC
                Category: ARP
                Severity: 3 - Normal
              Item Group: Feature Request
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: 2.1.1

    _______________________________________________________

Details:

With etharp_find_addr() I can make sure there is a known ARP entry for an IPv4
address before trying to send packets. It's not perfect because it's necessary
to check the IPv4 gateway if the destination is in another network.

There is no direct equivalent for IPv6; nd6_get_next_hop_addr_or_queue()
expects a packet to be queued.

I'd like a function that indicates whether or not a packet could be
immediately sent to a specified IP address without doing ARP or NDP queries.
If it can't then it should perform the required ARP or NDP queries and return
a response indicating that they are in progress. If the destination is outside
the network then the router reachability should automatically be tested
instead.

The purpose of this is to be able to queue an arbitrary quantity of
information until ARP or NDP is successful, instead of sending UDP packets and
relying on the lwIP queue to keep all of them until ARP or NDP is completed
(because the queue size may not be large enough for this).




    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?56925>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel
Reply | Threaded
Open this post in threaded view
|

[bug #56925] Functions to obtain effective reachability (ARP or NDP) status of an IP address

David GIRAULT-2
Follow-up Comment #1, bug #56925 (project lwip):

This is what I'm currently doing to check reachability:
https://github.com/nomis/mcu-uuid-syslog/blob/f0e3b4eef0b76958c769b8f32baff2c928c9135c/src/syslog.cpp#L290

(Ignore the IPv6 "have_address" check, I know it's not strictly correct.)

For IPv4, I'm retrying ARP requests more frequently than lwIP would.

For IPv6, the call to nd6_get_next_hop_addr_or_queue() will be returning an
error when it tries to queue the packet because the buffer is NULL.

A simple reachability check function would avoid these problems.

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?56925>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/


_______________________________________________
lwip-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-devel