From patchwork Thu Jan 17 03:10:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?WU9TSElGVUpJIEhpZGVha2kgLyDlkInol6Toi7HmmI4=?= X-Patchwork-Id: 213128 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 4FA9D2C0040 for ; Thu, 17 Jan 2013 14:11:03 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758889Ab3AQDK7 (ORCPT ); Wed, 16 Jan 2013 22:10:59 -0500 Received: from 94.43.138.210.xn.2iij.net ([210.138.43.94]:43481 "EHLO mail.st-paulia.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1758750Ab3AQDK6 (ORCPT ); Wed, 16 Jan 2013 22:10:58 -0500 Received: from [192.168.2.160] (unknown [192.168.2.160]) by mail.st-paulia.net (Postfix) with ESMTPSA id 57C421BDBF; Thu, 17 Jan 2013 12:10:57 +0900 (JST) Message-ID: <50F76BC1.90300@linux-ipv6.org> Date: Thu, 17 Jan 2013 12:10:57 +0900 From: YOSHIFUJI Hideaki Organization: USAGI Project User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: David Miller , netdev CC: fengguang.wu@intel.com, YOSHIFUJI Hideaki Subject: [PATCH] ipv6: Fix endianess warning in ip6_flow_hdr(). Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Commit 3e4e4c1f ("ipv6: Introduce ip6_flow_hdr() to fill version, tclass and flowlabel.) uses ntohl(), which should be htonl(). Found by Fengguang Wu . Signed-off-by: YOSHIFUJI Hideaki --- include/net/ipv6.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/net/ipv6.h b/include/net/ipv6.h index 459a5a4..be3358b 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h @@ -629,7 +629,7 @@ extern void ipv6_select_ident(struct frag_hdr *fhdr, struct rt6_info *rt); static inline void ip6_flow_hdr(struct ipv6hdr *hdr, unsigned int tclass, __be32 flowlabel) { - *(__be32 *)hdr = ntohl(0x60000000 | (tclass << 20)) | flowlabel; + *(__be32 *)hdr = htonl(0x60000000 | (tclass << 20)) | flowlabel; } static inline __be32 ip6_flowinfo(const struct ipv6hdr *hdr)