From owner-freebsd-bugs@FreeBSD.ORG Tue Jun 27 11:00:49 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1A6FB16A40F for ; Tue, 27 Jun 2006 11:00:49 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46F0243D82 for ; Tue, 27 Jun 2006 11:00:44 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k5RB0gtw058354 for ; Tue, 27 Jun 2006 11:00:42 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k5RB0gee058353; Tue, 27 Jun 2006 11:00:42 GMT (envelope-from gnats) Date: Tue, 27 Jun 2006 11:00:42 GMT Message-Id: <200606271100.k5RB0gee058353@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: Colin Petrie Cc: Subject: Re: kern/98799: [netinet] fastforwarding routes packets to network ip address X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Colin Petrie List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2006 11:00:49 -0000 The following reply was made to PR kern/98799; it has been noted by GNATS. From: Colin Petrie To: bug-followup@FreeBSD.org, dmitry@trifle.net Cc: Subject: Re: kern/98799: [netinet] fastforwarding routes packets to network ip address Date: Tue, 27 Jun 2006 11:58:57 +0100 This is a multi-part message in MIME format. --------------020208010008040701020709 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, This patch should fix your issue, could you give it a try and let me know if it works? I make no promises about this code being any good but it appears to do the job at my end where I have the same problem Please let me know if this helps Regards, Colin --------------020208010008040701020709 Content-Type: text/x-patch; name="fastfwd.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fastfwd.patch" *** ip_fastfwd.c Tue Jun 27 11:29:01 2006 --- ip_fastfwd.c.new Tue Jun 27 11:30:18 2006 *************** ip_fastforward(struct mbuf *m) *** 162,167 **** --- 162,168 ---- u_short sum, ip_len; int error = 0; int hlen, mtu; + int isbroadcast; #ifdef IPFIREWALL_FORWARD struct m_tag *fwd_tag; #endif *************** ip_fastforward(struct mbuf *m) *** 275,280 **** --- 276,282 ---- goto drop; } + #ifdef ALTQ /* * Is packet dropped by traffic conditioner? *************** passin: *** 421,426 **** --- 423,439 ---- */ if (ro.ro_rt->rt_flags & RTF_BLACKHOLE) goto drop; + + /* + * Is packet a directed network broadcast packet? + */ + isbroadcast = in_broadcast(dst->sin_addr, ifp); + if (isbroadcast) { + printf("ip_fastfwd: dropping directed broadcast - to %s\n", + inet_ntoa(dst->sin_addr)); + ipstat.ips_badaddr++; + goto drop; + } /* * Step 5: outgoing firewall packet processing --------------020208010008040701020709--