From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Nj A <nj_a83@yahoo.fr>
Cc: netdev@vger.kernel.org
Subject: Re: Re : Bug in using inet_lookup ()
Date: Wed, 14 Nov 2007 16:31:18 +0300 [thread overview]
Message-ID: <20071114133118.GA28232@2ka.mipt.ru> (raw)
In-Reply-To: <867900.85129.qm@web26107.mail.ukl.yahoo.com>
On Wed, Nov 14, 2007 at 01:12:11PM +0000, Nj A (nj_a83@yahoo.fr) wrote:
> I suspected it could be that. However, can't see in ip_rcv the right portion that can help.
> Any further tip please?
It is ip_rcv_finish() called from ip_rcv():
if (skb->dst == NULL) {
int err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos,
skb->dev);
if (unlikely(err)) {
if (err == -EHOSTUNREACH)
IP_INC_STATS_BH(IPSTATS_MIB_INADDRERRORS);
else if (err == -ENETUNREACH)
IP_INC_STATS_BH(IPSTATS_MIB_INNOROUTES);
goto drop;
}
}
So you will have to specify device, you got your skb via.
Actually it is not exactly needed in some cases, you will need interface
index (dev->ifindex). You can find socket by using that number instead
of dereferencing dst.
--
Evgeniy Polyakov
next prev parent reply other threads:[~2007-11-14 13:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-14 13:12 Re : Bug in using inet_lookup () Nj A
2007-11-14 13:31 ` Evgeniy Polyakov [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-11-16 9:47 Nj A
2007-11-16 10:08 ` Evgeniy Polyakov
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=20071114133118.GA28232@2ka.mipt.ru \
--to=johnpol@2ka.mipt.ru \
--cc=netdev@vger.kernel.org \
--cc=nj_a83@yahoo.fr \
/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).