netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Haley <brian.haley@hp.com>
To: "Erich E. Hoover" <ehoover@mines.edu>
Cc: Linux Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH v4 2/2] Implement IPV6_UNICAST_IF socket option.
Date: Tue, 07 Feb 2012 10:24:48 -0500	[thread overview]
Message-ID: <4F314240.7050306@hp.com> (raw)
In-Reply-To: <1328590876-15980-2-git-send-email-ehoover@mines.edu>

On 02/07/2012 12:01 AM, Erich E. Hoover wrote:
> 
> The IPV6_UNICAST_IF feature is the IPv6 compliment to IP_UNICAST_IF.

> --- a/net/ipv6/af_inet6.c
> +++ b/net/ipv6/af_inet6.c
> @@ -199,6 +199,7 @@ lookup_protocol:
>  	sk->sk_backlog_rcv	= answer->prot->backlog_rcv;
>  
>  	inet_sk(sk)->pinet6 = np = inet6_sk_generic(sk);
> +	np->ucast_oif	= 0;
>  	np->hop_limit	= -1;
>  	np->mcast_hops	= IPV6_DEFAULT_MCASTHOPS;
>  	np->mc_loop	= 1;

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

> --- a/net/ipv6/udp.c
> +++ b/net/ipv6/udp.c
> @@ -1130,6 +1130,9 @@ do_udp_sendmsg:
>  	if (!fl6.flowi6_oif && ipv6_addr_is_multicast(&fl6.daddr)) {
>  		fl6.flowi6_oif = np->mcast_oif;
>  		connected = 0;
> +	} else if (!fl6.flowi6_oif) {
> +		fl6.flowi6_oif = np->ucast_oif;
> +		connected = 0;
>  	}

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

-Brian

      reply	other threads:[~2012-02-07 15:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-07  5:01 [PATCH v4 2/2] Implement IPV6_UNICAST_IF socket option Erich E. Hoover
2012-02-07 15:24 ` Brian Haley [this message]

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=4F314240.7050306@hp.com \
    --to=brian.haley@hp.com \
    --cc=ehoover@mines.edu \
    --cc=netdev@vger.kernel.org \
    /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).