diff options
author | David S. Miller <davem@davemloft.net> | 2010-05-13 02:30:45 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-05-13 02:30:45 -0400 |
commit | bf47f4b0babe287f250dd720b41ecad9b8f7ac9b (patch) | |
tree | 0829ef3bff455f98155b5cb0e91b71db36de3510 /include | |
parent | 0b9715e64f7d46a9620d4d5042a5e28f5595ed54 (diff) | |
parent | 5b285cac3570a935aaa28312c1ea28f9e01c5452 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/ipmr-2.6
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ipv6.h | 1 | ||||
-rw-r--r-- | include/linux/mroute6.h | 35 | ||||
-rw-r--r-- | include/linux/rtnetlink.h | 3 | ||||
-rw-r--r-- | include/net/netns/ipv6.h | 14 |
4 files changed, 20 insertions, 33 deletions
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h index 0e269038bb38..99e1ab7e3eec 100644 --- a/include/linux/ipv6.h +++ b/include/linux/ipv6.h | |||
@@ -383,6 +383,7 @@ struct raw6_sock { | |||
383 | __u32 checksum; /* perform checksum */ | 383 | __u32 checksum; /* perform checksum */ |
384 | __u32 offset; /* checksum offset */ | 384 | __u32 offset; /* checksum offset */ |
385 | struct icmp6_filter filter; | 385 | struct icmp6_filter filter; |
386 | __u32 ip6mr_table; | ||
386 | /* ipv6_pinfo has to be the last member of raw6_sock, see inet6_sk_generic */ | 387 | /* ipv6_pinfo has to be the last member of raw6_sock, see inet6_sk_generic */ |
387 | struct ipv6_pinfo inet6; | 388 | struct ipv6_pinfo inet6; |
388 | }; | 389 | }; |
diff --git a/include/linux/mroute6.h b/include/linux/mroute6.h index 2caa1a8e525d..6091ab77f388 100644 --- a/include/linux/mroute6.h +++ b/include/linux/mroute6.h | |||
@@ -24,7 +24,8 @@ | |||
24 | #define MRT6_DEL_MFC (MRT6_BASE+5) /* Delete a multicast forwarding entry */ | 24 | #define MRT6_DEL_MFC (MRT6_BASE+5) /* Delete a multicast forwarding entry */ |
25 | #define MRT6_VERSION (MRT6_BASE+6) /* Get the kernel multicast version */ | 25 | #define MRT6_VERSION (MRT6_BASE+6) /* Get the kernel multicast version */ |
26 | #define MRT6_ASSERT (MRT6_BASE+7) /* Activate PIM assert mode */ | 26 | #define MRT6_ASSERT (MRT6_BASE+7) /* Activate PIM assert mode */ |
27 | #define MRT6_PIM (MRT6_BASE+8) /* enable PIM code */ | 27 | #define MRT6_PIM (MRT6_BASE+8) /* enable PIM code */ |
28 | #define MRT6_TABLE (MRT6_BASE+9) /* Specify mroute table ID */ | ||
28 | 29 | ||
29 | #define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE /* IP protocol privates */ | 30 | #define SIOCGETMIFCNT_IN6 SIOCPROTOPRIVATE /* IP protocol privates */ |
30 | #define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE+1) | 31 | #define SIOCGETSGCNT_IN6 (SIOCPROTOPRIVATE+1) |
@@ -182,10 +183,7 @@ struct mif_device { | |||
182 | #define VIFF_STATIC 0x8000 | 183 | #define VIFF_STATIC 0x8000 |
183 | 184 | ||
184 | struct mfc6_cache { | 185 | struct mfc6_cache { |
185 | struct mfc6_cache *next; /* Next entry on cache line */ | 186 | struct list_head list; |
186 | #ifdef CONFIG_NET_NS | ||
187 | struct net *mfc6_net; | ||
188 | #endif | ||
189 | struct in6_addr mf6c_mcastgrp; /* Group the entry belongs to */ | 187 | struct in6_addr mf6c_mcastgrp; /* Group the entry belongs to */ |
190 | struct in6_addr mf6c_origin; /* Source of packet */ | 188 | struct in6_addr mf6c_origin; /* Source of packet */ |
191 | mifi_t mf6c_parent; /* Source interface */ | 189 | mifi_t mf6c_parent; /* Source interface */ |
@@ -208,18 +206,6 @@ struct mfc6_cache { | |||
208 | } mfc_un; | 206 | } mfc_un; |
209 | }; | 207 | }; |
210 | 208 | ||
211 | static inline | ||
212 | struct net *mfc6_net(const struct mfc6_cache *mfc) | ||
213 | { | ||
214 | return read_pnet(&mfc->mfc6_net); | ||
215 | } | ||
216 | |||
217 | static inline | ||
218 | void mfc6_net_set(struct mfc6_cache *mfc, struct net *net) | ||
219 | { | ||
220 | write_pnet(&mfc->mfc6_net, hold_net(net)); | ||
221 | } | ||
222 | |||
223 | #define MFC_STATIC 1 | 209 | #define MFC_STATIC 1 |
224 | #define MFC_NOTIFY 2 | 210 | #define MFC_NOTIFY 2 |
225 | 211 | ||
@@ -244,14 +230,17 @@ extern int ip6mr_get_route(struct net *net, struct sk_buff *skb, | |||
244 | struct rtmsg *rtm, int nowait); | 230 | struct rtmsg *rtm, int nowait); |
245 | 231 | ||
246 | #ifdef CONFIG_IPV6_MROUTE | 232 | #ifdef CONFIG_IPV6_MROUTE |
247 | static inline struct sock *mroute6_socket(struct net *net) | 233 | extern struct sock *mroute6_socket(struct net *net, struct sk_buff *skb); |
248 | { | ||
249 | return net->ipv6.mroute6_sk; | ||
250 | } | ||
251 | extern int ip6mr_sk_done(struct sock *sk); | 234 | extern int ip6mr_sk_done(struct sock *sk); |
252 | #else | 235 | #else |
253 | static inline struct sock *mroute6_socket(struct net *net) { return NULL; } | 236 | static inline struct sock *mroute6_socket(struct net *net, struct sk_buff *skb) |
254 | static inline int ip6mr_sk_done(struct sock *sk) { return 0; } | 237 | { |
238 | return NULL; | ||
239 | } | ||
240 | static inline int ip6mr_sk_done(struct sock *sk) | ||
241 | { | ||
242 | return 0; | ||
243 | } | ||
255 | #endif | 244 | #endif |
256 | #endif | 245 | #endif |
257 | 246 | ||
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h index 5a42c36cb6aa..fbc8cb0d48c3 100644 --- a/include/linux/rtnetlink.h +++ b/include/linux/rtnetlink.h | |||
@@ -11,7 +11,8 @@ | |||
11 | * families, values above 128 may be used arbitrarily. | 11 | * families, values above 128 may be used arbitrarily. |
12 | */ | 12 | */ |
13 | #define RTNL_FAMILY_IPMR 128 | 13 | #define RTNL_FAMILY_IPMR 128 |
14 | #define RTNL_FAMILY_MAX 128 | 14 | #define RTNL_FAMILY_IP6MR 129 |
15 | #define RTNL_FAMILY_MAX 129 | ||
15 | 16 | ||
16 | /**** | 17 | /**** |
17 | * Routing/neighbour discovery messages. | 18 | * Routing/neighbour discovery messages. |
diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h index 1f11ebc22151..81abfcb2eb4e 100644 --- a/include/net/netns/ipv6.h +++ b/include/net/netns/ipv6.h | |||
@@ -59,15 +59,11 @@ struct netns_ipv6 { | |||
59 | struct sock *tcp_sk; | 59 | struct sock *tcp_sk; |
60 | struct sock *igmp_sk; | 60 | struct sock *igmp_sk; |
61 | #ifdef CONFIG_IPV6_MROUTE | 61 | #ifdef CONFIG_IPV6_MROUTE |
62 | struct sock *mroute6_sk; | 62 | #ifndef CONFIG_IPV6_MROUTE_MULTIPLE_TABLES |
63 | struct mfc6_cache **mfc6_cache_array; | 63 | struct mr6_table *mrt6; |
64 | struct mif_device *vif6_table; | 64 | #else |
65 | int maxvif; | 65 | struct list_head mr6_tables; |
66 | atomic_t cache_resolve_queue_len; | 66 | struct fib_rules_ops *mr6_rules_ops; |
67 | int mroute_do_assert; | ||
68 | int mroute_do_pim; | ||
69 | #ifdef CONFIG_IPV6_PIMSM_V2 | ||
70 | int mroute_reg_vif_num; | ||
71 | #endif | 67 | #endif |
72 | #endif | 68 | #endif |
73 | }; | 69 | }; |