|
@@ -1209,8 +1209,10 @@ static int checksum_setup_ip(struct xenvif *vif, struct sk_buff *skb,
|
|
|
goto out;
|
|
|
|
|
|
if (!skb_partial_csum_set(skb, off,
|
|
|
- offsetof(struct tcphdr, check)))
|
|
|
+ offsetof(struct tcphdr, check))) {
|
|
|
+ err = -EPROTO;
|
|
|
goto out;
|
|
|
+ }
|
|
|
|
|
|
if (recalculate_partial_csum)
|
|
|
tcp_hdr(skb)->check =
|
|
@@ -1227,8 +1229,10 @@ static int checksum_setup_ip(struct xenvif *vif, struct sk_buff *skb,
|
|
|
goto out;
|
|
|
|
|
|
if (!skb_partial_csum_set(skb, off,
|
|
|
- offsetof(struct udphdr, check)))
|
|
|
+ offsetof(struct udphdr, check))) {
|
|
|
+ err = -EPROTO;
|
|
|
goto out;
|
|
|
+ }
|
|
|
|
|
|
if (recalculate_partial_csum)
|
|
|
udp_hdr(skb)->check =
|
|
@@ -1350,8 +1354,10 @@ static int checksum_setup_ipv6(struct xenvif *vif, struct sk_buff *skb,
|
|
|
goto out;
|
|
|
|
|
|
if (!skb_partial_csum_set(skb, off,
|
|
|
- offsetof(struct tcphdr, check)))
|
|
|
+ offsetof(struct tcphdr, check))) {
|
|
|
+ err = -EPROTO;
|
|
|
goto out;
|
|
|
+ }
|
|
|
|
|
|
if (recalculate_partial_csum)
|
|
|
tcp_hdr(skb)->check =
|
|
@@ -1368,8 +1374,10 @@ static int checksum_setup_ipv6(struct xenvif *vif, struct sk_buff *skb,
|
|
|
goto out;
|
|
|
|
|
|
if (!skb_partial_csum_set(skb, off,
|
|
|
- offsetof(struct udphdr, check)))
|
|
|
+ offsetof(struct udphdr, check))) {
|
|
|
+ err = -EPROTO;
|
|
|
goto out;
|
|
|
+ }
|
|
|
|
|
|
if (recalculate_partial_csum)
|
|
|
udp_hdr(skb)->check =
|