On Thu, 8 Apr 1999 [EMAIL PROTECTED] wrote:
> Dear All;
> 
>       When receiving packets from a SOCK_PACKET type of socket, bound to
> the lo device, I seem to get two copies of any packet that goes through
> the device. (actually, it doesnt matter if its is specificly bound to
> the lo device, I always get 'two for one' from lo )
> 
>       eg. (tcpdump uses libpcap0.4a6, which gets its packets this way)
> tcpdump -i lo
> 
> ping -c1 localhost
> 
> tcpdump: listening on lo
> 22:52:10.920000 localhost > localhost: icmp: echo request
> 22:52:10.920000 localhost > localhost: icmp: echo request
> 22:52:10.920000 localhost > localhost: icmp: echo reply
> 22:52:10.920000 localhost > localhost: icmp: echo reply
> 
> (Ive also written my own code to read this, and the repeated packets are
> identical.)
> 
>   Can anyone explain this to me?
>       Im running 2.2.5 and loading af_packet as a module.
> 
> appreciative of any information;
> Paul
Since both source and destination are the same on the loopback device you
see all packets, both those your requests and the replies that are in
effect also sent by you.

This is also the reason for old pings to break on loopback, since they
count their own request as a reply.

-- 
Henrik Olsen,  Dawn Solutions I/S       URL=http://www.iaeste.dk/~henrik/
A Pentium is a terrible thing to waste, http://www.mersenne.org/prime.htm

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to