From patchwork Sat Jun 11 18:32:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hannes Frederic Sowa X-Patchwork-Id: 634095 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3rRnhz4xGFz9sXR for ; Sun, 12 Jun 2016 04:32:50 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=stressinduktion.org header.i=@stressinduktion.org header.b=glsu1TzN; dkim=pass (1024-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b=Phy9UP7H; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751924AbcFKScq (ORCPT ); Sat, 11 Jun 2016 14:32:46 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:44578 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751802AbcFKScq (ORCPT ); Sat, 11 Jun 2016 14:32:46 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 06090209B1; Sat, 11 Jun 2016 14:32:45 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute5.internal (MEProxy); Sat, 11 Jun 2016 14:32:45 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= stressinduktion.org; h=cc:date:from:message-id:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=+hPBPm1sHitr+1mCEK9nPuiI8II =; b=glsu1TzNVwSCWbONGFLfCP9uPgOJbC7KKB1ye22dkmIDLV4QWbSfQAVgBa+ 0ejnV0sQ0JW5Uy2UW80g6FwTqmGuckT5hXMwxhXKctso+gAPAkzJ6IoFfKw1ZKsG GYDpnlIN026wGz7lZXsVtYeF5CVxJtZE+Iaj7FdkhxG5J5h8= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:message-id:subject:to :x-sasl-enc:x-sasl-enc; s=smtpout; bh=+hPBPm1sHitr+1mCEK9nPuiI8I I=; b=Phy9UP7HU+9UClVGxmXg2AY9SLZopVGbik0QMGTHAGZ9duVC0Tb+WlGvRb SDAr7oxHnt3jtrgkdEYPcwbiIG2SIszj4JrOL/lBsZOABPfMFYZr61qt2PplSeaM eLIGn6yJkixaNJQQCaPZUF9WyAPRHFlXqQFHM6Fb7o2SiGjVM= X-Sasl-enc: gkn8wZ79D8/BSRxC6frJdgZLos/iFkQKl45ASPl/OG3W 1465669944 Received: from z.localhost.localdomain (unknown [213.55.184.214]) by mail.messagingengine.com (Postfix) with ESMTPA id 60149F29F7; Sat, 11 Jun 2016 14:32:21 -0400 (EDT) From: Hannes Frederic Sowa To: netdev@vger.kernel.org Cc: Lorenzo Colitti Subject: [PATCH net] ipv6: fix endianness error in icmpv6_err Date: Sat, 11 Jun 2016 20:32:06 +0200 Message-Id: <1465669926-16272-1-git-send-email-hannes@stressinduktion.org> X-Mailer: git-send-email 2.5.5 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org IPv6 ping socket error handler doesn't correctly convert the new 32 bit mtu to host endianness before using. Cc: Lorenzo Colitti Fixes: 6d0bfe22611602f ("net: ipv6: Add IPv6 support to the ping socket.") Signed-off-by: Hannes Frederic Sowa Acked-by: Lorenzo Colitti --- net/ipv6/icmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 4527285fcaa2c2..a4fa840769690a 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c @@ -98,7 +98,7 @@ static void icmpv6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, if (!(type & ICMPV6_INFOMSG_MASK)) if (icmp6->icmp6_type == ICMPV6_ECHO_REQUEST) - ping_err(skb, offset, info); + ping_err(skb, offset, ntohl(info)); } static int icmpv6_rcv(struct sk_buff *skb);