Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Mar 2007 18:43:10 -0700
From:      Julian Elischer <julian@elischer.org>
To:        Daniel O'Connor <doconnor@gsoft.com.au>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: sendto() giving EPERM outside a jail
Message-ID:  <4601DF2E.2050705@elischer.org>
In-Reply-To: <200703221201.35028.doconnor@gsoft.com.au>
References:  <200703221201.35028.doconnor@gsoft.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
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..

you can get it from the firewall too..

> 
> 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.
> 
> I am running it on a FreeBSD 6.2 system.
> 
> Thanks.
> 
> PS please CC me as I am not subscribed.
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4601DF2E.2050705>