diff options
author | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2006-05-09 19:43:03 +0000 |
---|---|---|
committer | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2006-05-09 19:43:03 +0000 |
commit | 66284614119d142d5b2be26a48060c2ebea4dc00 (patch) | |
tree | 67ceed1ddea4ff4740e8a7460bd7c0a17672bbb9 /sys/net | |
parent | 6c07caddc759810cad110c3c2c258f507beb1c10 (diff) |
Remove unnecessary check for the parent interface when setting
the vlan priority. Relaxes the order of the vlanprio parameter in ifconfig.
OK claudio, brad, norby
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_vlan.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 1fdd7af54bb..ab7813a6e4e 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vlan.c,v 1.66 2006/04/11 13:29:37 henning Exp $ */ +/* $OpenBSD: if_vlan.c,v 1.67 2006/05/09 19:43:02 mpf Exp $ */ /* * Copyright 1998 Massachusetts Institute of Technology @@ -611,14 +611,6 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; if ((error = copyin(ifr->ifr_data, &vlr, sizeof vlr))) break; - if (vlr.vlr_parent[0] == '\0') - break; - - pr = ifunit(vlr.vlr_parent); - if (pr == NULL) { - error = ENOENT; - break; - } /* * Don't let the caller set up a VLAN priority * outside the range 0-7 @@ -627,16 +619,14 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) error = EINVAL; break; } - ifv->ifv_prio = vlr.vlr_tag; break; case SIOCGETVLANPRIO: bzero(&vlr, sizeof vlr); - if (ifv->ifv_p) { + if (ifv->ifv_p) strlcpy(vlr.vlr_parent, ifv->ifv_p->if_xname, sizeof(vlr.vlr_parent)); - vlr.vlr_tag = ifv->ifv_prio; - } + vlr.vlr_tag = ifv->ifv_prio; error = copyout(&vlr, ifr->ifr_data, sizeof vlr); break; case SIOCSIFFLAGS: |