summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhenning <henning@openbsd.org>2012-09-19 15:29:53 +0000
committerhenning <henning@openbsd.org>2012-09-19 15:29:53 +0000
commit86ffe9aa5de08278661bd90b461339c14fc51242 (patch)
tree0f1744ca79e3e08031bcb0e2f5737edcb8fa5f20
parentreplay counter was bumped a while ago, update byte order conversion; (diff)
downloadwireguard-openbsd-86ffe9aa5de08278661bd90b461339c14fc51242.tar.xz
wireguard-openbsd-86ffe9aa5de08278661bd90b461339c14fc51242.zip
defina an IFCAP_CSUM_MASK, covering IFCAP_CSUM_*, and use it in if_vlan.c
to replace the list of them. this actually makes vlan inherit the IPv6 CSUM flags from it's parent, that had been commented out since this code was committed back in 2001. ok benno mpf
-rw-r--r--sys/net/if.h5
-rw-r--r--sys/net/if_vlan.c6
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/net/if.h b/sys/net/if.h
index 95e2d94dcd0..ee2d8e88a38 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.h,v 1.133 2012/09/10 02:24:24 guenther Exp $ */
+/* $OpenBSD: if.h,v 1.134 2012/09/19 15:29:53 henning Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
@@ -381,6 +381,9 @@ struct ifnet { /* and the entries */
#define IFCAP_CSUM_UDPv6 0x00000100 /* can do IPv6/UDP checksums */
#define IFCAP_WOL 0x00008000 /* can do wake on lan */
+#define IFCAP_CSUM_MASK (IFCAP_CSUM_IPv4 | IFCAP_CSUM_TCPv4 | \
+ IFCAP_CSUM_UDPv4 | IFCAP_CSUM_TCPv6 | IFCAP_CSUM_UDPv6)
+
/*
* Output queues (ifp->if_snd) and internetwork datagram level (pup level 1)
* input routines have queues of messages stored on ifqueue structures
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index a60d94ab85e..5ae0280ff7a 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vlan.c,v 1.91 2011/11/27 00:46:07 haesbaert Exp $ */
+/* $OpenBSD: if_vlan.c,v 1.92 2012/09/19 15:29:53 henning Exp $ */
/*
* Copyright 1998 Massachusetts Institute of Technology
@@ -424,9 +424,7 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, u_int16_t tag)
*/
if (p->if_capabilities & IFCAP_VLAN_HWTAGGING)
ifv->ifv_if.if_capabilities = p->if_capabilities &
- (IFCAP_CSUM_IPv4|IFCAP_CSUM_TCPv4|
- IFCAP_CSUM_UDPv4);
- /* (IFCAP_CSUM_TCPv6|IFCAP_CSUM_UDPv6); */
+ IFCAP_CSUM_MASK;
/*
* Hardware VLAN tagging only works with the default VLAN