summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2012-09-19 15:29:54 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2012-09-19 15:29:54 +0000
commitc009a7194dd1b52cf29f3e3d5438ec0376f04042 (patch)
treee0da9d89a3bde59390459d737e2daf9c63dd0446 /sys/net
parent5d0553faff0d7f04567cb8502c1c04dc00cfe489 (diff)
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
Diffstat (limited to 'sys/net')
-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