diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/udp.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 012c4621e40a..67c036384e77 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -1081,7 +1081,7 @@ static int udp_v4_mcast_deliver(struct sk_buff *skb, struct udphdr *uh, | |||
1081 | * Otherwise, csum completion requires chacksumming packet body, | 1081 | * Otherwise, csum completion requires chacksumming packet body, |
1082 | * including udp header and folding it to skb->csum. | 1082 | * including udp header and folding it to skb->csum. |
1083 | */ | 1083 | */ |
1084 | static int udp_checksum_init(struct sk_buff *skb, struct udphdr *uh, | 1084 | static void udp_checksum_init(struct sk_buff *skb, struct udphdr *uh, |
1085 | unsigned short ulen, u32 saddr, u32 daddr) | 1085 | unsigned short ulen, u32 saddr, u32 daddr) |
1086 | { | 1086 | { |
1087 | if (uh->check == 0) { | 1087 | if (uh->check == 0) { |
@@ -1095,7 +1095,6 @@ static int udp_checksum_init(struct sk_buff *skb, struct udphdr *uh, | |||
1095 | /* Probably, we should checksum udp header (it should be in cache | 1095 | /* Probably, we should checksum udp header (it should be in cache |
1096 | * in any case) and data in tiny packets (< rx copybreak). | 1096 | * in any case) and data in tiny packets (< rx copybreak). |
1097 | */ | 1097 | */ |
1098 | return 0; | ||
1099 | } | 1098 | } |
1100 | 1099 | ||
1101 | /* | 1100 | /* |
@@ -1128,8 +1127,7 @@ int udp_rcv(struct sk_buff *skb) | |||
1128 | if (pskb_trim_rcsum(skb, ulen)) | 1127 | if (pskb_trim_rcsum(skb, ulen)) |
1129 | goto short_packet; | 1128 | goto short_packet; |
1130 | 1129 | ||
1131 | if (udp_checksum_init(skb, uh, ulen, saddr, daddr) < 0) | 1130 | udp_checksum_init(skb, uh, ulen, saddr, daddr); |
1132 | goto csum_error; | ||
1133 | 1131 | ||
1134 | if(rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST)) | 1132 | if(rt->rt_flags & (RTCF_BROADCAST|RTCF_MULTICAST)) |
1135 | return udp_v4_mcast_deliver(skb, uh, saddr, daddr); | 1133 | return udp_v4_mcast_deliver(skb, uh, saddr, daddr); |