Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Jan 2005 13:04:02 +0000 (GMT)
From:      Robert Watson <rwatson@FreeBSD.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/26506: [patch] sendto() syscall returns EINVAL in jail environment
Message-ID:  <Pine.NEB.3.96L.1050116130126.50371B-100000@fledge.watson.org>
In-Reply-To: <200501161225.j0GCP71V079502@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 16 Jan 2005, Robert Watson wrote:

> Synopsis: [patch] sendto() syscall returns EINVAL in jail environment
> 
> Responsible-Changed-From-To: freebsd-bugs->rwatson
> Responsible-Changed-By: rwatson
> Responsible-Changed-When: Sun Jan 16 12:24:48 GMT 2005
> Responsible-Changed-Why: 
> Take ownership of this bug.

I have committed a regression test for this bug as:

  src/tools/regression/netinet/udpconnectjail

Using this test, I am able to reproduce the return of EINVAL for a
connect() attempt on a UDP socket in jail(2), but not out of jail(2). 

I'll start investigating the internal details of this bug shortly.  My
initial reading is that the evaluations in the PR are correct: the connect
code appears to test for the local port being defined.  However, this is a
little odd: what jail does is "pre-bind" a socket to a particular IP, and
connect() shouldn't fail because a local port has already been bound,
since bind() followed by connect() is a permitted combination.  I'll
investigate more and follow up. 

Robert N M Watson




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.96L.1050116130126.50371B-100000>