From: jamal <hadi@cyberus.ca>
To: KOVACS Krisztian <hidden@balabit.hu>
Cc: KOVACS Krisztian <hidden@sch.bme.hu>,
Patrick McHardy <kaber@trash.net>,
Andreas Schultz <aschultz@warp10.net>,
tproxy@lists.balabit.hu, netdev@vger.kernel.org
Subject: Re: [tproxy,regression] tproxy broken in 2.6.32
Date: Mon, 30 Nov 2009 08:59:37 -0500 [thread overview]
Message-ID: <1259589577.873.30.camel@bigi> (raw)
In-Reply-To: <1259585129.3992.13.camel@nienna.balabit>
[-- Attachment #1: Type: text/plain, Size: 943 bytes --]
On Mon, 2009-11-30 at 13:45 +0100, KOVACS Krisztian wrote:
> Hi,
>
> No, because by narrowing the rule to specific ingress interfaces the
> lookup done in fib_validate_source() won't match the rule(s) (because
> the flow used will have iif set to the loopback device), and thus it
> will look up the main table and select a unicast route.
ok, nice;->
> I don't think it would be unreasonable to add a sysctl but disable the
> feature by default. It's up to you, of course.
The problem is it is hard to decide where the proper exception is to be
made. I can make it only worry about the scenario you are faced with
something like attached (incomplete, uncompiled, untested) patch. Will
that do it or can you think of other scenarios where source validation
is done and this is needed (example forwarding path)? Patrick?
[I could move the check into fib_validate, but that would punish other
users with a few extra cycles].
cheers,
jamal
[-- Attachment #2: fib-val-sysctl --]
[-- Type: text/x-patch, Size: 587 bytes --]
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 5b1050a..f509f7b 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2139,9 +2139,12 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
if (res.type == RTN_LOCAL) {
int result;
+ int mark = 0;
+ if (sysctl_mark_validate_source)
+ mark = skb->mark;
result = fib_validate_source(saddr, daddr, tos,
net->loopback_dev->ifindex,
- dev, &spec_dst, &itag, skb->mark);
+ dev, &spec_dst, &itag, mark);
if (result < 0)
goto martian_source;
if (result)
next prev parent reply other threads:[~2009-11-30 13:59 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <db81a9a20911230443h443b3c2l8fab5aef7b09cfa@mail.gmail.com>
[not found] ` <1259137434.9191.3.camel@nienna.balabit>
2009-11-26 17:19 ` [tproxy,regression] tproxy broken in 2.6.32 Andreas Schultz
2009-11-27 8:26 ` KOVACS Krisztian
2009-11-27 9:11 ` Andreas Schultz
2009-11-27 16:05 ` jamal
2009-11-28 15:15 ` KOVACS Krisztian
2009-11-28 15:45 ` jamal
2009-11-28 18:50 ` KOVACS Krisztian
2009-11-28 19:26 ` jamal
2009-11-28 15:46 ` Patrick McHardy
2009-11-28 16:04 ` jamal
2009-11-28 17:07 ` Patrick McHardy
2009-11-28 17:36 ` jamal
2009-11-28 19:05 ` KOVACS Krisztian
2009-11-28 19:44 ` jamal
2009-11-28 21:21 ` David Miller
2009-11-28 22:20 ` jamal
2009-11-29 20:35 ` KOVACS Krisztian
2009-11-30 12:15 ` jamal
2009-11-30 12:45 ` KOVACS Krisztian
2009-11-30 13:59 ` jamal [this message]
2009-12-01 13:34 ` jamal
2009-12-03 6:31 ` David Miller
2009-12-03 13:53 ` jamal
2009-12-03 13:55 ` Patrick McHardy
2009-12-03 14:07 ` KOVACS Krisztian
2009-12-03 14:29 ` jamal
2009-12-13 16:52 ` [PATCH] net: restore ip source validation WAS(Re: " jamal
2009-12-13 18:12 ` Julian Anastasov
2009-12-13 18:38 ` jamal
2009-12-13 19:11 ` jamal
2009-12-13 19:15 ` jamal
2009-12-14 3:10 ` David Miller
2009-12-14 10:19 ` jamal
2009-12-26 1:30 ` David Miller
2009-12-26 15:05 ` jamal
2009-12-26 21:45 ` David Miller
2009-11-30 20:17 ` David Miller
2009-11-28 21:22 ` David Miller
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=1259589577.873.30.camel@bigi \
--to=hadi@cyberus.ca \
--cc=aschultz@warp10.net \
--cc=hidden@balabit.hu \
--cc=hidden@sch.bme.hu \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=tproxy@lists.balabit.hu \
/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).