svn commit: r324860 - head/share/man/man4
Author: bms Date: Sun Oct 22 11:40:55 2017 New Revision: 324860 URL: https://svnweb.freebsd.org/changeset/base/324860 Log: Modernise this man page somewhat. 1. Add a reference to a good 3rd party list of compatible cables, but provide suggestions for 'known good' vendors. 2. Change IP-based USB host-host example to a modern Ethernet one which works 'out of box' with current Linux systems. 3. Explain that USB 3.0 is host-host, even though point-to-point soft Ethernet can be achieved. MFC after:3 weeks Modified: head/share/man/man4/udbp.4 Modified: head/share/man/man4/udbp.4 == --- head/share/man/man4/udbp.4 Sun Oct 22 11:21:31 2017(r324859) +++ head/share/man/man4/udbp.4 Sun Oct 22 11:40:55 2017(r324860) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 22, 2006 +.Dd October 20, 2017 .Dt UDBP 4 .Os .Sh NAME @@ -48,9 +48,14 @@ udbp_load="YES" The .Nm driver provides support for host-to-host cables -that contain at least two bulk pipes (one for each direction), -for example -the EzLink cable and the NetChip 1080 chip. +that contain at least two bulk pipes (one for each direction). +This typically includes cables branded for use with +.Sy Windows USB Easy Transfer , +and many cables based on the Prolific PL2xx1 series of USB bridge chips. +A useful (but non-comprehensive) list of compatible USB host cables +is listed in the +.Sx SEE ALSO +section below. .Pp .\" XXXThe description of how to add netgraph to the kernel .\"is out of place here. It should be limited to the @@ -86,30 +91,64 @@ module and then the .Nm driver. .Pp -.Dl ngctl mkpeer udbp0: iface data inet -.Dl ifconfig ng0 10.0.0.1 10.0.0.2 +.Dl ngctl mkpeer udbp0: eiface data ether +.Dl ifconfig ngeth0 ether aa:dd:xx:xx:xx +.Dl ifconfig ngeth0 inet 169.254.x.x/16 .Pp -Create a new network interface node -and connect its inet hook to the data hook of the +Create a new Ethernet network interface node +and connect its ether hook to the data hook of the .Nm -node. -.Xr ifconfig 8 -configures the resulting network interface ng0 with a local -IP address of 10.0.0.1 and a remote IP address of 10.0.0.2. -On the remote host, the two -IP addresses should of course be reversed. +driver. +.Pp +This enables FreeBSD to communicate with a Linux peer (e.g. using the +.Sy plusb +driver). +The Linux node should be configured to prefer link-local IPv4 addresses +(e.g. using Network Manager in Debian and Red Hat derived distributions). +.Pp +Whilst both FreeBSD and Linux are able to interoperate by +loosely following CDC EEM 1.0 in their behaviour, neither implementation +has been expressly designed to follow its specification. .Sh SEE ALSO .Xr netgraph 4 , -.Xr ng_iface 4 , +.Xr ng_eiface 4 , .Xr ohci 4 , .Xr uhci 4 , .Xr usb 4 , .Xr ngctl 8 +.\" +.Rs +.%B Universal Serial Bus: Communications Class Subclass Specification for Ethernet Emulation Model Devices +.%N Revision 1.0 +.%D February 2, 2005 +.%I USB Implementers Forum, Inc. +.%U http://www.usb.org/developers/docs/devclass_docs/CDC_EEM10.pdf +.Re +.\" +.Rs +.%B Total Commander: Supported cables for USB cable connection +.%I Ghisler Software GmbH. +.%U https://www.ghisler.com/cables/index.htm +.Re +.Sh CAVEATS +The point-to-point nature and additional latency of USB host-host links +makes them unsuitable as a "drop-in" replacement for an Ethernet LAN; +for a USB 3.0 SuperSpeed cable, latency is comparable to 100BaseTX Ethernet +(but often worse), with throughput comparable to 2.5GBASE-T. +.Pp +However, their energy efficiency makes them attractive for embedded +applications. A Plugable PL27A1 cable claims 24mA of USB3 bus power, +as compared to 150mA for a typical USB 3.0 to Gigabit Ethernet interface. .Sh HISTORY The .Nm driver first appeared in .Fx 5.0 . +.Sh BUGS +The +.Nm +driver does not support the special packets described in section 5.1 +of the CDC EEM specification. .Sh AUTHORS .An -nosplit The @@ -121,4 +160,6 @@ and .An Nick Hibma Aq Mt n_hi...@freebsd.org . .Pp This manual page was written by -.An Nick Hibma Aq Mt n_hi...@freebsd.org . +.An Nick Hibma Aq Mt n_hi...@freebsd.org +and updated by +.An Bruce Simpson Aq Mt b...@freebsd.org . ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r324858 - in head/sys/dev/usb: . misc
Author: bms Date: Sun Oct 22 11:15:58 2017 New Revision: 324858 URL: https://svnweb.freebsd.org/changeset/base/324858 Log: Add Prolific PL27A1 USB 3.0 Host-Host device to udbp(4). Tested with a Plugable cable in VirtualBox against Linux 4.11. MFC after:2 weeks Modified: head/sys/dev/usb/misc/udbp.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/misc/udbp.c == --- head/sys/dev/usb/misc/udbp.cSun Oct 22 10:35:29 2017 (r324857) +++ head/sys/dev/usb/misc/udbp.cSun Oct 22 11:15:58 2017 (r324858) @@ -264,6 +264,7 @@ static const STRUCT_USB_HOST_ID udbp_devs[] = { {USB_VPI(USB_VENDOR_NETCHIP, USB_PRODUCT_NETCHIP_GADGETZERO, 0)}, {USB_VPI(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2301, 0)}, {USB_VPI(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2302, 0)}, + {USB_VPI(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL27A1, 0)}, {USB_VPI(USB_VENDOR_ANCHOR, USB_PRODUCT_ANCHOR_EZLINK, 0)}, {USB_VPI(USB_VENDOR_GENESYS, USB_PRODUCT_GENESYS_GL620USB, 0)}, }; Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsSun Oct 22 10:35:29 2017(r324857) +++ head/sys/dev/usb/usbdevsSun Oct 22 11:15:58 2017(r324858) @@ -3679,6 +3679,7 @@ product PROLIFIC PL2305 0x2305 Parallel printer product PROLIFIC ATAPI40x2307 ATAPI-4 Controller product PROLIFIC PL25010x2501 PL2501 Host-Host interface product PROLIFIC PL25060x2506 PL2506 USB to IDE Bridge +product PROLIFIC PL27A10x27A1 PL27A1 USB 3.0 Host-Host interface product PROLIFIC HCR3310x331a HCR331 Hybrid Card Reader product PROLIFIC PHAROS0xaaa0 Prolific Pharos product PROLIFIC RSAQ3 0xaaa2 PL2303 Serial Adapter (IODATA USB-RSAQ3) ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r314345 - head/sys/dev/usb/controller
Author: bms Date: Mon Feb 27 17:04:35 2017 New Revision: 314345 URL: https://svnweb.freebsd.org/changeset/base/314345 Log: Add ID for NEC uPD720202 xHCI controller. MFC after:1 month Modified: head/sys/dev/usb/controller/xhci_pci.c Modified: head/sys/dev/usb/controller/xhci_pci.c == --- head/sys/dev/usb/controller/xhci_pci.c Mon Feb 27 16:55:09 2017 (r314344) +++ head/sys/dev/usb/controller/xhci_pci.c Mon Feb 27 17:04:35 2017 (r314345) @@ -100,6 +100,8 @@ xhci_pci_match(device_t self) case 0x01941033: return ("NEC uPD720200 USB 3.0 controller"); + case 0x00151912: + return ("NEC uPD720202 USB 3.0 controller"); case 0x10001b73: return ("Fresco Logic FL1000G USB 3.0 controller"); ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311987 - head/sys/dev/uart
Author: bms Date: Thu Jan 12 16:30:27 2017 New Revision: 311987 URL: https://svnweb.freebsd.org/changeset/base/311987 Log: Allow uart(4) to use MSI interrupts on single-port PCI instances. Do this here as puc(4) disallows single-port instances; at least one multi-port PCIe UART chip (in this case, the ASIX MCS9922) present separate PCI configuration space (functions) for each UART. Tested using lrzsz and a null-modem cable. The ExpressCard/34 variants containing the MCS9922 should also use MSI with this change. Reviewed by: jhb, imp, rpokala MFC after:2 weeks Differential Revision:https://reviews.freebsd.org/D9123 Modified: head/sys/dev/uart/uart_bus_pci.c head/sys/dev/uart/uart_core.c Modified: head/sys/dev/uart/uart_bus_pci.c == --- head/sys/dev/uart/uart_bus_pci.cThu Jan 12 16:24:10 2017 (r311986) +++ head/sys/dev/uart/uart_bus_pci.cThu Jan 12 16:30:27 2017 (r311987) @@ -45,12 +45,14 @@ __FBSDID("$FreeBSD$"); #defineDEFAULT_RCLK1843200 static int uart_pci_probe(device_t dev); +static int uart_pci_attach(device_t dev); +static int uart_pci_detach(device_t dev); static device_method_t uart_pci_methods[] = { /* Device interface */ DEVMETHOD(device_probe, uart_pci_probe), - DEVMETHOD(device_attach,uart_bus_attach), - DEVMETHOD(device_detach,uart_bus_detach), + DEVMETHOD(device_attach,uart_pci_attach), + DEVMETHOD(device_detach,uart_pci_detach), DEVMETHOD(device_resume,uart_bus_resume), DEVMETHOD_END }; @@ -209,4 +211,40 @@ uart_pci_probe(device_t dev) return (result); } +static int +uart_pci_attach(device_t dev) +{ + struct uart_softc *sc; + int count; + + sc = device_get_softc(dev); + + /* +* Use MSI in preference to legacy IRQ if available. +* Whilst some PCIe UARTs support >1 MSI vector, use only the first. +*/ + if (pci_msi_count(dev) > 0) { + count = 1; + if (pci_alloc_msi(dev, ) == 0) { + sc->sc_irid = 1; + device_printf(dev, "Using %d MSI message\n", count); + } + } + + return (uart_bus_attach(dev)); +} + +static int +uart_pci_detach(device_t dev) +{ + struct uart_softc *sc; + + sc = device_get_softc(dev); + + if (sc->sc_irid != 0) + pci_release_msi(dev); + + return (uart_bus_detach(dev)); +} + DRIVER_MODULE(uart, pci, uart_pci_driver, uart_devclass, NULL, NULL); Modified: head/sys/dev/uart/uart_core.c == --- head/sys/dev/uart/uart_core.c Thu Jan 12 16:24:10 2017 (r311986) +++ head/sys/dev/uart/uart_core.c Thu Jan 12 16:30:27 2017 (r311987) @@ -677,7 +677,6 @@ uart_bus_attach(device_t dev) * safest thing to do. */ if (filt != FILTER_SCHEDULE_THREAD && !uart_force_poll) { - sc->sc_irid = 0; sc->sc_ires = bus_alloc_resource_any(dev, SYS_RES_IRQ, >sc_irid, RF_ACTIVE | RF_SHAREABLE); } ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311847 - head/sys/dev/usb/misc
Author: bms Date: Tue Jan 10 01:31:26 2017 New Revision: 311847 URL: https://svnweb.freebsd.org/changeset/base/311847 Log: Allow udbp(4) to claim Belkin "Windows Easy Transfer Cable" for Netgraph use. These have been tested back-to-back with Linux 3.x and a similar attachment at the other end; a CDC EEM-like encapsulation can be used for emulated Ethernet over udbp(4) with ng_ether. Modified: head/sys/dev/usb/misc/udbp.c Modified: head/sys/dev/usb/misc/udbp.c == --- head/sys/dev/usb/misc/udbp.cTue Jan 10 01:30:41 2017 (r311846) +++ head/sys/dev/usb/misc/udbp.cTue Jan 10 01:31:26 2017 (r311847) @@ -259,6 +259,7 @@ static driver_t udbp_driver = { }; static const STRUCT_USB_HOST_ID udbp_devs[] = { + {USB_VPI(USB_VENDOR_BELKIN, USB_PRODUCT_BELKIN_F5U258, 0)}, {USB_VPI(USB_VENDOR_NETCHIP, USB_PRODUCT_NETCHIP_TURBOCONNECT, 0)}, {USB_VPI(USB_VENDOR_NETCHIP, USB_PRODUCT_NETCHIP_GADGETZERO, 0)}, {USB_VPI(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2301, 0)}, ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r311844 - head/sys/dev/usb
Author: bms Date: Tue Jan 10 00:28:01 2017 New Revision: 311844 URL: https://svnweb.freebsd.org/changeset/base/311844 Log: Add PID for Belkin F5U258 "Windows Easy Transfer Cable", a udbp-like device. Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsTue Jan 10 00:03:43 2017(r311843) +++ head/sys/dev/usb/usbdevsTue Jan 10 00:28:01 2017(r311844) @@ -1318,6 +1318,7 @@ product BELKIN RTL8188CU 0x1102 RTL8188 product BELKIN F9L1103 0x1103 F9L1103 Wireless Adapter product BELKIN RTL8192CU 0x2102 RTL8192CU Wireless Adapter product BELKIN F7D2102 0x2103 F7D2102 Wireless Adapter +product BELKIN F5U258 0x258A F5U258 Host to Host cable product BELKIN ZD1211B 0x4050 ZD1211B product BELKIN F5D5055 0x5055 F5D5055 product BELKIN F5D7050 0x7050 F5D7050 Wireless Adapter ___ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r264323 - head/sys/net
Author: bms Date: Thu Apr 10 18:43:02 2014 New Revision: 264323 URL: http://svnweb.freebsd.org/changeset/base/264323 Log: In if_freemulti(), relax the paranoid KASSERT() on ifma-ifma_protospec. This KASSERT() existed as a sanity check that upper layers in the network stack (e.g. inet, inet6) had released their reference to the underlying driver's multicast memberships (ifmultiaddr{}). However it assumes the lifecycle of the driver membership corresponds to the lifecycle of the network layer membership. In the submitter's case, ieee80211_ioctl_updatemulti() attempts to reprogram the (parent, physical) ifnet{} memberships in response to a change in membership on the (child, virtual) VAP ifnet, using a batched update mechanism. These updates happen independently from the network layer, causing a false negative assertion failure. There are possibly other use cases where this KASSERT() may be triggered by other networking stack activity (e.g. where a nesting relationship exists between multiple ifnet{} instances). This suggests that further review of FreeBSD's approach to nested ifnet relationships is needed. MFC after:6 weeks Submitted by: adrian@ Modified: head/sys/net/if.c Modified: head/sys/net/if.c == --- head/sys/net/if.c Thu Apr 10 18:34:26 2014(r264322) +++ head/sys/net/if.c Thu Apr 10 18:43:02 2014(r264323) @@ -2937,8 +2937,6 @@ if_freemulti(struct ifmultiaddr *ifma) KASSERT(ifma-ifma_refcount == 0, (if_freemulti: refcount %d, ifma-ifma_refcount)); - KASSERT(ifma-ifma_protospec == NULL, - (if_freemulti: protospec not NULL)); if (ifma-ifma_lladdr != NULL) free(ifma-ifma_lladdr, M_IFMADDR); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r257921 - head/share/man/man3
Author: bms Date: Sun Nov 10 19:41:04 2013 New Revision: 257921 URL: http://svnweb.freebsd.org/changeset/base/257921 Log: Document the RB_FOREACH_FROM() and RB_FOREACH_REVERSE_FROM() macros. These are largely syntactic sugar. However, they improve code readability where an RB_FOREACH() or RB_FOREACH_REVERSE() traversal has been interrupted and must be resumed. Performance is improved by avoiding unnecessary traversal from the head node. Modified: head/share/man/man3/tree.3 Modified: head/share/man/man3/tree.3 == --- head/share/man/man3/tree.3 Sun Nov 10 18:46:59 2013(r257920) +++ head/share/man/man3/tree.3 Sun Nov 10 19:41:04 2013(r257921) @@ -30,7 +30,7 @@ .\ .\ $FreeBSD$ .\ -.Dd November 4, 2013 +.Dd November 10, 2013 .Dt TREE 3 .Os .Sh NAME @@ -70,8 +70,10 @@ .Nm RB_RIGHT , .Nm RB_PARENT , .Nm RB_FOREACH , +.Nm RB_FOREACH_FROM , .Nm RB_FOREACH_SAFE , .Nm RB_FOREACH_REVERSE , +.Nm RB_FOREACH_REVERSE_FROM , .Nm RB_FOREACH_REVERSE_SAFE , .Nm RB_INIT , .Nm RB_INSERT , @@ -137,8 +139,10 @@ .Ft struct TYPE * .Fn RB_PARENT struct TYPE *elm RB_ENTRY NAME .Fn RB_FOREACH VARNAME NAME RB_HEAD *head +.Fn RB_FOREACH_FROM VARNAME NAME RB_HEAD *head POS_VARNAME .Fn RB_FOREACH_SAFE VARNAME NAME RB_HEAD *head TEMP_VARNAME .Fn RB_FOREACH_REVERSE VARNAME NAME RB_HEAD *head +.Fn RB_FOREACH_REVERSE_FROM VARNAME NAME RB_HEAD *head POS_VARNAME .Fn RB_FOREACH_REVERSE_SAFE VARNAME NAME RB_HEAD *head TEMP_VARNAME .Ft void .Fn RB_INIT RB_HEAD *head @@ -470,6 +474,15 @@ they permit both the removal of np as well as freeing it from within the loop safely without interfering with the traversal. .Pp +Both +.Fn RB_FOREACH_FROM +and +.Fn RB_FOREACH_REVERSE_FROM +may be used to continue an interrupted traversal +in a forward or reverse direction respectively. +The resume point should be passed as their last argument, +and will be overwritten to provide safe traversal. +.Pp The .Fn RB_EMPTY macro should be used to check whether a red-black tree is empty. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r257922 - head/share/man/man3
Author: bms Date: Sun Nov 10 19:49:18 2013 New Revision: 257922 URL: http://svnweb.freebsd.org/changeset/base/257922 Log: RB_FOREACH_[REVERSE_]FROM() do not require the head pointer. Reword. Modified: head/share/man/man3/tree.3 Modified: head/share/man/man3/tree.3 == --- head/share/man/man3/tree.3 Sun Nov 10 19:41:04 2013(r257921) +++ head/share/man/man3/tree.3 Sun Nov 10 19:49:18 2013(r257922) @@ -139,10 +139,10 @@ .Ft struct TYPE * .Fn RB_PARENT struct TYPE *elm RB_ENTRY NAME .Fn RB_FOREACH VARNAME NAME RB_HEAD *head -.Fn RB_FOREACH_FROM VARNAME NAME RB_HEAD *head POS_VARNAME +.Fn RB_FOREACH_FROM VARNAME NAME POS_VARNAME .Fn RB_FOREACH_SAFE VARNAME NAME RB_HEAD *head TEMP_VARNAME .Fn RB_FOREACH_REVERSE VARNAME NAME RB_HEAD *head -.Fn RB_FOREACH_REVERSE_FROM VARNAME NAME RB_HEAD *head POS_VARNAME +.Fn RB_FOREACH_REVERSE_FROM VARNAME NAME POS_VARNAME .Fn RB_FOREACH_REVERSE_SAFE VARNAME NAME RB_HEAD *head TEMP_VARNAME .Ft void .Fn RB_INIT RB_HEAD *head @@ -480,7 +480,9 @@ and .Fn RB_FOREACH_REVERSE_FROM may be used to continue an interrupted traversal in a forward or reverse direction respectively. -The resume point should be passed as their last argument, +The head pointer is not required. +The pointer to the node from where to resume the traversal +should be passed as their last argument, and will be overwritten to provide safe traversal. .Pp The ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r252506 - head/sbin/dhclient
Author: bms Date: Tue Jul 2 13:24:37 2013 New Revision: 252506 URL: http://svnweb.freebsd.org/changeset/base/252506 Log: When acquiring a lease, record the value of the BOOTP siaddr field contained in the DHCP offer, and write it out to the lease file as an unquoted value of the next-server keyword. The value is ignored when the lease is read back by dhclient, however other applications are free to parse it. The intent behind this change is to allow easier interoperability with automated installation systems e.g. Cobbler, Foreman, Razor; FreeBSD installation kernels can automatically probe the network to discover deployment servers. There are no plans to MFC this change unless a backport is specifically requested. The syntax of the next-server ip lease keyword is intended to be identical to that used by the ISC DHCPD server in its configuration files. The required defines are already present in dhclient but were unused before this change. (Note: This is NOT the same as Option 66, tftp-server-name). It has been exercised in a university protocol testbed environment, with Cobbler and an mfsBSD image containing pc-sysinstall (driven by Cobbler Cheetah templates). The SYSLINUX memdisk driver is used to boot mfsBSD. Currently this approach requires that a dedicated system profile has been created for the node where FreeBSD is to be deployed. If this is not present, the pc-sysinstall wrapper will be unable to obtain a node configuration. There is code in progress to allow mfsBSD images to obtain the required hints from the memdisk environment by parsing the MBFT ACPI chunk. This is non-standard as it is not linked into the platform's ACPI RSDT. Reviewed by: des Modified: head/sbin/dhclient/clparse.c head/sbin/dhclient/dhclient.c head/sbin/dhclient/dhcpd.h Modified: head/sbin/dhclient/clparse.c == --- head/sbin/dhclient/clparse.cTue Jul 2 10:36:57 2013 (r252505) +++ head/sbin/dhclient/clparse.cTue Jul 2 13:24:37 2013 (r252506) @@ -642,6 +642,10 @@ parse_client_lease_declaration(FILE *cfi case FILENAME: lease-filename = parse_string(cfile); return; + case NEXT_SERVER: + if (!parse_ip_addr(cfile, lease-nextserver)) + return; + break; case SERVER_NAME: lease-server_name = parse_string(cfile); return; Modified: head/sbin/dhclient/dhclient.c == --- head/sbin/dhclient/dhclient.c Tue Jul 2 10:36:57 2013 (r252505) +++ head/sbin/dhclient/dhclient.c Tue Jul 2 13:24:37 2013 (r252506) @@ -1063,6 +1063,9 @@ packet_to_lease(struct packet *packet) lease-address.len = sizeof(packet-raw-yiaddr); memcpy(lease-address.iabuf, packet-raw-yiaddr, lease-address.len); + lease-nextserver.len = sizeof(packet-raw-siaddr); + memcpy(lease-nextserver.iabuf, packet-raw-siaddr, lease-nextserver.len); + /* If the server name was filled out, copy it. Do not attempt to validate the server name as a host name. RFC 2131 merely states that sname is NUL-terminated (which do @@ -1874,6 +1877,11 @@ write_client_lease(struct interface_info fprintf(leaseFile, bootp;\n); fprintf(leaseFile, interface \%s\;\n, ip-name); fprintf(leaseFile, fixed-address %s;\n, piaddr(lease-address)); + if (lease-nextserver.len == sizeof(inaddr_any) + 0 != memcmp(lease-nextserver.iabuf, inaddr_any, + sizeof(inaddr_any))) + fprintf(leaseFile, next-server %s;\n, + piaddr(lease-nextserver)); if (lease-filename) fprintf(leaseFile, filename \%s\;\n, lease-filename); if (lease-server_name) Modified: head/sbin/dhclient/dhcpd.h == --- head/sbin/dhclient/dhcpd.h Tue Jul 2 10:36:57 2013(r252505) +++ head/sbin/dhclient/dhcpd.h Tue Jul 2 13:24:37 2013(r252506) @@ -121,6 +121,7 @@ struct client_lease { struct client_lease *next; time_t expiry, renewal, rebind; struct iaddr address; + struct iaddr nextserver; char*server_name; char*filename; struct string_list *medium; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r251502 - head/sys/netinet
Author: bms Date: Fri Jun 7 17:12:08 2013 New Revision: 251502 URL: http://svnweb.freebsd.org/changeset/base/251502 Log: Disable IGMPv3 link timers on a transition to IGMPv2. Submitted by: Alan Smithee Modified: head/sys/netinet/igmp.c Modified: head/sys/netinet/igmp.c == --- head/sys/netinet/igmp.c Fri Jun 7 17:06:08 2013(r251501) +++ head/sys/netinet/igmp.c Fri Jun 7 17:12:08 2013(r251502) @@ -2121,6 +2121,7 @@ igmp_v1v2_process_querier_timers(struct __func__, igi-igi_version, IGMP_VERSION_2, igi-igi_ifp, igi-igi_ifp-if_xname); igi-igi_version = IGMP_VERSION_2; + igmp_v3_cancel_link_timers(igi); } } } else if (igi-igi_v1_timer 0) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r237734 - head/sys/netinet6
Author: bms Date: Thu Jun 28 23:44:47 2012 New Revision: 237734 URL: http://svn.freebsd.org/changeset/base/237734 Log: In MLDv2 general query processing, do not enforce the strict check on query origins. Submitted by: Gu Yong MFC after:3 days Modified: head/sys/netinet6/mld6.c Modified: head/sys/netinet6/mld6.c == --- head/sys/netinet6/mld6.cThu Jun 28 22:03:59 2012(r237733) +++ head/sys/netinet6/mld6.cThu Jun 28 23:44:47 2012(r237734) @@ -867,16 +867,10 @@ mld_v2_input_query(struct ifnet *ifp, co */ if (IN6_IS_ADDR_UNSPECIFIED(mld-mld_addr)) { /* -* General Queries SHOULD be directed to ff02::1. * A general query with a source list has undefined * behaviour; discard it. */ - struct in6_addr dst; - - dst = ip6-ip6_dst; - in6_clearscope(dst); - if (!IN6_ARE_ADDR_EQUAL(dst, in6addr_linklocal_allnodes) || - nsrc 0) + if (nsrc 0) return (EINVAL); is_general_query = 1; } else { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r237735 - head/sys/netinet6
Author: bms Date: Thu Jun 28 23:45:37 2012 New Revision: 237735 URL: http://svn.freebsd.org/changeset/base/237735 Log: Fix a typo in MLD query exponent processing. Submitted by: rpaulo@ MFC after:3 days Modified: head/sys/netinet6/mld6.c Modified: head/sys/netinet6/mld6.c == --- head/sys/netinet6/mld6.cThu Jun 28 23:44:47 2012(r237734) +++ head/sys/netinet6/mld6.cThu Jun 28 23:45:37 2012(r237735) @@ -833,7 +833,7 @@ mld_v2_input_query(struct ifnet *ifp, co mld = (struct mldv2_query *)(mtod(m, uint8_t *) + off); maxdelay = ntohs(mld-mld_maxdelay);/* in 1/10ths of a second */ - if (maxdelay = 32678) { + if (maxdelay = 32768) { maxdelay = (MLD_MRC_MANT(maxdelay) | 0x1000) (MLD_MRC_EXP(maxdelay) + 3); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r221719 - head/sbin/devd
Author: bms Date: Tue May 10 02:34:11 2011 New Revision: 221719 URL: http://svn.freebsd.org/changeset/base/221719 Log: Typo. For USB devices, 'serial' should be 'sernum'. See sys/dev/usb/usb_device.c for what devctl_notify() gets. Modified: head/sbin/devd/devd.conf.5 Modified: head/sbin/devd/devd.conf.5 == --- head/sbin/devd/devd.conf.5 Tue May 10 01:05:41 2011(r221718) +++ head/sbin/devd/devd.conf.5 Tue May 10 02:34:11 2011(r221719) @@ -283,7 +283,7 @@ Hub port number (USB) Product ID (pccard/USB). .It Li release Hardware revision (USB) -.It Li serial +.It Li sernum Serial Number (USB). .It Li slot Card slot. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r221720 - head/sys/dev/usb
Author: bms Date: Tue May 10 02:38:44 2011 New Revision: 221720 URL: http://svn.freebsd.org/changeset/base/221720 Log: Add VID for Simtec Electronics. Add PID for Simtec Electronics EntropyKey, a hardware random number generator. Modified: head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/usbdevs == --- head/sys/dev/usb/usbdevsTue May 10 02:34:11 2011(r221719) +++ head/sys/dev/usb/usbdevsTue May 10 02:38:44 2011(r221720) @@ -681,6 +681,7 @@ vendor HAUPPAUGE2 0x2040 Hauppauge Compu vendor TLAYTECH0x20b9 Tlay Tech vendor ENCORE 0x203d Encore vendor PARA0x20b8 PARA Industrial +vendor SIMTEC 0x20df Simtec Electronics vendor ERICSSON0x2282 Ericsson vendor MOTOROLA2 0x22b8 Motorola vendor TRIPPLITE 0x2478 Tripp-Lite @@ -2513,6 +2514,9 @@ product PANASONIC TYTP50P6S 0x3900 TY-TP /* PARA Industrial products */ product PARA RT30700x RT3070 +/* Simtec Electronics products */ +product SIMTEC ENTROPYKEY 0x0001 Entropy Key + /* Pegatron products */ product PEGATRON RT28700x0002 RT2870 product PEGATRON RT30700x000c RT3070 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r207275 - head/sys/netinet
Author: bms Date: Tue Apr 27 14:14:21 2010 New Revision: 207275 URL: http://svn.freebsd.org/changeset/base/207275 Log: Fix a regression where DVMRP diagnostic traffic, such as that used by mrinfo and mtrace, was dropped by the IGMP TTL check. IGMP control traffic must always have a TTL of 1. Submitted by: Matthew Luckie MFC after:3 days Modified: head/sys/netinet/igmp.c Modified: head/sys/netinet/igmp.c == --- head/sys/netinet/igmp.c Tue Apr 27 13:50:15 2010(r207274) +++ head/sys/netinet/igmp.c Tue Apr 27 14:14:21 2010(r207275) @@ -1468,12 +1468,6 @@ igmp_input(struct mbuf *m, int off) } ip = mtod(m, struct ip *); - if (ip-ip_ttl != 1) { - IGMPSTAT_INC(igps_rcv_badttl); - m_freem(m); - return; - } - /* * Validate checksum. */ @@ -1488,6 +1482,17 @@ igmp_input(struct mbuf *m, int off) m-m_data -= iphlen; m-m_len += iphlen; + /* +* IGMP control traffic is link-scope, and must have a TTL of 1. +* DVMRP traffic (e.g. mrinfo, mtrace) is an exception; +* probe packets may come from beyond the LAN. +*/ + if (igmp-igmp_type != IGMP_DVMRP ip-ip_ttl != 1) { + IGMPSTAT_INC(igps_rcv_badttl); + m_freem(m); + return; + } + switch (igmp-igmp_type) { case IGMP_HOST_MEMBERSHIP_QUERY: if (igmplen == IGMP_MINLEN) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r206452 - head/sys/netinet
Author: bms Date: Sat Apr 10 12:05:31 2010 New Revision: 206452 URL: http://svn.freebsd.org/changeset/base/206452 Log: Fix a few issues related to the legacy 4.4 BSD multicast APIs. IPv4 addresses can and do change during normal operation. Testing by pfSense developers exposed an issue where OpenOSPFD was using the IPv4 address to leave the OSPF link-scope multicast groups on a dynamic OpenVPN tun interface, rather than using RFC 3678 with the interface index, which won't be raced when the interface's addresses change. In inp_join_group(): If we are already a member of an ASM group, and IP_ADD_MEMBERSHIP or MCAST_JOIN_GROUP ioctls are re-issued, return EADDRINUSE as per the legacy 4.4BSD multicast API. This bends RFC 3678 slightly, but does not violate POLA for apps using the old API. It also stops us falling through to kicking IGMP state transactions in what is otherwise a no-op case. [This has already been dealt with in HEAD, but make it explicit before we MFC the change to 8.] In inp_leave_group(): Fix a bogus conditional. Move the ifp null check to ioctls MCAST_LEAVE* in the switch..case where it actually belongs. If an interface was specified, by primary IPv4 address, for ioctl IP_DROP_MEMBERSHIP or MCAST_LEAVE_GROUP (an ASM full leave operation), then and only then should we look up the ifp from the IPv4 address in mreqs.imr_interface. If not, we fall through to imo_match_group() as before, but only in the IP_DROP_MEMBERSHIP case. With these changes, the legacy 4.4BSD multicast API idempotence should be mostly preserved in the SSM enabled IPv4 stack. Found by: ermal (with pfSense) MFC after:3 days Modified: head/sys/netinet/in_mcast.c Modified: head/sys/netinet/in_mcast.c == --- head/sys/netinet/in_mcast.c Sat Apr 10 11:52:12 2010(r206451) +++ head/sys/netinet/in_mcast.c Sat Apr 10 12:05:31 2010(r206452) @@ -1999,9 +1999,12 @@ inp_join_group(struct inpcb *inp, struct } } else { /* -* MCAST_JOIN_GROUP alone, on any existing membership, -* is rejected, to stop the same inpcb tying up -* multiple refs to the in_multi. +* MCAST_JOIN_GROUP on an existing exclusive +* membership is an error; return EADDRINUSE +* to preserve 4.4BSD API idempotence, and +* avoid tedious detour to code below. +* NOTE: This is bending RFC 3678 a bit. +* * On an existing inclusive membership, this is also * an error; if you want to change filter mode, * you must use the userland API setsourcefilter(). @@ -2010,6 +2013,8 @@ inp_join_group(struct inpcb *inp, struct * is atomic with allocation of a membership. */ error = EINVAL; + if (imf-imf_st[1] == MCAST_EXCLUDE) + error = EADDRINUSE; goto out_inp_locked; } } @@ -2186,7 +2191,14 @@ inp_leave_group(struct inpcb *inp, struc ssa-sin.sin_addr = mreqs.imr_sourceaddr; } - if (!in_nullhost(gsa-sin.sin_addr)) + /* +* Attempt to look up hinted ifp from interface address. +* Fallthrough with null ifp iff lookup fails, to +* preserve 4.4BSD mcast API idempotence. +* XXX NOTE WELL: The RFC 3678 API is preferred because +* using an IPv4 address as a key is racy. +*/ + if (!in_nullhost(mreqs.imr_interface)) INADDR_TO_IFP(mreqs.imr_interface, ifp); CTR3(KTR_IGMPV3, %s: imr_interface = %s, ifp = %p, @@ -,6 +2234,9 @@ inp_leave_group(struct inpcb *inp, struc return (EADDRNOTAVAIL); ifp = ifnet_byindex(gsr.gsr_interface); + + if (ifp == NULL) + return (EADDRNOTAVAIL); break; default: @@ -2234,9 +2249,6 @@ inp_leave_group(struct inpcb *inp, struc if (!IN_MULTICAST(ntohl(gsa-sin.sin_addr.s_addr))) return (EINVAL); - if (ifp == NULL) - return (EADDRNOTAVAIL); - /* * Find the membership in the membership array. */ ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r206454 - head/sys/netinet6
Author: bms Date: Sat Apr 10 12:24:21 2010 New Revision: 206454 URL: http://svn.freebsd.org/changeset/base/206454 Log: When embedding the scope ID in MLDv1 output, check if the scope of the address being embedded is in fact link-local, before attempting to embed it. Note that this operation is a side-effect of trying to avoid recursion on the IN6 scope lock. PR: 144560 Submitted by: Petr Lampa MFC after:3 days Modified: head/sys/netinet6/mld6.c Modified: head/sys/netinet6/mld6.c == --- head/sys/netinet6/mld6.cSat Apr 10 12:10:11 2010(r206453) +++ head/sys/netinet6/mld6.cSat Apr 10 12:24:21 2010(r206454) @@ -195,8 +195,10 @@ static int sysctl_mld_ifinfo(SYSCTL_HAND static struct mtx mld_mtx; MALLOC_DEFINE(M_MLD, mld, mld state); -#defineMLD_EMBEDSCOPE(pin6, zoneid) \ - (pin6)-s6_addr16[1] = htons((zoneid) 0x) +#defineMLD_EMBEDSCOPE(pin6, zoneid) \ + if (IN6_IS_SCOPE_LINKLOCAL(pin6) || \ + IN6_IS_ADDR_MC_INTFACELOCAL(pin6)) \ + (pin6)-s6_addr16[1] = htons((zoneid) 0x) \ /* * VIMAGE-wide globals. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org
svn commit: r206455 - head
Author: bms Date: Sat Apr 10 12:29:09 2010 New Revision: 206455 URL: http://svn.freebsd.org/changeset/base/206455 Log: Add a comment to MAINTAINERS indicating that sbin/routed is in fact vendor branch code from before contrib existed in FreeBSD's history. Changes should be run by Vernon Schryver at Rhyolite first. Modified: head/MAINTAINERS Modified: head/MAINTAINERS == --- head/MAINTAINERSSat Apr 10 12:24:21 2010(r206454) +++ head/MAINTAINERSSat Apr 10 12:29:09 2010(r206455) @@ -125,6 +125,7 @@ lib/libc/stdtimeedwin Heads-up apprec is maintained by a third party source. sysinstall randi Please contact about any major changes so that they can be co-ordinated. +sbin/routedbms Pre-commit review; notify vendor at rhyolite.com Following are the entries from the Makefiles, and a few other sources. Please remove stale entries from both their origin, and this file. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org