Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 May 2001 10:10:05 -0700 (PDT)
From:      "Cyril A. Vechera" <cyril@piter.net>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/26506: sendto() syscall returns EINVAL in jail environment
Message-ID:  <200105081710.f48HA5r75259@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/26506; it has been noted by GNATS.

From: "Cyril A. Vechera" <cyril@piter.net>
To: <freebsd-gnats-submit@FreeBSD.org>, <venglin@freebsd.lublin.pl>
Cc:  
Subject: Re: kern/26506: sendto() syscall returns EINVAL in jail environment
Date: Tue, 8 May 2001 18:03:51 +0400

 Problem has been solved.
 
 *** in_pcb.c.orig       Tue Mar 13 01:10:51 2001
 --- in_pcb.c    Tue May  8 17:00:21 2001
 ***************
 *** 485,499 ****
         struct sockaddr_in sa;
         int error;
 
 -       if (inp->inp_laddr.s_addr == INADDR_ANY && p->p_prison != NULL) {
 -               bzero(&sa, sizeof (sa));
 -               sa.sin_addr.s_addr = htonl(p->p_prison->pr_ip);
 -               sa.sin_len=sizeof (sa);
 -               sa.sin_family = AF_INET;
 -               error = in_pcbbind(inp, (struct sockaddr *)&sa, p);
 -               if (error)
 -                       return (error);
 -       }
         /*
          *   Call inner routine, to assign local interface address.
          */
 --- 485,490 ----
 ***************
 *** 507,513 ****
         }
         if (inp->inp_laddr.s_addr == INADDR_ANY) {
                 if (inp->inp_lport == 0) {
 !                       error = in_pcbbind(inp, (struct sockaddr *)0, p);
                         if (error)
                             return (error);
                 }
 --- 498,509 ----
         }
         if (inp->inp_laddr.s_addr == INADDR_ANY) {
                 if (inp->inp_lport == 0) {
 !                       bzero(&sa, sizeof (sa));
 !                       if (p->p_prison )
 !                               sa.sin_addr.s_addr =
 htonl(p->p_prison->pr_ip);
 !                       sa.sin_len = sizeof (sa);
 !                       sa.sin_family = AF_INET;
 !                       error = in_pcbbind(inp, (struct sockaddr *)&sa, p);
                         if (error)
                             return (error);
 
 
 
 
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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