Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751279AbWEPPyH (ORCPT ); Tue, 16 May 2006 11:54:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751286AbWEPPyH (ORCPT ); Tue, 16 May 2006 11:54:07 -0400 Received: from mail8.sea5.speakeasy.net ([69.17.117.10]:41420 "EHLO mail8.sea5.speakeasy.net") by vger.kernel.org with ESMTP id S1751279AbWEPPyG (ORCPT ); Tue, 16 May 2006 11:54:06 -0400 Date: Tue, 16 May 2006 11:54:04 -0400 (EDT) From: James Morris X-X-Sender: jmorris@d.namei To: Alexey Dobriyan cc: Andrew Morton , linux-kernel@vger.kernel.org, Stephen Smalley Subject: Re: [PATCH] selinux: endian fix In-Reply-To: <20060516152305.GI10143@mipter.zuzino.mipt.ru> Message-ID: References: <20060516152305.GI10143@mipter.zuzino.mipt.ru> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 979 Lines: 32 On Tue, 16 May 2006, Alexey Dobriyan wrote: > Signed-off-by: Alexey Dobriyan Hmm, I'm certain this was tested (perhaps on a BE machine, though). In any case skb->protocol should definitely be network byte order. Acked-by: James Morris > --- a/security/selinux/hooks.c > +++ b/security/selinux/hooks.c > @@ -3231,7 +3231,7 @@ static int selinux_socket_sock_rcv_skb(s > goto out; > > /* Handle mapped IPv4 packets arriving via IPv6 sockets */ > - if (family == PF_INET6 && skb->protocol == ntohs(ETH_P_IP)) > + if (family == PF_INET6 && skb->protocol == htons(ETH_P_IP)) > family = PF_INET; > > read_lock_bh(&sk->sk_callback_lock); > -- James Morris - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/