summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2014-05-05 10:00:45 +0000
committerhenning <henning@openbsd.org>2014-05-05 10:00:45 +0000
commit309baf307c285c7bde907febd19fc6dd4ac36cf2 (patch)
tree063a6a93f83b1003d90863f0767b23985404f190
parentchange surprisingly consistent mispelling of length ("lenght") (diff)
downloadwireguard-openbsd-309baf307c285c7bde907febd19fc6dd4ac36cf2.tar.xz
wireguard-openbsd-309baf307c285c7bde907febd19fc6dd4ac36cf2.zip
remove dead code: calling ether_attach which sets if_type to IFT_ETHER,
just to set it to IFT_L2VLAN right afterwards, just to set if_type to the parent's if_type which can be anything as long as it is IFT_ETHER at config time doesn't make any sense and has zero effect. stop fiddling with if_type alltogether. also remove a question in a comment that has been answered by the last 14 years. from Marrakesh airport, ok reyk
-rw-r--r--sys/net/if_vlan.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 2c9bb1284cf..3a58d4d6e3f 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vlan.c,v 1.103 2014/04/22 11:43:07 henning Exp $ */
+/* $OpenBSD: if_vlan.c,v 1.104 2014/05/05 10:00:45 henning Exp $ */
/*
* Copyright 1998 Massachusetts Institute of Technology
@@ -151,8 +151,6 @@ vlan_clone_create(struct if_clone *ifc, int unit)
IFQ_SET_READY(&ifp->if_snd);
if_attach(ifp);
ether_ifattach(ifp);
- /* Now undo some of the damage... */
- ifp->if_type = IFT_L2VLAN;
ifp->if_hdrlen = EVL_ENCAPLEN;
ifp->if_output = vlan_output;
@@ -374,12 +372,6 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, u_int16_t tag)
}
/*
- * Inherit the if_type from the parent. This allows us to
- * participate in bridges of that type.
- */
- ifv->ifv_if.if_type = p->if_type;
-
- /*
* Inherit baudrate from the parent. An SNMP agent would use this
* information.
*/
@@ -392,9 +384,6 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, u_int16_t tag)
*
* If the card cannot handle hardware tagging, it cannot
* possibly compute the correct checksums for tagged packets.
- *
- * This brings up another possibility, do cards exist which
- * have all of these capabilities but cannot utilize them together?
*/
if (p->if_capabilities & IFCAP_VLAN_HWTAGGING)
ifv->ifv_if.if_capabilities = p->if_capabilities &