From owner-freebsd-net Tue Aug 15 10:51:29 2000 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id BF6C037BE3B for ; Tue, 15 Aug 2000 10:51:24 -0700 (PDT) (envelope-from wollman@khavrinen.lcs.mit.edu) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id NAA54480; Tue, 15 Aug 2000 13:51:18 -0400 (EDT) (envelope-from wollman) Date: Tue, 15 Aug 2000 13:51:18 -0400 (EDT) From: Garrett Wollman Message-Id: <200008151751.NAA54480@khavrinen.lcs.mit.edu> To: "Eugene Mogutov" Cc: freebsd-net@FreeBSD.ORG Subject: Broadcast address and multihomed host In-Reply-To: References: Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < said: > Recently a friend of mine noticed that his FreeBSD router treats > broadcast addresses of local subnets as local (i.e. as if they were > addresses of router interfaces). [Reformatted. It would help if you pressed ``return'' at the end of a line.] The behavior is arguable. The current behavior is relatively easy to explain: 1) The remote host sends its SYN segment as a unicast, since it does not have the information to determine that x.y.z.255 is a broadcast -- indeed, it might not be if x.y.z.255 is on a /23 or larger network. 2) A packet arrives on a.b.c.1/24 with destination address x.y.z.255. ip_input() looks to see if x.y.z.255 is configured on any interface. It is -- it's configured on the x.y.z.1/24 interface -- so it accepts the packet. 3) The code in tcp_input() which checks for broadcasts and multicasts looks only at the delivery flags (M_MCAST and M_BCAST); it doesn't re-examine the addresses. -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-net" in the body of the message