diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2013-10-22 15:08:56 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2013-10-22 15:08:56 +0000 |
commit | 3e9bd1c791b8d1b0eeb058f975240b5fb0a47a67 (patch) | |
tree | 65b85227996208ac0c3e5dfcada71ce9c585058d | |
parent | a5634fc0422e19e60cf6373a97ce1509ebcb1862 (diff) |
Compute the checksum in in_proto_cksum_out, just set the flag in
the UDP stack. ok henning@
-rw-r--r-- | sys/netinet6/udp6_output.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/netinet6/udp6_output.c b/sys/netinet6/udp6_output.c index 097d3bd0cc6..a4be49ac045 100644 --- a/sys/netinet6/udp6_output.c +++ b/sys/netinet6/udp6_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udp6_output.c,v 1.21 2013/10/21 12:37:42 deraadt Exp $ */ +/* $OpenBSD: udp6_output.c,v 1.22 2013/10/22 15:08:55 naddy Exp $ */ /* $KAME: udp6_output.c,v 1.21 2001/02/07 11:51:54 itojun Exp $ */ /* @@ -246,10 +246,7 @@ udp6_output(struct in6pcb *in6p, struct mbuf *m, struct mbuf *addr6, ip6->ip6_src = *laddr; ip6->ip6_dst = *faddr; - if ((udp6->uh_sum = in6_cksum(m, IPPROTO_UDP, - sizeof(struct ip6_hdr), plen)) == 0) { - udp6->uh_sum = 0xffff; - } + m->m_pkthdr.csum_flags |= M_UDP_CSUM_OUT; flags = 0; if (in6p->in6p_flags & IN6P_MINMTU) |