aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKOVACS Krisztian <hidden@sch.bme.hu>2008-10-01 10:33:10 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-01 10:33:10 -0400
commit1668e010cbe1a7567c81d4c02d31dde9859e9da1 (patch)
treef3505d22a93ed9a4b6140a7f98a9d4cc2c1f66e9
parentb9fb15067ce93497bef852c05e406d7a96212a9a (diff)
ipv4: Make inet_sock.h independent of route.h
inet_iif() in inet_sock.h requires route.h. Since users of inet_iif() usually require other route.h functionality anyway this patch moves inet_iif() to route.h. Signed-off-by: KOVACS Krisztian <hidden@sch.bme.hu> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/inet_sock.h7
-rw-r--r--include/net/ip_vs.h1
-rw-r--r--include/net/route.h5
-rw-r--r--net/ipv4/netfilter/nf_nat_helper.c1
-rw-r--r--net/ipv6/af_inet6.c1
5 files changed, 8 insertions, 7 deletions
diff --git a/include/net/inet_sock.h b/include/net/inet_sock.h
index e97b66e2a9d0..139b78b4dfeb 100644
--- a/include/net/inet_sock.h
+++ b/include/net/inet_sock.h
@@ -24,7 +24,6 @@
24#include <net/flow.h> 24#include <net/flow.h>
25#include <net/sock.h> 25#include <net/sock.h>
26#include <net/request_sock.h> 26#include <net/request_sock.h>
27#include <net/route.h>
28#include <net/netns/hash.h> 27#include <net/netns/hash.h>
29 28
30/** struct ip_options - IP Options 29/** struct ip_options - IP Options
@@ -195,12 +194,6 @@ static inline int inet_sk_ehashfn(const struct sock *sk)
195 return inet_ehashfn(net, laddr, lport, faddr, fport); 194 return inet_ehashfn(net, laddr, lport, faddr, fport);
196} 195}
197 196
198
199static inline int inet_iif(const struct sk_buff *skb)
200{
201 return skb->rtable->rt_iif;
202}
203
204static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops) 197static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops)
205{ 198{
206 struct request_sock *req = reqsk_alloc(ops); 199 struct request_sock *req = reqsk_alloc(ops);
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h
index 33e2ac6ceb3e..0b2071d9326d 100644
--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -22,6 +22,7 @@
22 22
23#include <net/checksum.h> 23#include <net/checksum.h>
24#include <linux/netfilter.h> /* for union nf_inet_addr */ 24#include <linux/netfilter.h> /* for union nf_inet_addr */
25#include <linux/ip.h>
25#include <linux/ipv6.h> /* for struct ipv6hdr */ 26#include <linux/ipv6.h> /* for struct ipv6hdr */
26#include <net/ipv6.h> /* for ipv6_addr_copy */ 27#include <net/ipv6.h> /* for ipv6_addr_copy */
27 28
diff --git a/include/net/route.h b/include/net/route.h
index 4f0d8c14736c..31d1485b624d 100644
--- a/include/net/route.h
+++ b/include/net/route.h
@@ -204,4 +204,9 @@ static inline struct inet_peer *rt_get_peer(struct rtable *rt)
204 return rt->peer; 204 return rt->peer;
205} 205}
206 206
207static inline int inet_iif(const struct sk_buff *skb)
208{
209 return skb->rtable->rt_iif;
210}
211
207#endif /* _ROUTE_H */ 212#endif /* _ROUTE_H */
diff --git a/net/ipv4/netfilter/nf_nat_helper.c b/net/ipv4/netfilter/nf_nat_helper.c
index 11976ea29884..112dcfa12900 100644
--- a/net/ipv4/netfilter/nf_nat_helper.c
+++ b/net/ipv4/netfilter/nf_nat_helper.c
@@ -16,6 +16,7 @@
16#include <linux/udp.h> 16#include <linux/udp.h>
17#include <net/checksum.h> 17#include <net/checksum.h>
18#include <net/tcp.h> 18#include <net/tcp.h>
19#include <net/route.h>
19 20
20#include <linux/netfilter_ipv4.h> 21#include <linux/netfilter_ipv4.h>
21#include <net/netfilter/nf_conntrack.h> 22#include <net/netfilter/nf_conntrack.h>
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 95055f8c3f35..f018704ecb86 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -50,6 +50,7 @@
50#include <net/ipip.h> 50#include <net/ipip.h>
51#include <net/protocol.h> 51#include <net/protocol.h>
52#include <net/inet_common.h> 52#include <net/inet_common.h>
53#include <net/route.h>
53#include <net/transp_v6.h> 54#include <net/transp_v6.h>
54#include <net/ip6_route.h> 55#include <net/ip6_route.h>
55#include <net/addrconf.h> 56#include <net/addrconf.h>