On 6/25/2018 10:50 AM, Sowmini Varadhan wrote:
On (06/26/18 01:43), Ka-Cheong Poon wrote:

Yes, I think if the socket is bound, it should check the scope_id
in msg_name (if not NULL) to make sure that they match.  A bound
RDS socket can send to multiple peers.  But if the bound local
address is link local, it should only be allowed to send to peers
on the same link.

agree.
Yep. Its inline with RDS bind behavior.



If a socket is bound, I guess the scope_id should be used.  So
if a socket is not bound to a link local address and the socket
is used to sent to a link local peer, it should fail.

PF_RDS sockets *MUST* alwasy be bound.  See
Documentation/networking/rds.txt:
"   Sockets must be bound before you can send or receive data.
     This is needed because binding also selects a transport and
     attaches it to the socket. Once bound, the transport assignment
     does not change."

In any case link local or not, the socket needs to be bound before
any data can be sent as documented. Send path already enforces
it.

Also, why is there no IPv6 support in rds_connect?


Oops, I missed this when I ported the internal version to the
net-next version.  Will add it back.

So the net-next wasn't tested? IPv6 connections
itself wouldn't be formed with this missing. As mentioned
already, please test v2 before posting on list.

Regards,
Santosh

Reply via email to