From: Patrick McHardy <kaber@trash.net>
To: kxie@chelsio.com
Cc: linux-scsi@vger.kernel.org, open-iscsi@googlegroups.com,
netdev@vger.kernel.org, davem@davemloft.net, rakesh@chelsio.com,
James.Bottomley@HansenPartnership.com, michaelc@cs.wisc.edu,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] cxgb3i: Fix a login over vlan issue
Date: Thu, 10 Dec 2009 12:49:48 +0100 [thread overview]
Message-ID: <4B20E05C.1010604@trash.net> (raw)
In-Reply-To: <200912100535.nBA5ZM0L000413@localhost.localdomain>
kxie@chelsio.com wrote:
> [PATCH 1/1] cxgb3i: Fix a login over vlan issue
>
> From: Karen Xie <kxie@chelsio.com>
>
> Fix a login over vlan issue, when parent interface is vlan and we are using
>
> cxgb3i sepecific private ip address in '/etc/iscsi/ifaces/' iface file.
>
> +/**
> + * cxgb3i_find_dev - find the interface associated with the given address
> + * @ipaddr: ip address
> + */
> +static struct net_device *cxgb3i_find_dev(__be32 ipaddr)
> +{
> + struct flowi fl;
> + int err;
> + struct rtable *rt;
> +
> + memset(&fl, 0, sizeof(fl));
> + fl.nl_u.ip4_u.daddr = ipaddr;
> +
> + err = ip_route_output_key(&init_net, &rt, &fl);
> + if (!err)
> + return (&rt->u.dst)->dev;
> +
> + return NULL;
> +}
This probably shouldn't be using init_net but the current namespace.
next prev parent reply other threads:[~2009-12-10 11:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-10 5:35 [PATCH 1/1] cxgb3i: Fix a login over vlan issue kxie
2009-12-10 11:49 ` Patrick McHardy [this message]
2009-12-10 13:46 ` Rakesh Ranjan
-- strict thread matches above, loose matches on Subject: below --
2009-12-04 11:04 Rakesh Ranjan
2009-12-07 16:34 ` Mike Christie
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=4B20E05C.1010604@trash.net \
--to=kaber@trash.net \
--cc=James.Bottomley@HansenPartnership.com \
--cc=davem@davemloft.net \
--cc=kxie@chelsio.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=netdev@vger.kernel.org \
--cc=open-iscsi@googlegroups.com \
--cc=rakesh@chelsio.com \
/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).