YP=no in mk.conf and ypldap
Hi, While building system with YP=no set in mk.conf I have found a bug: ypldap depends on yp in libc. The fix below. -- Dinar Talypov di...@yantel.ru Index: Makefile === RCS file: /cvs/src/usr.sbin/Makefile,v retrieving revision 1.153 diff -u -r1.153 Makefile --- Makefile24 Sep 2010 13:05:00 - 1.153 +++ Makefile9 Feb 2011 07:46:38 - @@ -16,14 +16,14 @@ sa sasyncd sensorsd sliplogin slstats smtpd snmpctl snmpd spamdb \ spray syslogc syslogd sysmerge tcpdrop tcpdump timed tokenadm \ tokeninit traceroute traceroute6 trpt usbdevs user vipw watchdogd \ - wsconscfg wsfontload wsmoused ypldap zdump zic ztsscale + wsconscfg wsfontload wsmoused zdump zic ztsscale .if (${AFS:L} == yes) SUBDIR+=afs .endif .if (${YP:L} == yes) -SUBDIR+=ypbind yppoll ypset ypserv +SUBDIR+=ypldap ypbind yppoll ypset ypserv .endif .include bsd.subdir.mk
Re: ospf6d crashes on interface add
On Wed, Jan 26, 2011 at 04:44:30PM +0100, Martin Pelikan wrote: Hello tech@, claudio@ in particular, this diff corrects the behavior of ospf6d when: - vlan/vether/? interface is added with some inet6 address - a configured interface is removed (please test with usb devs) In both cases the daemon crashes. Also, it contains various fixes Desired behavior: - remove if - withdraw all its routes, but keep running - add previously configured if - announce all its routes back - add unconfigured if - get everyone to know about it without crashing Even in the recent -beta one can crash ospf6d easily, just by typing # ifconfig vlan7 vlan 7 vlandev your-if even in the simplest of possible setups. I run this diff on a production router where vlans are being added dynamically from admin's web page, without any problem for two weeks. Is there any chance people won't have to patch tne 4.9-release? :-) What's the problem? Is it too complicated or have I missed something again? Thanks for any feedback. -- Martin Pelikan
ifconfig vlan tag range
The valid range for vlan tags in OpenBSD is 0-4095 (inclusive). Fix both checks. Makes vlan0 autoconfig work (obj/ifconfig has the diff): # ifconfig vlan0 vlandev fxp0 ifconfig: invalid vlan tag and device specification # obj/ifconfig vlan0 vlandev fxp0 and gives a better error message on tags 4095: # ifconfig vlan1 vlan 5000 vlandev fxp0 ifconfig: SIOCSETVLAN: Invalid argument # obj/ifconfig vlan1 vlan 5000 vlandev fxp0 ifconfig: vlan tag 5000: too large -- Cam Index: ifconfig.c === RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v retrieving revision 1.242 diff -u -r1.242 ifconfig.c --- ifconfig.c 9 Nov 2010 21:14:47 - 1.242 +++ ifconfig.c 5 Feb 2011 14:28:56 - @@ -3351,7 +3351,7 @@ struct vlanreq vreq; const char *errmsg = NULL; - __tag = tag = strtonum(val, 0, 65535, errmsg); + __tag = tag = strtonum(val, 0, 4095, errmsg); if (errmsg) errx(1, vlan tag %s: %s, val, errmsg); __have_tag = 1; @@ -3411,7 +3411,7 @@ if (!__have_tag vreq.vlr_tag == 0) { skip = strcspn(ifr.ifr_name, 0123456789); - tag = strtonum(ifr.ifr_name + skip, 1, 4095, estr); + tag = strtonum(ifr.ifr_name + skip, 0, 4095, estr); if (estr != NULL) errx(1, invalid vlan tag and device specification); vreq.vlr_tag = tag;
Re: YP=no in mk.conf and ypldap
On Wed, Feb 9, 2011 at 3:00 AM, Dinar Talypov di...@yantel.ru wrote: While building system with YP=no set in mk.conf I have found a bug: ypldap depends on yp in libc. Thanks, I should be able to commit this later tonight.
Re: YP=no in mk.conf and ypldap
On Wed, Feb 09, 2011 at 02:48:54PM -0500, Ted Unangst wrote: On Wed, Feb 9, 2011 at 3:00 AM, Dinar Talypov di...@yantel.ru wrote: While building system with YP=no set in mk.conf I have found a bug: ypldap depends on yp in libc. Thanks, I should be able to commit this later tonight. I committed it some hours ago already. -- Cheers, Jasper Capable, generous men do not create victims, they nurture them.
new usb quirk and gps device id that needs it
Hello, I recently got a Qstarz BT-Q818XT GPS receiver (http://www.qstarz.com/Products/GPS%20Products/BT-Q818XT-F.htm) which contains an MTK vII/3329 chipset (http://www.mediatek.com/en/product/info.php?sn=50). I got the following when I plugged it into my laptop which is running yesterday's snapshot: umodem0 at uhub1 port 2 configuration 1 interface 1 MTK GPS Receiver rev 2.00/1.00 addr 2 umodem0: no pointer to data interface ugen0 at uhub1 port 2 configuration 1 MTK GPS Receiver rev 2.00/1.00 addr 2 I came up with some patches that make my GPS work and now I get the following: umodem0 at uhub1 port 2 configuration 1 interface 1 MTK GPS Receiver rev 2.00/1.00 addr 2 umodem0: data interface 0, has no CM over data, has no break umodem0: status change notification available ucom0 at umodem0 The first patch adds a new class of USB quirks: Index: usb_quirks.h === RCS file: /cvs/src/sys/dev/usb/usb_quirks.h,v retrieving revision 1.16 diff -u -r1.16 usb_quirks.h --- usb_quirks.h19 Jul 2010 05:08:37 - 1.16 +++ usb_quirks.h10 Feb 2011 01:37:18 - @@ -49,6 +49,7 @@ #define UQ_MS_LEADING_BYTE 0x0001 /* mouse sends unknown leading byte */ #define UQ_EHCI_NEEDTO_DISOWN 0x0002 /* must hand device over to USB 1.1 if attached to EHCI */ +#define UQ_NO_CDC_UNION0x0004 /* no CDC UNION descriptor */ }; extern const struct usbd_quirks usbd_no_quirk; Index: umodem.c === RCS file: /cvs/src/sys/dev/usb/umodem.c,v retrieving revision 1.41 diff -u -r1.41 umodem.c --- umodem.c25 Jan 2011 20:03:36 - 1.41 +++ umodem.c10 Feb 2011 01:37:18 - @@ -267,10 +267,13 @@ /* Get the capabilities. */ umodem_get_caps(uaa, id-bInterfaceNumber, data_iface_no, sc-sc_cm_cap, sc-sc_acm_cap); - if (data_iface_no == 0) { - printf(%s: no pointer to data interface\n, - sc-sc_dev.dv_xname); - goto bad; + + if (!(usbd_get_quirks(sc-sc_udev)-uq_flags UQ_NO_CDC_UNION)) { + if (data_iface_no == 0) { + printf(%s: no pointer to data interface\n, + sc-sc_dev.dv_xname); + goto bad; + } } printf(%s: data interface %d, has %sCM over data, has %sbreak\n, The second patch adds the vendor/device IDs and makes the GPS use the quirk: Index: usbdevs === RCS file: /cvs/src/sys/dev/usb/usbdevs,v retrieving revision 1.540 diff -u -r1.540 usbdevs --- usbdevs 1 Feb 2011 18:23:59 - 1.540 +++ usbdevs 10 Feb 2011 01:37:53 - @@ -437,6 +437,7 @@ vendor HAWKING 0x0e66 Hawking vendor FOSSIL 0x0e67 Fossil vendor GMATE 0x0e7e G.Mate +vendor MTK 0x0e8d MTK vendor OTI 0x0ea0 Ours Technology vendor PILOTECH0x0eaf Pilotech vendor NOVATECH0x0eb0 Nova Tech @@ -2565,6 +2566,9 @@ /* MDS products */ product MDS ISDBT 0x0001 MDS ISDB-T tuner + +/* MTK products */ +product MTK VII33290x3329 vII/3329 GPS Receiver /* Meinberg Funkuhren products */ product MEINBERG USB5131 0x0301 USB 5131 DCF77 - Radio Clock Index: usb_quirks.c === RCS file: /cvs/src/sys/dev/usb/usb_quirks.c,v retrieving revision 1.63 diff -u -r1.63 usb_quirks.c --- usb_quirks.c2 Dec 2010 06:39:09 - 1.63 +++ usb_quirks.c10 Feb 2011 01:37:54 - @@ -133,6 +133,8 @@ { USB_VENDOR_VELLEMAN, USB_PRODUCT_VELLEMAN_K8055,ANY,{ UQ_BAD_HID }}, { USB_VENDOR_DREAMLINK, USB_PRODUCT_DREAMLINK_ULMB1, ANY,{ UQ_BAD_HID }}, + { USB_VENDOR_MTK, USB_PRODUCT_MTK_VII3329,ANY,{ UQ_NO_CDC_UNION }}, + { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220, ANY,{ UQ_NO_STRINGS }}, { USB_VENDOR_SHANTOU, USB_PRODUCT_SHANTOU_DM9601, ANY, { UQ_NO_STRINGS }}, { USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2573, ANY, { UQ_NO_STRINGS }}, A very similar thing was done in NetBSD last year. See http://www.mail-archive.com/source-changes-full@netbsd.org/msg15959.html and http://www.mail-archive.com/source-changes-full@netbsd.org/msg15960.html Daniel
Re: new usb quirk and gps device id that needs it
this actually works? could you please send usbctl (from the usbutil package) output for this device? I don't like adding more quirks. if the device has the bulk endpoints in the control interface, then the requirement that the endpoints be in a different interface is overly restrictive. On Wed, Feb 09, 2011 at 06:54:06PM -0800, Daniel C. Sinclair wrote: Hello, I recently got a Qstarz BT-Q818XT GPS receiver (http://www.qstarz.com/Products/GPS%20Products/BT-Q818XT-F.htm) which contains an MTK vII/3329 chipset (http://www.mediatek.com/en/product/info.php?sn=50). I got the following when I plugged it into my laptop which is running yesterday's snapshot: umodem0 at uhub1 port 2 configuration 1 interface 1 MTK GPS Receiver rev 2.00/1.00 addr 2 umodem0: no pointer to data interface ugen0 at uhub1 port 2 configuration 1 MTK GPS Receiver rev 2.00/1.00 addr 2 I came up with some patches that make my GPS work and now I get the following: umodem0 at uhub1 port 2 configuration 1 interface 1 MTK GPS Receiver rev 2.00/1.00 addr 2 umodem0: data interface 0, has no CM over data, has no break umodem0: status change notification available ucom0 at umodem0 The first patch adds a new class of USB quirks: Index: usb_quirks.h === RCS file: /cvs/src/sys/dev/usb/usb_quirks.h,v retrieving revision 1.16 diff -u -r1.16 usb_quirks.h --- usb_quirks.h 19 Jul 2010 05:08:37 - 1.16 +++ usb_quirks.h 10 Feb 2011 01:37:18 - @@ -49,6 +49,7 @@ #define UQ_MS_LEADING_BYTE 0x0001 /* mouse sends unknown leading byte */ #define UQ_EHCI_NEEDTO_DISOWN0x0002 /* must hand device over to USB 1.1 if attached to EHCI */ +#define UQ_NO_CDC_UNION 0x0004 /* no CDC UNION descriptor */ }; extern const struct usbd_quirks usbd_no_quirk; Index: umodem.c === RCS file: /cvs/src/sys/dev/usb/umodem.c,v retrieving revision 1.41 diff -u -r1.41 umodem.c --- umodem.c 25 Jan 2011 20:03:36 - 1.41 +++ umodem.c 10 Feb 2011 01:37:18 - @@ -267,10 +267,13 @@ /* Get the capabilities. */ umodem_get_caps(uaa, id-bInterfaceNumber, data_iface_no, sc-sc_cm_cap, sc-sc_acm_cap); - if (data_iface_no == 0) { - printf(%s: no pointer to data interface\n, -sc-sc_dev.dv_xname); - goto bad; + + if (!(usbd_get_quirks(sc-sc_udev)-uq_flags UQ_NO_CDC_UNION)) { + if (data_iface_no == 0) { + printf(%s: no pointer to data interface\n, +sc-sc_dev.dv_xname); + goto bad; + } } printf(%s: data interface %d, has %sCM over data, has %sbreak\n, The second patch adds the vendor/device IDs and makes the GPS use the quirk: Index: usbdevs === RCS file: /cvs/src/sys/dev/usb/usbdevs,v retrieving revision 1.540 diff -u -r1.540 usbdevs --- usbdevs 1 Feb 2011 18:23:59 - 1.540 +++ usbdevs 10 Feb 2011 01:37:53 - @@ -437,6 +437,7 @@ vendor HAWKING 0x0e66 Hawking vendor FOSSIL0x0e67 Fossil vendor GMATE 0x0e7e G.Mate +vendor MTK 0x0e8d MTK vendor OTI 0x0ea0 Ours Technology vendor PILOTECH 0x0eaf Pilotech vendor NOVATECH 0x0eb0 Nova Tech @@ -2565,6 +2566,9 @@ /* MDS products */ product MDS ISDBT0x0001 MDS ISDB-T tuner + +/* MTK products */ +product MTK VII3329 0x3329 vII/3329 GPS Receiver /* Meinberg Funkuhren products */ product MEINBERG USB5131 0x0301 USB 5131 DCF77 - Radio Clock Index: usb_quirks.c === RCS file: /cvs/src/sys/dev/usb/usb_quirks.c,v retrieving revision 1.63 diff -u -r1.63 usb_quirks.c --- usb_quirks.c 2 Dec 2010 06:39:09 - 1.63 +++ usb_quirks.c 10 Feb 2011 01:37:54 - @@ -133,6 +133,8 @@ { USB_VENDOR_VELLEMAN, USB_PRODUCT_VELLEMAN_K8055, ANY,{ UQ_BAD_HID }}, { USB_VENDOR_DREAMLINK, USB_PRODUCT_DREAMLINK_ULMB1,ANY,{ UQ_BAD_HID }}, + { USB_VENDOR_MTK, USB_PRODUCT_MTK_VII3329, ANY,{ UQ_NO_CDC_UNION }}, + { USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220, ANY,{ UQ_NO_STRINGS }}, { USB_VENDOR_SHANTOU, USB_PRODUCT_SHANTOU_DM9601, ANY, { UQ_NO_STRINGS }}, { USB_VENDOR_RALINK, USB_PRODUCT_RALINK_RT2573, ANY,{ UQ_NO_STRINGS }}, A very similar thing was done in NetBSD last year. See http://www.mail-archive.com/source-changes-full@netbsd.org/msg15959.html and http://www.mail-archive.com/source-changes-full@netbsd.org/msg15960.html Daniel -- jake...@sdf.lonestar.org SDF Public Access UNIX System -