提交 1668e010 编写于 作者: K KOVACS Krisztian 提交者: David S. Miller

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: NKOVACS Krisztian <hidden@sch.bme.hu>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b9fb1506
......@@ -24,7 +24,6 @@
#include <net/flow.h>
#include <net/sock.h>
#include <net/request_sock.h>
#include <net/route.h>
#include <net/netns/hash.h>
/** struct ip_options - IP Options
......@@ -195,12 +194,6 @@ static inline int inet_sk_ehashfn(const struct sock *sk)
return inet_ehashfn(net, laddr, lport, faddr, fport);
}
static inline int inet_iif(const struct sk_buff *skb)
{
return skb->rtable->rt_iif;
}
static inline struct request_sock *inet_reqsk_alloc(struct request_sock_ops *ops)
{
struct request_sock *req = reqsk_alloc(ops);
......
......@@ -22,6 +22,7 @@
#include <net/checksum.h>
#include <linux/netfilter.h> /* for union nf_inet_addr */
#include <linux/ip.h>
#include <linux/ipv6.h> /* for struct ipv6hdr */
#include <net/ipv6.h> /* for ipv6_addr_copy */
......
......@@ -204,4 +204,9 @@ static inline struct inet_peer *rt_get_peer(struct rtable *rt)
return rt->peer;
}
static inline int inet_iif(const struct sk_buff *skb)
{
return skb->rtable->rt_iif;
}
#endif /* _ROUTE_H */
......@@ -16,6 +16,7 @@
#include <linux/udp.h>
#include <net/checksum.h>
#include <net/tcp.h>
#include <net/route.h>
#include <linux/netfilter_ipv4.h>
#include <net/netfilter/nf_conntrack.h>
......
......@@ -50,6 +50,7 @@
#include <net/ipip.h>
#include <net/protocol.h>
#include <net/inet_common.h>
#include <net/route.h>
#include <net/transp_v6.h>
#include <net/ip6_route.h>
#include <net/addrconf.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册