diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2011-04-04 17:44:44 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2011-04-04 17:44:44 +0000 |
commit | 6a30f7d0b34875b3f04cbe05136e7cb5dcc5a1cd (patch) | |
tree | 0229d6c6af44dfd977a80497e25d91c2d6dee1ee /sys/netmpls | |
parent | a1a24207faf15cb00cca555393dcaa17145ebe64 (diff) |
de-guttenberg our stack a bit
we don't need 7 f***ing copies of the same code to do the protocol checksums
(or not, depending on hw capabilities). claudio ok
Diffstat (limited to 'sys/netmpls')
-rw-r--r-- | sys/netmpls/mpls_output.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/netmpls/mpls_output.c b/sys/netmpls/mpls_output.c index 8641d62f5a1..3a18614be7c 100644 --- a/sys/netmpls/mpls_output.c +++ b/sys/netmpls/mpls_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mpls_output.c,v 1.14 2011/04/04 16:20:02 henning Exp $ */ +/* $OpenBSD: mpls_output.c,v 1.15 2011/04/04 17:44:43 henning Exp $ */ /* * Copyright (c) 2008 Claudio Jeker <claudio@openbsd.org> @@ -175,10 +175,8 @@ mpls_do_cksum(struct mbuf *m) struct ip *ip; u_int16_t hlen; - if (m->m_pkthdr.csum_flags & (M_TCPV4_CSUM_OUT | M_UDPV4_CSUM_OUT)) { - in_delayed_cksum(m); - m->m_pkthdr.csum_flags &= ~(M_UDPV4_CSUM_OUT|M_TCPV4_CSUM_OUT); - } + in_proto_cksum_out(m, NULL); + if (m->m_pkthdr.csum_flags & M_IPV4_CSUM_OUT) { ip = mtod(m, struct ip *); hlen = ip->ip_hl << 2; |