Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Mar 2007 12:01:26 +1030
From:      "Daniel O'Connor" <doconnor@gsoft.com.au>
To:        freebsd-hackers@freebsd.org
Subject:   sendto() giving EPERM outside a jail
Message-ID:  <200703221201.35028.doconnor@gsoft.com.au>

next in thread | raw e-mail | index | archive | help
--nextPart10978469.fvKzAiQKUE
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi,
I am trying to port miniupnpd (http://miniupnp.tuxfamily.org/) and by in la=
rge=20
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 erro=
r=20
unless I'm using jails (which I'm not). The code in question does..

memset(&sockname, 0, sizeof(struct sockaddr_in));
sockname.sin_family =3D AF_INET;
sockname.sin_port =3D htons(PORT);
sockname.sin_addr.s_addr =3D 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"
=2E..
        n =3D 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 w=
ork=20
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.

=2D-=20
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
  -- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C

--nextPart10978469.fvKzAiQKUE
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQBGAdx25ZPcIHs/zowRAsRmAJ9guDUDTDSyaEasiNpm55tSPA8I/gCfYa2u
gEO/kKxo98eyR0gTyJDRxys=
=ScwC
-----END PGP SIGNATURE-----

--nextPart10978469.fvKzAiQKUE--



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