lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Tue, 07 Feb 2012 10:24:45 -0500
From:	Brian Haley <brian.haley@...com>
To:	"Erich E. Hoover" <ehoover@...es.edu>
CC:	Linux Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH v4 1/2] Implement IP_UNICAST_IF socket option.

On 02/07/2012 12:01 AM, Erich E. Hoover wrote:
> 
> The IP_UNICAST_IF feature is needed by the Wine project.  This patch implements the feature by setting the outgoing interface in a similar fashion to that of IP_MULTICAST_IF.  A separate option is needed to handle this feature since the existing options do not provide all of the characteristics required by IP_UNICAST_IF, a summary is provided below.
> 
> --- a/net/ipv4/af_inet.c
> +++ b/net/ipv4/af_inet.c
> @@ -375,6 +375,7 @@ lookup_protocol:
>  	sk->sk_protocol	   = protocol;
>  	sk->sk_backlog_rcv = sk->sk_prot->backlog_rcv;
>  
> +	inet->uc_index  = 0;
>  	inet->uc_ttl	= -1;
>  	inet->mc_loop	= 1;
>  	inet->mc_ttl	= 1;

sk_alloc() will zero the struct, so this is unnecessary.

> --- a/net/ipv4/udp.c
> +++ b/net/ipv4/udp.c
> @@ -917,6 +917,9 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,
>  		if (!saddr)
>  			saddr = inet->mc_addr;
>  		connected = 0;
> +	} else if (!ipc.oif) {
> +		ipc.oif = inet->uc_index;
> +		connected = 0;
>  	}

I don't think you want to clear 'connected' here.

-Brian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ