OpenBSD Journal

[patch] VLAN users

Contributed by phessler on from the patch-testing dept.

Brad writes : "If you use VLANs under OpenBSD then please try out this diff and let me know how goes." Brad continues:
- In vlan_input()/vlan_input_tag(), always mask off all but the VLID
  bits from tags extracted from received frames. (Some drivers may
  already do this masking internally, but doing it here doesn't hurt
  and insures consistency.)
- In vlan_ioctl(), don't let the user set a VLAN ID value with anything
  besides the VLID bits set, otherwise we will have trouble matching
  an interface in vlan_input() later.
- Set the interface speed back to zero after ether_ifattach(). RFC 2863
  says: "For a sub-layer which has no concept of of bandwidth, [ifSpeed]
  should be zero."
- Do not call if_down() on a parent interface if it's already down.

From FreeBSD

The patch (as always) applies to -current.

(Comments are closed)


Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]