From owner-freebsd-bugs@FreeBSD.ORG Thu Jun 29 05:55:27 2006 Return-Path: X-Original-To: freebsd-bugs@FreeBSD.org Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 26A1D16A4CE; Thu, 29 Jun 2006 05:55:27 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mx18.yandex.ru (smtp2.yandex.ru [213.180.200.18]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6869A43D8C; Thu, 29 Jun 2006 05:55:24 +0000 (GMT) (envelope-from bu7cher@yandex.ru) Received: from mail.kirov.so-cdu.ru ([81.18.142.225]:4105 "EHLO [127.0.0.1]" smtp-auth: "bu7cher" TLS-CIPHER: "DHE-RSA-AES256-SHA keybits 256/256 version TLSv1/SSLv3" TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S3377188AbWF2FzU (ORCPT + 4 others); Thu, 29 Jun 2006 09:55:20 +0400 X-Comment: RFC 2476 MSA function at smtp2.yandex.ru logged sender identity as: bu7cher Message-ID: <44A36B44.1030100@yandex.ru> Date: Thu, 29 Jun 2006 09:55:16 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Bruce M Simpson References: <200606282026.k5SKQF76000393@freefall.freebsd.org> In-Reply-To: <200606282026.k5SKQF76000393@freefall.freebsd.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: Robert Watson , freebsd-bugs@FreeBSD.org, Gleb Smirnoff , andre@freebsd.org, citrin@citrin.ru Subject: Re: kern/99558: FreeBSD 6.1 can't send packets to INADDR_BROADCAST X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jun 2006 05:55:27 -0000 Bruce M Simpson wrote: > Please read the manual page ip(4) for information on the IP_ONESBCAST > option. The INADDR_BROADCAST destination is by its nature non specific > and link local therefore you need to use the IP_ONESBCAST option to > cause undirected broadcasts to be sent on a particular interface. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=99558 Ok. I've tested 5.4-STABLE. Without IP_ONESBCAST: 09:24:50.293393 IP 10.0.0.4.5000 > 10.0.7.255.5000: UDP, length: 4 0x0000: ffff ffff ffff 0007 e909 d5b3 0800 4500 ..............E. 0x0010: 0020 24d7 0000 4011 39f4 0a00 0004 0a00 ..$...@.9....... 0x0020: 07ff 1388 1388 000c 1c20 7465 7374 ..........test With IP_ONESBCAST: 09:28:08.275418 IP 10.0.0.4.54715 > 255.255.255.255.5000: UDP,length:4 0x0000: ffff ffff ffff 0007 e909 d5b3 0800 4500 ..............E. 0x0010: 0020 8987 0000 4011 e742 0a00 0004 ffff ......@..B...... 0x0020: ffff d5bb 1388 000c 0a21 7465 7374 .........!test In result we have difference only in IP destination address. I want to pay attention that a Ethernet destination address is a ethernet broadcast! Now for 6.1-STABLE. Without IP_ONESBCAST: 10:43:15.384080 IP 172.21.81.19.58298 > 255.255.255.255.5000: UDP, length 4 0x0000: 0011 936b 3c91 0080 4819 86df 0800 4500 ...k<...H.....E. 0x0010: 0020 a670 0000 4011 d734 ac15 5113 ffff ...p..@..4..Q... 0x0020: ffff e3ba 1388 000c 2391 7465 7374 0000 ........#.test.. 0x0030: 0000 0000 0000 0000 0000 0000 ............ With IP_ONESBCAST: 10:44:20.320314 IP 172.21.81.19.53276 > 255.255.255.255.5000: UDP, length 4 0x0000: 0011 936b 3c91 0080 4819 86df 0800 4500 ...k<...H.....E. 0x0010: 0020 a998 0000 4011 d40c ac15 5113 ffff ......@.....Q... 0x0020: ffff d01c 1388 000c 372f 7465 7374 0000 ........7/test.. 0x0030: 0000 0000 0000 0000 0000 0000 ............ In result we have an identical datagrams with *incorrect* ethernet destination addresses. When my system don't have default route, he can not send broadcast. I've got error message "sendto(): Network is unreachable"! -- WBR, Andrey V. Elsukov