public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: "David J. Wilder" <dwilder-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: leo.tominna-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org,
	Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH RDMA] Fixup IPv6 support and IPv4 routing corner cases for RDMA CM
Date: Thu, 29 Oct 2009 12:56:01 -0700	[thread overview]
Message-ID: <1256846162.12957.27.camel@wilder.ibm.com> (raw)
In-Reply-To: <20091028054253.GA22882-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>


On Tue, 2009-10-27 at 23:42 -0600, Jason Gunthorpe wrote:

> 
> I left the network namespace stuff alone and kept with the init_net
> situation..

Another possible solution ;)

 if (rt->idev->dev->flags & IFF_LOOPBACK){


> 
> -static int addr_resolve_remote(struct sockaddr *src_in,
> -				struct sockaddr *dst_in,
> -				struct rdma_dev_addr *addr)
> +static int addr_resolve(struct sockaddr *src_in,
> +			struct sockaddr *dst_in,
> +			struct rdma_dev_addr *addr)
>  {

A problem here, if a source address has not been specified then this
test is invalid.  I had to change it to use dst_in->sa_family. But as
you said, we should have validated sa_family before this point.    

>  	if (src_in->sa_family == AF_INET) {
> -		return addr4_resolve_remote((struct sockaddr_in *) src_in,
> +		return addr4_resolve((struct sockaddr_in *) src_in,
>  			(struct sockaddr_in *) dst_in, addr);
>  	} else
> -		return addr6_resolve_remote((struct sockaddr_in6 *) src_in,
> +		return addr6_resolve((struct sockaddr_in6 *) src_in,
>  			(struct sockaddr_in6 *) dst_in, addr);
>  }


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2009-10-29 19:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28  5:42 [PATCH RDMA] Fixup IPv6 support and IPv4 routing corner cases for RDMA CM Jason Gunthorpe
     [not found] ` <20091028054253.GA22882-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-10-28  8:08   ` Sean Hefty
     [not found]     ` <4E89386C612E46C9A33501CEC2521BAF-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-10-28 16:50       ` Jason Gunthorpe
     [not found]         ` <20091028165043.GD1966-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-10-28 17:58           ` Sean Hefty
     [not found]             ` <E27512B9FE294380956C074D2C35D235-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-10-28 18:58               ` Jason Gunthorpe
     [not found]                 ` <20091028185847.GK14520-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-11-05 12:21                   ` Or Gerlitz
     [not found]                     ` <4AF2C361.1080307-smomgflXvOZWk0Htik3J/w@public.gmane.org>
2009-11-05 17:04                       ` Jason Gunthorpe
2009-10-28 14:49   ` Or Gerlitz
     [not found]     ` <4AE859F8.2030708-hKgKHo2Ms0FWk0Htik3J/w@public.gmane.org>
2009-10-28 16:46       ` Jason Gunthorpe
     [not found]         ` <20091028164615.GC1966-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-10-28 17:05           ` Sean Hefty
     [not found]             ` <D775590A8D92454491BD2034E85B2B36-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-10-28 17:32               ` Jason Gunthorpe
     [not found]                 ` <20091028173229.GI14520-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-11-01  6:15                   ` Or Gerlitz
2009-10-29 19:56   ` David J. Wilder [this message]
     [not found]     ` <1256846162.12957.27.camel-XfwDJb4SXxnMbYB6QlFGEg@public.gmane.org>
2009-10-29 20:21       ` Jason Gunthorpe
     [not found]         ` <20091029202106.GF1966-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2009-11-10 21:05           ` Pradeep Satyanarayana
     [not found]             ` <4AF9D5A1.6030309-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2009-11-10 21:12               ` Sean Hefty
     [not found]                 ` <E34EB5B2A00C459EB20F307ED1C5B437-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-11-10 21:25                   ` Jason Gunthorpe
2009-11-10 23:03                   ` David J. Wilder
2009-11-11 10:16                   ` Or Gerlitz
     [not found]                     ` <4AFA8EF7.6010408-smomgflXvOZWk0Htik3J/w@public.gmane.org>
2009-11-11 17:12                       ` Sean Hefty

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=1256846162.12957.27.camel@wilder.ibm.com \
    --to=dwilder-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=leo.tominna-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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