From owner-cvs-all@FreeBSD.ORG Thu Mar 1 13:29:30 2007 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DE41516A404; Thu, 1 Mar 2007 13:29:30 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id D5C5E13C471; Thu, 1 Mar 2007 13:29:30 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l21DTUPt081333; Thu, 1 Mar 2007 13:29:30 GMT (envelope-from bms@repoman.freebsd.org) Received: (from bms@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l21DTUND081332; Thu, 1 Mar 2007 13:29:30 GMT (envelope-from bms) Message-Id: <200703011329.l21DTUND081332@repoman.freebsd.org> From: Bruce M Simpson Date: Thu, 1 Mar 2007 13:29:30 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/netinet ip_output.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Mar 2007 13:29:31 -0000 bms 2007-03-01 13:29:30 UTC FreeBSD src repository Modified files: sys/netinet ip_output.c Log: Fix undirected broadcast sends for the case where SO_DONTROUTE has also been set at the socket layer, in our somewhat convoluted IPv4 source selection logic in ip_output(). IP_ONESBCAST is actually a special case of SO_DONTROUTE, as 255.255.255.255 must always be delivered on a local link with a TTL of 1. If IP_ONESBCAST has been set at the socket layer, also perform destination interface lookup for point-to-point interfaces based on the destination address of the link; previously it was not possible to use the option with such interfaces; also, the destination/broadcast address fields map to the same field within struct ifnet, which doesn't help matters. One more valid fix going forward for these issues is to treat 255.255.255.255 as a destination in its own right in the forwarding trie. Other implementations do this. It fits with the use of multiple paths, though it then becomes necessary to specify interface preference. This hack will eventually go away when that comes to pass. Reviewed by: andre MFC after: 1 week Revision Changes Path 1.270 +14 -11 src/sys/netinet/ip_output.c