lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141202102008.GC16959@breakpoint.cc>
Date:	Tue, 2 Dec 2014 11:20:08 +0100
From:	Florian Westphal <fw@...len.de>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	Florian Westphal <fw@...len.de>, netfilter-devel@...r.kernel.org,
	brouer@...hat.com, netdev@...r.kernel.org
Subject: Re: [RFC PATCH] netfilter: conntrack: cache route for forwarded
 connections

Eric Dumazet <eric.dumazet@...il.com> wrote:
> On Tue, 2014-12-02 at 01:28 +0100, Florian Westphal wrote:
> > ... to avoid per-packet FIB lookup if possible.
> > 
> > The cached dst is re-used provided the input interface
> > is the same as that of the previous packet in the same direction.
> > 
> > If not, the cached dst is invalidated.
> > 
> > This should speed up forwarding when conntrack is already in use
> > anyway, especially when using reverse path filtering -- active RPF
> > enforces two FIB lookups for each packet.
> > 
> > Before the routing cache removal this didn't matter since RPF
> > was performed only when route cache didn't yield a result; but without
> > route cache it comes at high price.
> > 
> > Signed-off-by: Florian Westphal <fw@...len.de>
> > ---
> 
> Seems a good idea (but you might need some IPv6 care, as ( dst =
> dst_check(dst, 0); ) seems to handle IPv4 only)

As usual, you're right...

AFAICS its enough to stash fib sernum of the rt6info too and pass
that as the cookie, phew :-)

> Another idea would be to re-use TCP ehash so that regular IP early demux
> can be used, with a single lookup for both local and forwarded sessions.

Hmm, I'll look at this.  Maybe...

> (That would probably require a bit more memory, as you would need to
> insert into TCP ehash some kind of 'tiny sockets' )

... such tiny socket could be stored/tied to the conntrack extension
area.

I think we need to be careful to not re-add the route cache (and the DoS
issues associated with it).

Thanks Eric!
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ