diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-12-16 06:45:05 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-18 01:18:18 +0400 |
commit | 7022ef8b2a673db3d12a348331181f579afe9b22 (patch) | |
tree | 964c7d9b0acb1a2bef6f288be65859bd3499e79c | |
parent | 53385d2d1de84f4036a0919ec46964c4e81b83f5 (diff) | |
download | linux-7022ef8b2a673db3d12a348331181f579afe9b22.tar.xz |
xen-netback: fix fragments error handling in checksum_setup_ip()
Fix to return -EPROTO error if fragments detected in checksum_setup_ip().
Fixes: 1431fb31ecba ('xen-netback: fix fragment detection in checksum setup')
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/xen-netback/netback.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c index e884ee1fe7ed..27bbe58dcbe7 100644 --- a/drivers/net/xen-netback/netback.c +++ b/drivers/net/xen-netback/netback.c @@ -1197,6 +1197,9 @@ static int checksum_setup_ip(struct xenvif *vif, struct sk_buff *skb, err = -EPROTO; + if (fragment) + goto out; + switch (ip_hdr(skb)->protocol) { case IPPROTO_TCP: err = maybe_pull_tail(skb, |