From: Rolf Fokkens <fokkensr@linux06.vertis.nl>
To: Stephan von Krawczynski <skraw@ithnet.com>
Cc: linux-kernel@vger.kernel.org, netfilter-devel@lists.samba.org
Subject: [PATCH] vanilla 2.4.15 iptables/REDIRECT kernel oops
Date: Wed, 28 Nov 2001 22:30:20 -0800 [thread overview]
Message-ID: <01112822302000.01349@home01> (raw)
In-Reply-To: <20011128165224.5f3dcd8e.skraw@ithnet.com>
In-Reply-To: <20011128165224.5f3dcd8e.skraw@ithnet.com>
On Wednesday 28 November 2001 07:52, Stephan von Krawczynski wrote:
> The safe patch would look like this:
>
...
>
> Can you check out?
>
I took your patch, and added an obvious change to ip_output.c as well. It's
below. The patch seems to work fine on my PC, will try tomorrow on the server
that had the problems initially.
Still don't understand why skb->sk suddenly is NULL after nf_hook_slow. Maybe
the gurus finally pay attention to this (after all, there's a patch now!!)
and look into this.
Rolf
diff -ruN linux/include/net/ip.h.orig linux/include/net/ip.h
--- linux/include/net/ip.h.orig Wed Nov 28 20:40:33 2001
+++ linux/include/net/ip.h Wed Nov 28 20:47:20 2001
@@ -181,9 +181,9 @@
static inline
int ip_dont_fragment(struct sock *sk, struct dst_entry *dst)
{
- return (sk->protinfo.af_inet.pmtudisc == IP_PMTUDISC_DO ||
- (sk->protinfo.af_inet.pmtudisc == IP_PMTUDISC_WANT &&
- !(dst->mxlock&(1<<RTAX_MTU))));
+ return (sk && (sk->protinfo.af_inet.pmtudisc == IP_PMTUDISC_DO ||
+ (sk->protinfo.af_inet.pmtudisc == IP_PMTUDISC_WANT &&
+ !(dst->mxlock&(1<<RTAX_MTU)))));
}
extern void __ip_select_ident(struct iphdr *iph, struct dst_entry *dst);
diff -ruN linux/net/ipv4/ip_output.c.orig linux/net/ipv4/ip_output.c
--- linux/net/ipv4/ip_output.c.orig Wed Nov 28 20:51:02 2001
+++ linux/net/ipv4/ip_output.c Wed Nov 28 20:52:31 2001
@@ -315,7 +315,9 @@
/* Add an IP checksum. */
ip_send_check(iph);
- skb->priority = sk->priority;
+ if (sk)
+ skb->priority = sk->priority;
+
return skb->dst->output(skb);
fragment:
> Can any ip-stack guru comment?
>
> Regards,
> Stephan
>
> PS: ip_select_ident looks clean in terms of sk==NULL, BTW.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
next parent reply other threads:[~2001-11-28 21:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20011128165224.5f3dcd8e.skraw@ithnet.com>
2001-11-29 6:30 ` Rolf Fokkens [this message]
[not found] ` <20011130151342.0ef3f171.skraw@ithnet.com>
2001-12-01 3:33 ` [PATCH] vanilla 2.4.15 iptables/REDIRECT kernel oops Rolf Fokkens
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=01112822302000.01349@home01 \
--to=fokkensr@linux06.vertis.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=netfilter-devel@lists.samba.org \
--cc=skraw@ithnet.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