aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorKOVACS Krisztian <hidden@sch.bme.hu>2008-10-01 10:44:42 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-01 10:44:42 -0400
commit86b08d867d7de001ab224180ed7865fab93fd56e (patch)
treefc081a9ec0d0107f951cc0270da2865e1e3413e2 /include
parent88ef4a5a78e63420dd1dd770f1bd1dc198926b04 (diff)
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>
Diffstat (limited to 'include')
-rw-r--r--include/net/ip.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index 90b27f634b76..d678ea3d474a 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -29,6 +29,7 @@
29 29
30#include <net/inet_sock.h> 30#include <net/inet_sock.h>
31#include <net/snmp.h> 31#include <net/snmp.h>
32#include <net/flow.h>
32 33
33struct sock; 34struct sock;
34 35
@@ -149,6 +150,11 @@ struct ip_reply_arg {
149 150
150#define IP_REPLY_ARG_NOSRCCHECK 1 151#define IP_REPLY_ARG_NOSRCCHECK 1
151 152
153static inline __u8 ip_reply_arg_flowi_flags(const struct ip_reply_arg *arg)
154{
155 return (arg->flags & IP_REPLY_ARG_NOSRCCHECK) ? FLOWI_FLAG_ANYSRC : 0;
156}
157
152void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg, 158void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *arg,
153 unsigned int len); 159 unsigned int len);
154 160