Re: divert(4) socket isn't connection oriented

From: Archie Cobbs (archie_at_dellroad.org)
Date: 11/15/04

  • Next message: Sławek Żak: "route add -host ... -iface issues"
    To: Gleb Smirnoff <glebius@freebsd.org>
    Date: Mon, 15 Nov 2004 08:17:41 -0600 (CST)
    
    

    Gleb Smirnoff wrote:
    > Since it is working, it was not noticed quickly. Real problems occur when
    > a multicast packet comes on interface: it is diverted to ng_ksocket, returned
    > and div_output() sends it to ip_output(). In ip_output() it is ip_mloopback()ed
    > and if_simloop()ed. A copy of packet enters divert socket, duplicated... a
    > forever loop and total freeze.

    Your fix makes sense, but is it more of a workaround than a proper fix?
    It seems like the real bug is that divert is promising to write the packet
    as "outgoing" yet the packet loops back as "incoming". Maybe it would make
    more sense to attach a tag to the packet that divert would recognize and
    know to ignore the extra incoming packet.

    Also, does the same thing happen with broadcast packets?

    -Archie

    __________________________________________________________________________
    Archie Cobbs * CTO, Awarix * http://www.awarix.com
    _______________________________________________
    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: Sławek Żak: "route add -host ... -iface issues"

    Relevant Pages

    • Re: Application layer classifier for ipfw
      ... packet back at the specified rule number. ... configuration file and firewall script to get you started. ... when any number after the divert rule/s would do. ... As long as you don't subtract one for the non-match packets reinjected ...
      (freebsd-net)
    • Re: Application layer classifier for ipfw
      ... The tarball has a sample>>> configuration file and firewall script to get you started. ... I had the configuration file specify the rule number that passes the diverted packets to dummynet. ... The code would subtract 1 from the number when it wrote the packet back, but I wasn't sure how ipfwwould react to a possibly non-existant rule so changed it to its current form. ... when any number after the divert rule/s would do. ...
      (freebsd-net)
    • Re: divert(4) socket isnt connection oriented
      ... > would make more sense to attach a tag to the packet that divert would ... > recognize and know to ignore the extra incoming packet. ... divert sockets permitting connection without quite having the more common ...
      (freebsd-net)
    • Re: Telling BSD to stop resetting the connection!
      ... Any ideas on how to stop the net stack from resetting my connections, ... The following rules are added dynamically when my client sends a packet to a server so we can get it back on the divert socket. ...
      (freebsd-hackers)
    • divert(4) socket isnt connection oriented
      ... I've spent several days digging in interaction between divert ... it tells incoming packet from outgoing ... It is important that ng_ksocket does not save sockaddr if socket is ... connection destination. ...
      (freebsd-net)