From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 28 01:24:20 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D868916A400 for ; Wed, 28 Mar 2007 01:24:20 +0000 (UTC) (envelope-from steve@Watt.COM) Received: from wattres.watt.com (wattres.watt.com [66.93.133.130]) by mx1.freebsd.org (Postfix) with ESMTP id BB82213C44B for ; Wed, 28 Mar 2007 01:24:20 +0000 (UTC) (envelope-from steve@Watt.COM) Received: from wattres.watt.com (localhost.watt.com [127.0.0.1]) by wattres.watt.com (8.13.8/8.13.8) with ESMTP id l2S1OF53028862; Tue, 27 Mar 2007 18:24:20 -0700 (PDT) (envelope-from steve@wattres.watt.com) Received: (from steve@localhost) by wattres.watt.com (8.13.8/8.13.8/Submit) id l2S1OFI5028861; Tue, 27 Mar 2007 18:24:15 -0700 (PDT) (envelope-from steve) Message-Id: <200703280124.l2S1OFI5028861@wattres.watt.com> From: steve@Watt.COM (Steve Watt) Date: Tue, 27 Mar 2007 18:24:14 -0700 In-Reply-To: "Daniel O'Connor" "Re: sendto() giving EPERM outside a jail" (Mar 28, 10:23) X-Mailer: Mail User's Shell (7.2.6 beta(5) 10/07/98) To: "Daniel O'Connor" , Steve Watt X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (wattres.watt.com [127.0.0.1]); Tue, 27 Mar 2007 17:24:20 -0800 (PST) X-Archived: 1175045060.258568752@wattres.Watt.COM Cc: freebsd-hackers@freebsd.org Subject: Re: sendto() giving EPERM outside a jail X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Mar 2007 01:24:20 -0000 On Mar 28, 10:23, "Daniel O'Connor" wrote: } Subject: Re: sendto() giving EPERM outside a jail } } On Saturday 24 March 2007 02:47, Steve Watt wrote: } > >According to my reading of the man page it is not possible to get this } > > error unless I'm using jails (which I'm not). The code in question does. } > That's probably a buglet in the man page. } } I guess it would be nice if the man page(s) mentioned that a firewall could } cause EPERM. I have seen it before with other apps but the sendto() confused } me. It's one of those unpleasant interactions between pluggable subsystems, so it's a bit tough to document -- there are various different firewalls available, after all. } > >Can someone shed light on what the problem is? The application appears to } > > work fine even with this error though. } > } > man setsockopt, search for SO_BROADCAST. } } It doesn't say anything about EPERM. If you're sending broadcast broadcast or multicast datagrams, you need to set the SO_BROADCAST socket option, as well. -- Steve Watt KD6GGD PP-ASEL-IA ICBM: 121W 56' 57.5" / 37N 20' 15.3" Internet: steve @ Watt.COM Whois: SW32-ARIN Free time? There's no such thing. It just comes in varying prices...