From: alexey.vyskubov@nokia.com (Alexey Vyskubov)
To: linux-kernel@vger.kernel.org
Subject: Q about ip_local_deliver_finish
Date: Tue, 22 May 2001 14:34:07 +0300 [thread overview]
Message-ID: <20010522143407.A590@Hews1193nrc> (raw)
Hello.
I have a question (maybe stupid but I spent a lot of time trying to find an
answer)about ip_local_deliver_finish() in 2.4.4. kernel.
I'll be very grateful if someone explains me what's happening.
There is the following piece of code in ip_local_deliver_finish()
(in net/ipv4/ip_input.c):
if(ipprot != NULL) {
if(raw_sk == NULL &&
ipprot->next == NULL &&
ipprot->protocol == protocol) {
int ret;
/* Fast path... */
ret = ipprot->handler(skb);
return ret;
} else {
flag = ip_run_ipprot(skb, skb->nh.iph, ipprot, (raw_sk != NULL));
}
[some comments skipped]
if(raw_sk != NULL) { /* Shift to last raw user */
raw_rcv(raw_sk, skb);
sock_put(raw_sk);
} else if (!flag) { /* Free and report errors */
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_PROT_UNREACH, 0);
out:
kfree_skb(skb);
}
}
return 0;
But in ip_run_ipprot the return value of ipprot->handler is just ignored,
code below:
if(skb2 != NULL) {
ret = 1;
ipprot->handler(skb2);
}
If I understand correctly it means that if we have two different protocols
with the same (modulo MAX_INET_PROTOS) protocol number then
ip_local_deliver will return the return value of ipprot->handler for the
first protocol in the chain
inet_protos[protocol number modulo MAX_INET_PROTOS] and *always zero* for the
second. Why? Is it a bug or I just do not understand something?
--
Alexey
next reply other threads:[~2001-05-22 11:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-22 11:34 Alexey Vyskubov [this message]
2001-05-22 11:55 ` Alexey Vyskubov
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=20010522143407.A590@Hews1193nrc \
--to=alexey.vyskubov@nokia.com \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®