PF_PACKET, ETH_P_IP does not catch outgoing packets.

Edgar Toernig (froese@gmx.de)
Thu, 23 Dec 1999 17:35:11 +0100


Hi,

I noticed that raw sockets created with

socket(PF_PACKET, SOCK_RAW, htons(ETH_P_IP))

and a later

setsockopt(... ADD_MEMBERSHIP (PROMISC)...)

do not receive outgoing packets. Just changing the
protocol to ETH_P_ALL (or a later bind with that proto)
will get all packets. Is this intentional? (I don't think
so *g*) Any idea for a quick fix?

Ciao, ET.

PS: Btw, if anyone got Oopses with the defxx.c fddi driver
he should undefine the DYNAMIC_BUFFERS symbol. There's an
unchecked dev_alloc_skb in the driver that tries to get
a large buffer (fddi pkt size + a little bit, 4.5k) and
that one fails occasionally.

PPS: the PACKET_RX_RING is really great!!!

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/