aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index a4d005eccc7f..87152510980c 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -429,7 +429,7 @@ static int udp_push_pending_frames(struct sock *sk, struct udp_sock *up)
429 /* 429 /*
430 * Only one fragment on the socket. 430 * Only one fragment on the socket.
431 */ 431 */
432 if (skb->ip_summed == CHECKSUM_HW) { 432 if (skb->ip_summed == CHECKSUM_PARTIAL) {
433 skb->csum = offsetof(struct udphdr, check); 433 skb->csum = offsetof(struct udphdr, check);
434 uh->check = ~csum_tcpudp_magic(fl->fl4_src, fl->fl4_dst, 434 uh->check = ~csum_tcpudp_magic(fl->fl4_src, fl->fl4_dst,
435 up->len, IPPROTO_UDP, 0); 435 up->len, IPPROTO_UDP, 0);
@@ -448,7 +448,7 @@ static int udp_push_pending_frames(struct sock *sk, struct udp_sock *up)
448 * fragments on the socket so that all csums of sk_buffs 448 * fragments on the socket so that all csums of sk_buffs
449 * should be together. 449 * should be together.
450 */ 450 */
451 if (skb->ip_summed == CHECKSUM_HW) { 451 if (skb->ip_summed == CHECKSUM_PARTIAL) {
452 int offset = (unsigned char *)uh - skb->data; 452 int offset = (unsigned char *)uh - skb->data;
453 skb->csum = skb_checksum(skb, offset, skb->len - offset, 0); 453 skb->csum = skb_checksum(skb, offset, skb->len - offset, 0);
454 454
@@ -1088,7 +1088,7 @@ static void udp_checksum_init(struct sk_buff *skb, struct udphdr *uh,
1088{ 1088{
1089 if (uh->check == 0) { 1089 if (uh->check == 0) {
1090 skb->ip_summed = CHECKSUM_UNNECESSARY; 1090 skb->ip_summed = CHECKSUM_UNNECESSARY;
1091 } else if (skb->ip_summed == CHECKSUM_HW) { 1091 } else if (skb->ip_summed == CHECKSUM_COMPLETE) {
1092 if (!udp_check(uh, ulen, saddr, daddr, skb->csum)) 1092 if (!udp_check(uh, ulen, saddr, daddr, skb->csum))
1093 skb->ip_summed = CHECKSUM_UNNECESSARY; 1093 skb->ip_summed = CHECKSUM_UNNECESSARY;
1094 } 1094 }