Skip to content

Commit

Permalink
xen-netback: fix fragments error handling in checksum_setup_ip()
Browse files Browse the repository at this point in the history
Fix to return -EPROTO error if fragments detected in checksum_setup_ip().

Fixes: 1431fb3 ('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>
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Dec 17, 2013
1 parent 53385d2 commit 7022ef8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/xen-netback/netback.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7022ef8

Please sign in to comment.