From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sowmini Varadhan Subject: Re: [PATCH net-next 2/3] rds: Enable RDS IPv6 support Date: Mon, 25 Jun 2018 13:50:06 -0400 Message-ID: <20180625175006.GI14823@oracle.com> References: <7f4f460079d3d78a18f7d759488048798e99c4db.1529922794.git.ka-cheong.poon@oracle.com> <20180625170317.GA28578@oracle.com> <25e1afda-7497-7f08-815a-286cf775bc09@oracle.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, santosh.shilimkar@oracle.com, davem@davemloft.net, rds-devel@oss.oracle.com To: Ka-Cheong Poon Return-path: Received: from userp2130.oracle.com ([156.151.31.86]:37632 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755488AbeFYRuZ (ORCPT ); Mon, 25 Jun 2018 13:50:25 -0400 Content-Disposition: inline In-Reply-To: <25e1afda-7497-7f08-815a-286cf775bc09@oracle.com> Sender: netdev-owner@vger.kernel.org List-ID: 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. > 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." Also, rds_sendmsg checks this (from net-next, your version has the equivalent ipv6_addr_any etc check): if (daddr == 0 || rs->rs_bound_addr == 0) { release_sock(sk); ret = -ENOTCONN; /* XXX not a great errno */ goto out; } > > >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. Ok --Sowmini