public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <rdreier-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>
To: Sean Hefty <sean.hefty-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 5/9 v2] ib/addr: verify source and destination address families match
Date: Wed, 18 Nov 2009 16:59:33 -0800	[thread overview]
Message-ID: <adaws1n8h3e.fsf@roland-alpha.cisco.com> (raw)
In-Reply-To: <75A0BA738B5E4574AC17BB674109FBB2-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org> (Sean Hefty's message of "Wed, 18 Nov 2009 08:50:09 -0800")


 > -	if (src_addr)
 > -		memcpy(&req->src_addr, src_addr, ip_addr_size(src_addr));
 > +	if (src_addr->sa_family != dst_addr->sa_family)
 > +		return -EINVAL;
 
The old code seemed to allow for the possibility of src_addr being
NULL.  There only seems to be one in-tree caller of rdma_resolve_ip,
which does pass in a src_addr, but the API definition in the header says

 * @src_addr: An optional source address to use in the resolution.  If a

so it seems passing in NULL would be allowed?

 - R.
--
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-11-19  0:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-17  0:00 [PATCH 5/9] ib/addr: verify source and destination address families match Sean Hefty
     [not found] ` <4329E49DC571489C9F9498770613E42D-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-11-18 16:50   ` [PATCH 5/9 v2] " Sean Hefty
     [not found]     ` <75A0BA738B5E4574AC17BB674109FBB2-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-11-19  0:59       ` Roland Dreier [this message]
     [not found]         ` <adaws1n8h3e.fsf-BjVyx320WGW9gfZ95n9DRSW4+XlvGpQz@public.gmane.org>
2009-11-19  1:27           ` Sean Hefty
     [not found]             ` <7F0D72D35EF140058670BF8E228966B8-Zpru7NauK7drdx17CPfAsdBPR1lH4CV8@public.gmane.org>
2009-11-19  1:30               ` Roland Dreier
2009-11-19 16:42       ` [PATCH 5/9 v3] " 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=adaws1n8h3e.fsf@roland-alpha.cisco.com \
    --to=rdreier-fyb4gu1cfyuavxtiumwx3w@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