diff options
Diffstat (limited to 'net/openvswitch')
| -rw-r--r-- | net/openvswitch/actions.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index 00e447a17f64..8c4229b11c34 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c | |||
| @@ -246,11 +246,11 @@ static void update_ipv6_checksum(struct sk_buff *skb, u8 l4_proto, | |||
| 246 | { | 246 | { |
| 247 | int transport_len = skb->len - skb_transport_offset(skb); | 247 | int transport_len = skb->len - skb_transport_offset(skb); |
| 248 | 248 | ||
| 249 | if (l4_proto == IPPROTO_TCP) { | 249 | if (l4_proto == NEXTHDR_TCP) { |
| 250 | if (likely(transport_len >= sizeof(struct tcphdr))) | 250 | if (likely(transport_len >= sizeof(struct tcphdr))) |
| 251 | inet_proto_csum_replace16(&tcp_hdr(skb)->check, skb, | 251 | inet_proto_csum_replace16(&tcp_hdr(skb)->check, skb, |
| 252 | addr, new_addr, 1); | 252 | addr, new_addr, 1); |
| 253 | } else if (l4_proto == IPPROTO_UDP) { | 253 | } else if (l4_proto == NEXTHDR_UDP) { |
| 254 | if (likely(transport_len >= sizeof(struct udphdr))) { | 254 | if (likely(transport_len >= sizeof(struct udphdr))) { |
| 255 | struct udphdr *uh = udp_hdr(skb); | 255 | struct udphdr *uh = udp_hdr(skb); |
| 256 | 256 | ||
| @@ -261,6 +261,10 @@ static void update_ipv6_checksum(struct sk_buff *skb, u8 l4_proto, | |||
| 261 | uh->check = CSUM_MANGLED_0; | 261 | uh->check = CSUM_MANGLED_0; |
| 262 | } | 262 | } |
| 263 | } | 263 | } |
| 264 | } else if (l4_proto == NEXTHDR_ICMP) { | ||
| 265 | if (likely(transport_len >= sizeof(struct icmp6hdr))) | ||
| 266 | inet_proto_csum_replace16(&icmp6_hdr(skb)->icmp6_cksum, | ||
| 267 | skb, addr, new_addr, 1); | ||
| 264 | } | 268 | } |
| 265 | } | 269 | } |
| 266 | 270 | ||
