netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] xen-netback: fix fragments error handling in checksum_setup_ip()
@ 2013-12-16  2:45 Wei Yongjun
  2013-12-16  9:40 ` Paul Durrant
  0 siblings, 1 reply; 4+ messages in thread
From: Wei Yongjun @ 2013-12-16  2:45 UTC (permalink / raw)
  To: ian.campbell, wei.liu2, paul.durrant, zoltan.kiss, davem
  Cc: yongjun_wei, xen-devel, netdev

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

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>
---
 drivers/net/xen-netback/netback.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index 800496b..773b731 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -1099,6 +1099,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,

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-12-17 21:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-16  2:45 [PATCH -next] xen-netback: fix fragments error handling in checksum_setup_ip() Wei Yongjun
2013-12-16  9:40 ` Paul Durrant
2013-12-16 11:52   ` Ian Campbell
2013-12-17 21:18   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).