From owner-freebsd-hackers@FreeBSD.ORG Thu Mar 22 19:49:50 2007 Return-Path: X-Original-To: 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 A79D116A400 for ; Thu, 22 Mar 2007 19:49:50 +0000 (UTC) (envelope-from news@Watt.COM) Received: from wattres.watt.com (wattres.watt.com [66.93.133.130]) by mx1.freebsd.org (Postfix) with ESMTP id 8643513C448 for ; Thu, 22 Mar 2007 19:49:50 +0000 (UTC) (envelope-from news@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 l2MJFOTp042829 for ; Thu, 22 Mar 2007 12:15:29 -0700 (PDT) (envelope-from news@wattres.watt.com) Received: (from news@localhost) by wattres.watt.com (8.13.8/8.13.8/Submit) id l2MJFNCC042828 for hackers@freebsd.org; Thu, 22 Mar 2007 12:15:23 -0700 (PDT) (envelope-from news) To: hackers@freebsd.org Path: not-for-mail From: Steve Watt Newsgroups: local.freebsd-hackers Date: Thu, 22 Mar 2007 19:15:23 +0000 (UTC) Organization: Watt Consultants, San Jose, CA, USA Lines: 34 Message-ID: References: <200703221201.35028.doconnor@gsoft.com.au> NNTP-Posting-Host: localhost.watt.com X-Trace: wattres.Watt.COM 1174590923 42564 127.0.0.1 (22 Mar 2007 19:15:23 GMT) X-Complaints-To: usenet@wattres.Watt.COM NNTP-Posting-Date: Thu, 22 Mar 2007 19:15:23 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Originator: steve@Watt.COM (Steve Watt) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (wattres.watt.com [127.0.0.1]); Thu, 22 Mar 2007 11:15:29 -0800 (PST) X-Archived: 1174590929.015283265@wattres.Watt.COM X-Mailman-Approved-At: Thu, 22 Mar 2007 20:46:52 +0000 Cc: 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: Thu, 22 Mar 2007 19:49:50 -0000 In article <200703221201.35028.doconnor@gsoft.com.au>, Daniel O'Connor wrote: > >Hi, >I am trying to port miniupnpd (http://miniupnp.tuxfamily.org/) and by in large >it seems to work fine (evil idea as it is :) However it spews out a lot of.. >miniupnpd[13010]: sendto(udp_notify): Operation not permitted > >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.. > >memset(&sockname, 0, sizeof(struct sockaddr_in)); >sockname.sin_family = AF_INET; >sockname.sin_port = htons(PORT); >sockname.sin_addr.s_addr = inet_addr(UPNP_MCAST_ADDR); >while(known_service_types[i]) >{ > snprintf(bufr, sizeof(bufr), > "NOTIFY * HTTP/1.1\r\n" > "HOST:%s:%d\r\n" >... > n = sendto(s, bufr, strlen(bufr), 0, > (struct sockaddr *)&sockname, sizeof(struct sockaddr_in) ); > >(line 278 of miniupnpd.c). > >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. -- 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...