From owner-freebsd-bugs@FreeBSD.ORG Sun Sep 14 06:40:13 2003 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40DF616A4BF for ; Sun, 14 Sep 2003 06:40:13 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D8C443FE3 for ; Sun, 14 Sep 2003 06:40:12 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.9/8.12.9) with ESMTP id h8EDeCUp049443 for ; Sun, 14 Sep 2003 06:40:12 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.9/8.12.9/Submit) id h8EDeCA6049442; Sun, 14 Sep 2003 06:40:12 -0700 (PDT) Date: Sun, 14 Sep 2003 06:40:12 -0700 (PDT) Message-Id: <200309141340.h8EDeCA6049442@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: lupe@lupe-christoph.de (Lupe Christoph) Subject: Re: kern/26506: sendto() syscall returns EINVAL in jail environment X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Lupe Christoph List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Sep 2003 13:40:13 -0000 The following reply was made to PR kern/26506; it has been noted by GNATS. From: lupe@lupe-christoph.de (Lupe Christoph) To: freebsd-gnats-submit@FreeBSD.org Cc: venglin@freebsd.lublin.pl Subject: Re: kern/26506: sendto() syscall returns EINVAL in jail environment Date: Sun, 14 Sep 2003 15:33:10 +0200 The two-line patch does not work for snmpwalk. It fails on the *second* invocation of sendto(), with or without the patch: 275 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 6 275 setsockopt(6, SOL_SOCKET, SO_SNDBUF, [131072], 4) = 0 275 setsockopt(6, SOL_SOCKET, SO_RCVBUF, [131072], 4) = 0 275 sendto(6, "0&\2\1\0\4\6public\241\31\2\4NE\335\376\2\1\0\2\1\0000"..., 40, 0, {sa_family=AF_INET, sin_port=htons(161), sin_addr=inet_addr("172.17.0.7")}, 16) = 40 275 gettimeofday({1063545390, 64920}, NULL) = 0 275 gettimeofday({1063545390, 65344}, NULL) = 0 275 select(7, [6], NULL, NULL, {0, 999576}) = 1 (in [6]) 275 break(0x809b000) = 0 275 recvfrom(6, "0\201\200\2\1\0\4\6public\242s\2\4NE\335\376\2\1\0\2\1"..., 65536, 0, {sa_family=AF_INET, sin_port=htons(161), sin_addr=inet_addr("172.17.0.8")}, [16]) = 131 275 fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(5, 0), ...}) = 0 275 ioctl(1, TIOCGETA, {B38400 opost isig icanon echo ...}) = 0 275 write(1, "SNMPv2-MIB::sysDescr.0 = STRING:"..., 121) = 121 275 sendto(6, "0)\2\1\0\4\6public\241\34\2\4NE\335\377\2\1\0\2\1\0000"..., 43, 0, {sa_family=AF_INET, sin_port=htons(161), sin_addr=inet_addr("172.17.0.7")}, 16) = -1 EINVAL (Invalid argument) 275 write(2, "snmpwalk: Failure in sendto (Inv"..., 47) = 47 275 close(6) = 0 275 exit(1) = ? This is on 4.8-RELEASE-p4. Przemyslaw Frasunek's patch for 4.5-STABLE does not apply to 4.8-STABLE, so I can't check if that method works. It's possible this problem is caused by something else, anyway. -- | lupe@lupe-christoph.de | http://www.lupe-christoph.de/ | | "Violence is the resort of the violent" Lu Tze | | "Thief of Time", Terry Pratchett |