linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: James Morris <jmorris@namei.org>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: [PATCH] selinux: endian fix
Date: Tue, 16 May 2006 11:54:04 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0605161149540.16379@d.namei> (raw)
In-Reply-To: <20060516152305.GI10143@mipter.zuzino.mipt.ru>

On Tue, 16 May 2006, Alexey Dobriyan wrote:

> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

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 <jmorris@namei.org>



> --- 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
<jmorris@namei.org>

  reply	other threads:[~2006-05-16 15:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-16 15:23 [PATCH] selinux: endian fix Alexey Dobriyan
2006-05-16 15:54 ` James Morris [this message]
2006-05-16 16:24   ` Andreas Schwab
2006-05-16 16:30     ` James Morris
2006-05-16 16:34     ` Al Viro
2006-05-16 17:42     ` Jan Engelhardt
2006-05-16 17:50       ` Andreas Schwab
2006-05-17  0:55   ` Peter Chubb

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0605161149540.16379@d.namei \
    --to=jmorris@namei.org \
    --cc=adobriyan@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sds@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).