* Camiel Dobbelaar <c...@sentia.nl> [2011-02-09 20:34]: > The valid range for vlan tags in OpenBSD is 0-4095 (inclusive).
not only in openbsd - that's what you can fit in the 12 bits ;) > 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 -0000 1.242 > +++ ifconfig.c 5 Feb 2011 14:28:56 -0000 > @@ -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; > ok. -- Henning Brauer, h...@bsws.de, henn...@openbsd.org BS Web Services, http://bsws.de Full-Service ISP - Secure Hosting, Mail and DNS Services Dedicated Servers, Rootservers, Application Hosting