From nobody@FreeBSD.org Wed Jul 28 15:50:38 2010 Return-Path: Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D772F106566C for ; Wed, 28 Jul 2010 15:50:38 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id C7D8F8FC17 for ; Wed, 28 Jul 2010 15:50:38 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o6SFocVh003674 for ; Wed, 28 Jul 2010 15:50:38 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o6SFoco5003673; Wed, 28 Jul 2010 15:50:38 GMT (envelope-from nobody) Message-Id: <201007281550.o6SFoco5003673@www.freebsd.org> Date: Wed, 28 Jul 2010 15:50:38 GMT From: Andreas To: freebsd-gnats-submit@FreeBSD.org Subject: Binding problem with uhso X-Send-Pr-Version: www-3.1 X-GNATS-Notify: >Number: 149039 >Category: usb >Synopsis: [uhso] [patch] Binding problem with uhso >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-usb >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Jul 28 16:00:07 UTC 2010 >Closed-Date: Wed Dec 08 00:33:21 UTC 2010 >Last-Modified: Wed Dec 08 00:33:21 UTC 2010 >Originator: Andreas >Release: 8.1 >Organization: >Environment: FreeBSD gw.messe.ibtnet.de 8.1-RELEASE FreeBSD 8.1-RELEASE #2: Tue Jul 27 19:55:37 CEST 2010 root@gw.messe.ibtnet.de:/usr/obj/usr/src/sys/IPSEC i386 >Description: Hello, I am able to establish an internet connection with the help of the uhso driver (great stuff btw). The interface uhso0 is up and has an ip address. Shouldn't it be possible to bind sshd or racoon to that ip address? Neither sshd nor racoon are able to do that (seems as if this is impossible for any application). -- Andreas >How-To-Repeat: # uhsoctl -a xxx.yyyy.zz uhso0 Registered to "Vodafone.de" (UMTS) Connected to "Vodafone.de" (web.vodafone.de), UMTS IP address: 109.44.aaa.bbb, Nameservers: ... Restart sshd with 'ListenAddress 109.44.aaa.bbb': Jul 28 14:08:10 gw kernel: Jul 28 14:08:10 gw sshd[1421]: fatal: Cannot bind any address. racoon: Jul 27 19:30:29 gw racoon: ERROR: failed to bind to address 109.44.aaa.bbb[500] (Can't assign requested address). >Fix: >Release-Note: >Audit-Trail: Responsible-Changed-From-To: freebsd-bugs->freebsd-usb Responsible-Changed-By: linimon Responsible-Changed-When: Thu Jul 29 01:37:02 UTC 2010 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=149039 From: Fredrik Lindberg To: bug-followup@FreeBSD.org, pilzableiter@web.de Cc: Hans Petter Selasky Subject: Re: usb/149039: [uhso] Binding problem with uhso Date: Sat, 31 Jul 2010 15:00:07 +0200 This is a multi-part message in MIME format. --------------060404010006010801030805 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I apparently missed some interface flags (that really doesn't make sense for this device, it's configured with a /32 mask so broadcast etc can only be to itself) that the network stack wants to work properly. With the following patch I'm able bind ssh etc and able to connect to the machine through it. The patch is for -current so I'm not sure if it applies cleanly on 8-release/stable, but it should be trivial to merge it manually if it doesn't apply. Fredrik Lindberg --------------060404010006010801030805 Content-Type: text/plain; name="uhso.c-binding.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="uhso.c-binding.patch" Index: sys/dev/usb/net/uhso.c =================================================================== --- sys/dev/usb/net/uhso.c (revision 210676) +++ sys/dev/usb/net/uhso.c (working copy) @@ -1561,7 +1561,7 @@ ifp->if_init = uhso_if_init; ifp->if_start = uhso_if_start; ifp->if_output = uhso_if_output; - ifp->if_flags = 0; + ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | IFF_NOARP; ifp->if_softc = sc; IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; --------------060404010006010801030805-- From: Hans Petter Selasky To: Fredrik Lindberg Cc: bug-followup@freebsd.org, pilzableiter@web.de Subject: Re: usb/149039: [uhso] Binding problem with uhso Date: Sat, 31 Jul 2010 15:25:21 +0200 Committed to USB P4: http://p4web.freebsd.org/@@181640?ac=10 --HPS From: perryh@pluto.rain.com To: fli@shapeshifter.se Cc: pilzableiter@web.de, bug-followup@freebsd.org, freebsd-net@freebsd.org, freebsd-usb@freebsd.org Subject: Re: usb/149039: [uhso] Binding problem with uhso Date: Sat, 31 Jul 2010 19:37:39 -0700 Is a /32 mask even legal? Unless there's a special case involved, it ought to mean that there are no interfaces on the subnet other than this one, thus this interface has no peer to communicate with and might as well not exist. Adding net@ in hopes someone there knows what should happen. From: Fredrik Lindberg To: perryh@pluto.rain.com Cc: pilzableiter@web.de, bug-followup@freebsd.org, freebsd-net@freebsd.org, freebsd-usb@freebsd.org Subject: Re: usb/149039: [uhso] Binding problem with uhso Date: Mon, 02 Aug 2010 08:54:12 +0200 Yes, technically a /32 mask defines only one single address, but it's the only mask that really makes sense for this device. /32 masks are "legal" and commonly used for the loopback address of routers. But this is is indeed a very special case. The device has a USB interface that accepts raw IP-packets (with no other encapsulation). Once you have told the device to connect, it will tell you what IP-address you have and what DNS-servers to use, but that's it. My best guess is that the devices does PPP internally in firmware and abstracts the point-to-point link with a IP-packet interface. But since none of these details are available the only (as far as I know) viable thing is to set a /32 mask and set 0.0.0.0 (default route) to be directly reachable through the interface (route add -interface). Fredrik Lindberg From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: usb/149039: commit references a PR Date: Wed, 13 Oct 2010 20:51:13 +0000 (UTC) Author: hselasky Date: Wed Oct 13 20:51:06 2010 New Revision: 213803 URL: http://svn.freebsd.org/changeset/base/213803 Log: USB network (UHSO): - Correct network interface flags. PR: usb/149039 Submitted by: Fredrik Lindberg Approved by: thompsa (mentor) Modified: head/sys/dev/usb/net/uhso.c Modified: head/sys/dev/usb/net/uhso.c ============================================================================== --- head/sys/dev/usb/net/uhso.c Wed Oct 13 20:37:19 2010 (r213802) +++ head/sys/dev/usb/net/uhso.c Wed Oct 13 20:51:06 2010 (r213803) @@ -1560,7 +1560,7 @@ uhso_attach_ifnet(struct uhso_softc *sc, ifp->if_init = uhso_if_init; ifp->if_start = uhso_if_start; ifp->if_output = uhso_if_output; - ifp->if_flags = 0; + ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | IFF_NOARP; ifp->if_softc = sc; IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: usb/149039: commit references a PR Date: Sat, 27 Nov 2010 19:39:35 +0000 (UTC) Author: thompsa Date: Sat Nov 27 19:39:29 2010 New Revision: 215947 URL: http://svn.freebsd.org/changeset/base/215947 Log: MFC r213803 USB network (UHSO): - Correct network interface flags. PR: usb/149039 Submitted by: Fredrik Lindberg Modified: stable/8/sys/dev/usb/net/uhso.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/mips/alchemy/ (props changed) stable/8/sys/mips/atheros/ (props changed) stable/8/sys/mips/cavium/ (props changed) stable/8/sys/mips/cavium/dev/ (props changed) stable/8/sys/mips/rmi/ (props changed) stable/8/sys/mips/rmi/dev/ (props changed) stable/8/sys/mips/sibyte/ (props changed) Modified: stable/8/sys/dev/usb/net/uhso.c ============================================================================== --- stable/8/sys/dev/usb/net/uhso.c Sat Nov 27 19:38:40 2010 (r215946) +++ stable/8/sys/dev/usb/net/uhso.c Sat Nov 27 19:39:29 2010 (r215947) @@ -1560,7 +1560,7 @@ uhso_attach_ifnet(struct uhso_softc *sc, ifp->if_init = uhso_if_init; ifp->if_start = uhso_if_start; ifp->if_output = uhso_if_output; - ifp->if_flags = 0; + ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | IFF_NOARP; ifp->if_softc = sc; IFQ_SET_MAXLEN(&ifp->if_snd, ifqmaxlen); ifp->if_snd.ifq_drv_maxlen = ifqmaxlen; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" State-Changed-From-To: open->closed State-Changed-By: thompsa State-Changed-When: Wed Dec 8 00:33:00 UTC 2010 State-Changed-Why: Committed and merged. http://www.freebsd.org/cgi/query-pr.cgi?pr=149039 >Unformatted: