From owner-freebsd-current Sat Mar 18 11:54:37 2000 Delivered-To: freebsd-current@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 16FE337B609 for ; Sat, 18 Mar 2000 11:54:34 -0800 (PST) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id OAA77677; Sat, 18 Mar 2000 14:54:26 -0500 (EST) (envelope-from wollman) Date: Sat, 18 Mar 2000 14:54:26 -0500 (EST) From: Garrett Wollman Message-Id: <200003181954.OAA77677@khavrinen.lcs.mit.edu> To: Archie Cobbs Cc: freebsd-current@FreeBSD.ORG Subject: ICMP socket weirdness In-Reply-To: <200003172303.PAA70386@bubba.whistle.com> References: <200003172303.PAA70386@bubba.whistle.com> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG < said: > When the program is run, if you ping the IP address from the > local machine, it sees packets. However, if you ping it from > a remote machine, it doesn't see packets. The ICMP never passes certain packets up to raw listeners. These include ECHO REQUEST, TIMESTAMP REQUEST, and SUBNET MASK REQUEST packets -- but not the corresponding replies! So, when you ping the local machine, you will see the ECHO REPLY packets on all raw listners, but not the initial ECHO REQUESTs. When you ping from a remote machine, you never see the ECHO REQUEST packets because the kernel takes care of them, and you never see the ECHO REPLY packets because they are addressed to the other machine. It would be possible to pass all ICMP packets to the raw listeners, but it would require rewriting parts of icmp_input() (which would not be a bad idea) either to avoid modifying the packet in-place or to keep a copy of the original before responding -- either of which would slow down `ping' processing. -GAWollman -- Garrett A. Wollman | O Siem / We are all family / O Siem / We're all the same wollman@lcs.mit.edu | O Siem / The fires of freedom Opinions not those of| Dance in the burning flame MIT, LCS, CRS, or NSA| - Susan Aglukark and Chad Irschick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message