Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Date: Thu, 7 Nov 2002 11:27:21 +0100 From: Corinna Vinschen To: cygwin AT cygwin DOT com Cc: Gilles Courcoux Subject: Re: ioctl(SIOCGIFFLAGS) uses the interface address instead of name? Message-ID: <20021107112721.K2180@cygbert.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com, Gilles Courcoux References: <20021016160516 DOT GA17962 AT redhat DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021016160516.GA17962@redhat.com> User-Agent: Mutt/1.3.22.1i On Wed, 16 Oct 2002 15:09:24 +0200 (MEST), Gilles Courcoux wrote: > I would thus propose this modification to fhandler_socket.cc (change that > shouldn't break applications relying on the until-now cygwin behavior) : > > --- fhandler_socket.cc Sat Jul 6 08:05:32 2002 > +++ fhandler_socket.cc.new Thu Oct 10 19:05:33 2002 > @@ -996,7 +996,8 @@ > return -1; > } > ifr->ifr_flags = IFF_NOTRAILERS | IFF_UP | IFF_RUNNING; > - if (ntohl (((struct sockaddr_in *) &ifr->ifr_addr)->sin_addr.s_addr) > + if ((! strncmp(ifr->ifr_name, "lo", 2)) > + || ntohl (((struct sockaddr_in *) &ifr->ifr_addr)->sin_addr.s_addr) > == INADDR_LOOPBACK) > ifr->ifr_flags |= IFF_LOOPBACK; > else Thanks for that patch! Applied. Corinna -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/