From owner-freebsd-current@FreeBSD.ORG Sun Aug 26 11:51:33 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E2B116A420 for ; Sun, 26 Aug 2007 11:51:33 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (dong.ci0.org [IPv6:2001:7a8:2066:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 3B93413C45D for ; Sun, 26 Aug 2007 11:51:31 +0000 (UTC) (envelope-from mlfbsd@dong.ci0.org) Received: from dong.ci0.org (localhost.ci0.org [127.0.0.1]) by dong.ci0.org (8.13.8/8.13.8) with ESMTP id l7QCPP10059984; Sun, 26 Aug 2007 14:25:25 +0200 (CEST) (envelope-from mlfbsd@dong.ci0.org) Received: (from mlfbsd@localhost) by dong.ci0.org (8.14.1/8.13.8/Submit) id l7QCPPP4059983; Sun, 26 Aug 2007 14:25:25 +0200 (CEST) (envelope-from mlfbsd) Date: Sun, 26 Aug 2007 14:25:25 +0200 From: Olivier Houchard To: Joerg Wallerich Message-ID: <20070826122525.GA59924@ci0.org> References: <20070826110841.GA31243@falcon.net.t-labs.tu-berlin.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="xHFwDpU9dbj6ez1V" Content-Disposition: inline In-Reply-To: <20070826110841.GA31243@falcon.net.t-labs.tu-berlin.de> User-Agent: Mutt/1.4.1i Cc: freebsd-current@freebsd.org Subject: Re: Network problems with sendto() syscall X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Aug 2007 11:51:33 -0000 --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Aug 26, 2007 at 01:08:41PM +0200, Joerg Wallerich wrote: > Hi all, > > since moving to 7-CURRENT I have a serious problem with > the network stack when using the sendto() syscall. > > The problem appears as soon as I work with bootpd(8). As > soon as bootpd tries to answer a BOOTP request, the > sendto() call fails with EAFNOSUPPORT, I get kernel log > messages like > > 'fxp0: can't handle af18' > > and then I can no longer access the IP address I sent the > BOOTP request from. > > The call to sendto() in bootpd seems OK, so I doubt that the > problem lies with bootpd. The NIC driver seems to be OK as > well, as the problems appears with three different drivers > (fxp, nfe, rl). I even get things like > > 'kernel: looutput: af=18 unexpected' > > in the logs when using bootptest on the local machine. > > This problem can be reproduced on my hardware using a > vanilla installation of the latest snapshot of 7-CURRENT (200708). > > > Does anyone see this behavior besides myself? > > Thanks, > Joerg > Hi Joerg, This is a known problem. Until the proper fix is committed, you can use the attached patch, it should make bootp usable again. Regards, Olivier --xHFwDpU9dbj6ez1V Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="rtsock.c.diff" Index: net/rtsock.c =================================================================== RCS file: /cognet/ncvs/src/sys/net/rtsock.c,v retrieving revision 1.142 diff -u -p -r1.142 rtsock.c --- net/rtsock.c 27 Mar 2007 19:36:12 -0000 1.142 +++ net/rtsock.c 7 Aug 2007 20:41:52 -0000 @@ -528,7 +528,8 @@ route_output(struct mbuf *m, struct sock RT_UNLOCK(rt); senderr(error); } - rt->rt_flags |= RTF_GATEWAY; + if (!(rt->rt_flags & RTF_LLINFO)) + rt->rt_flags |= RTF_GATEWAY; } if (info.rti_ifa != NULL && info.rti_ifa != rt->rt_ifa) { --xHFwDpU9dbj6ez1V--