ipv4: Make Netfilter's ip_route_me_harder() non-local address compatible
Netfilter's ip_route_me_harder() tries to re-route packets either generated or re-routed by Netfilter. This patch changes ip_route_me_harder() to handle packets from non-locally-bound sockets with IP_TRANSPARENT set as local and to set the appropriate flowi flags when re-doing the routing lookup. Signed-off-by: KOVACS Krisztian <hidden@sch.bme.hu> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
88ef4a5a78
commit
86b08d867d
@@ -16,6 +16,7 @@
|
||||
#include <linux/cryptohash.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <net/tcp.h>
|
||||
#include <net/route.h>
|
||||
|
||||
/* Timestamps: lowest 9 bits store TCP options */
|
||||
#define TSBITS 9
|
||||
@@ -337,6 +338,7 @@ struct sock *cookie_v4_check(struct sock *sk, struct sk_buff *skb,
|
||||
.saddr = ireq->loc_addr,
|
||||
.tos = RT_CONN_FLAGS(sk) } },
|
||||
.proto = IPPROTO_TCP,
|
||||
.flags = inet_sk_flowi_flags(sk),
|
||||
.uli_u = { .ports =
|
||||
{ .sport = th->dest,
|
||||
.dport = th->source } } };
|
||||
|
Reference in New Issue
Block a user