Re: [PATCH] selinux: endian fix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 16 May 2006, Alexey Dobriyan wrote:

> Signed-off-by: Alexey Dobriyan <[email protected]>

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 <[email protected]>



> --- 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
<[email protected]>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux