divert(4) socket isn't connection oriented

Archie Cobbs archie at dellroad.org
Mon Nov 15 06:30:06 PST 2004


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


More information about the freebsd-net mailing list