netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: vincent@bernat.im
Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org,
	netdev@vger.kernel.org, tom@herbertland.com
Subject: Re: [net-next v1] net/ipv6: allow any source address for sendmsg pktinfo with ip_nonlocal_bind
Date: Mon, 30 Jul 2018 09:08:41 -0700 (PDT)	[thread overview]
Message-ID: <20180730.090841.1368485183443140606.davem@davemloft.net> (raw)
In-Reply-To: <m38t5t6ysz.fsf@bernat.im>

From: Vincent Bernat <vincent@bernat.im>
Date: Mon, 30 Jul 2018 08:08:12 +0200

>  ❦ 29 juillet 2018 12:28 -0700, David Miller <davem@davemloft.net> :
> 
>>> When freebind feature is set of an IPv6 socket, any source address can
>>> be used when sending UDP datagrams using IPv6 PKTINFO ancillary
>>> message. Global non-local bind feature was added in commit
>>> 35a256fee52c ("ipv6: Nonlocal bind") for IPv6. This commit also allows
>>> IPv6 source address spoofing when non-local bind feature is enabled.
>>> 
>>> Signed-off-by: Vincent Bernat <vincent@bernat.im>
>>
>> This definitely seems to make sense.  And is consistent with the other
>> tests involving freebind and transparent.
>>
>> This test involving ip_nonlocal_bind, freeebind, and transparent happens
>> in several locations.  Perhaps we should add a helper function for
>> this?
> 
> Yes, I can do that. Should I also include one for SCTP?

If the helper for SCTP needs to be different and thus will only be
used in one place, probably not.  The whole idea is to remove
duplicated code, and prevent someone in the future from forgetting
to test all three values in these situations.

Thanks.

  reply	other threads:[~2018-07-30 17:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-25 11:19 [net-next v1] net/ipv6: allow any source address for sendmsg pktinfo with ip_nonlocal_bind Vincent Bernat
2018-07-29 19:28 ` David Miller
2018-07-30  6:08   ` Vincent Bernat
2018-07-30 16:08     ` David Miller [this message]
2018-07-31 19:18       ` [PATCH net-next v1] net: add helpers checking if socket can be bound to nonlocal address Vincent Bernat
2018-08-01 16:50         ` David Miller

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=20180730.090841.1368485183443140606.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.com \
    --cc=vincent@bernat.im \
    --cc=yoshfuji@linux-ipv6.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).