From: Amin Azez <azez@ufomechanic.net>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Netfilter Developer Mailing List <netfilter-devel@vger.kernel.org>
Subject: Re: xt_gateway locks up
Date: Fri, 26 Oct 2007 15:08:55 +0100 [thread overview]
Message-ID: <4721F4F7.1060602@ufomechanic.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0710220012060.1997@fbirervta.pbzchgretzou.qr>
* Jan Engelhardt wrote, On 21/10/07 23:14:
> Hi Sam,
>
>
> just for the fun of it, I tried:
>
> iptables -t mangle -A PREROUTING -m gateway --nexthop 10.10.96.1
>
> and it locked up hard (not even sysrq-b was possible).
> I am not sure why that happened - it does work properly in -t filter -A
> OUTPUT, though. I'll experiment a bit.
> The codebase I am on is at
> http://dev.computergmbh.de/wsvn/misc_kernel/xt_gateway/
Yeah, my match function was very verbose:
{
const struct ipt_gateway_info *info = matchinfo;
const struct iphdr *iph = skb->nh.iph;
return ( !!(info->flags & IPT_GATEWAY_INV) ^
( skb && skb->dst && skb->dst->neighbour &&
...
It assumes that IF skb->dst is set, that it is a neighbour table entry.
Your code is:
dst = skb->dst;
if ((neigh = dst->neighbour) == NULL)
return false;
It doesn't consider that skb->dst may be NULL, which it will in PRE_ROUTING.
Sam
next prev parent reply other threads:[~2007-10-26 14:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-21 22:14 xt_gateway locks up Jan Engelhardt
2007-10-26 13:48 ` Amin Azez
2007-10-26 14:08 ` Amin Azez [this message]
2007-10-26 14:33 ` Jan Engelhardt
[not found] ` <4722034C.5020803@ufomechanic.net>
2007-10-26 15:33 ` Jan Engelhardt
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=4721F4F7.1060602@ufomechanic.net \
--to=azez@ufomechanic.net \
--cc=jengelh@computergmbh.de \
--cc=netfilter-devel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.