Re: resolving routes externally

From: Bruce M Simpson (bms_at_spc.org)
Date: 11/23/04

  • Next message: James: "Re: resolving routes externally"
    Date: Tue, 23 Nov 2004 10:36:46 -0800
    To: Martin Eugen <martin.eugen@gmail.com>
    
    

    On Tue, Nov 23, 2004 at 11:05:06AM +0200, Martin Eugen wrote:
    > At the beginning my intention was to use the routing sockets
    > mechanisms, and say, to issue a 'missing route' message to some
    > userland daemon capable of resolving those complex addresses (the
    > resolving mechanism is generally a lookup in a local DB). But then I

    You're on the right track here. You might also wish to investigate
    the RTM_RESOLVE mechanism.

    > realized there is no (Am I missing it?) code in the routing modules
    > that could make the thread handling the packet sleep until the
    > userland daemon is looking up the route. (I'm also still not sure if a
    > 'netisr' thread is safe to sleep?) So I started to look at the ARP
    > code, but it of course lacks the kernel - userland communication
    > interface. I would appreciate any ideas about what would be the easier
    > way to implement such a thing where the kernel could wait (up to some
    > reasonable time-out) a userland daemon to install a new route.

    If I understand correctly, you want the kernel to queue packets until
    layer 2 address resolution is complete. Right now we don't do this. If
    there is no route to a destination, packets will be dropped.

    The ARP code implements a queue for each IP host address which is
    exactly 1 mbuf long (see llinfo_arp->la_hold). This holds the most
    recent packet that the host is attempting to transmit to the host
    pending MAC address lookup. All other packets will be dropped.

    Making a network stack thread sleep would be a Very Bad Idea. A more
    appropriate approach would be to use a separate netisr queue for
    packets which have pending external MAC address lookup. However,
    rather than calling netisr_dispatch() directly, you would want to
    call schednetisr() directly once the route resolution was complete.

    I guess this is non-IP traffic, in which case making the modifications
    which you need will probably be easier.

    Regards,
    BMS
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: James: "Re: resolving routes externally"

    Relevant Pages

    • Re: IPCOP login help
      ... Because there is no route to that network, ... so that host will send it to... ... can be reached by sending the packets to 192.168.1.1, ... 1458 Requirements for Multicast Protocols. ...
      (comp.security.firewalls)
    • Re: Cant ping router.
      ... Ping 192.168.0.1: 56 data bytes ... ping: send: Host is down ... packets transmitted, 0 packets received, 100% packet loss ... the 'route change' command I gave you explicitly disables ...
      (comp.sys.acorn.networking)
    • VxWorks call Ping () to Unreachable host goes into an infinite loop
      ... am getting following issues in ping call of VxWorks. ... ROUTE NET TABLE ... Reachable Host 10.1.1.23 5 packets and debug option enabled. ...
      (comp.os.vxworks)
    • Re: resolving routes externally
      ... > userland daemon capable of resolving those complex addresses (the ... > userland daemon is looking up the route. ... you want the kernel to queue packets until ... The ARP code implements a queue for each IP host address which is ...
      (freebsd-hackers)
    • Re: What is a default route??
      ... lines run to two different ISPs. ... By "bonding" the NICs the OP could have automatic failover (another ... two route paths. ... route related packets out one interface and other related packets out ...
      (comp.os.linux.networking)