Date: Tue, 3 Oct 2006 17:39:12 +0200 (CEST) From: DEVILLE Damien <damien.deville@netasq.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: kern/103950: Broadcast packets are not forwarded Message-ID: <20061003153912.EA618F74B8@darkstar.netasq.com> Resent-Message-ID: <200610031540.k93FeMYl063152@freefall.freebsd.org>
index | next in thread | raw e-mail
>Number: 103950
>Category: kern
>Synopsis: Broadcast packets are not forwarded
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Oct 03 15:40:22 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: DEVILLE Damien
>Release: FreeBSD 6.1-STABLE i386
>Organization:
NETASQ
>Environment:
System: FreeBSD darkstar.netasq.com 6.1-STABLE FreeBSD 6.1-STABLE #1: Thu May 11 11:43:31 CEST 2006 vanhu@darkstar.netasq.com:/home/vanhu/work/FreeBSD/src-RELENG6/sys/i386/compile/GENERIC.IPSEC i386
>Description:
On a FreeBSD gate, broadcasts received on an interface with a destination
belonging to another interface are not correctly forwarded because
IP_ALLOWBROADCAST is not set in ip_output() call from ip_forward().
>How-To-Repeat:
Set up a gate with 2 NICs (for example 192.168.1.0/24 and 192.168.2.0/24).
>From a host on 192.168.1.0/24, do a ping to 192.168.2.255.
The packet will go through ip_forward(), but will be dropped in
ip_output().
>Fix:
--- sys/netinet/ip_input.c.orig Fri Sep 29 11:35:14 2006
+++ sys/netinet/ip_input.c Fri Sep 29 11:35:22 2006
@@ -2006,7 +2006,7 @@
RTFREE(rt);
}
- error = ip_output(m, NULL, NULL, IP_FORWARDING, NULL, NULL);
+ error = ip_output(m, NULL, NULL, IP_FORWARDING|IP_ALLOWBROADCAST, NULL, NULL);
if (error)
ipstat.ips_cantforward++;
else {
>Release-Note:
>Audit-Trail:
>Unformatted:
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061003153912.EA618F74B8>
