diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 18:02:35 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-18 18:02:35 -0700 |
commit | 334d094504c2fe1c44211ecb49146ae6bca8c321 (patch) | |
tree | d3c0f68e4b9f8e3d2ccc39e7dfe5de0534a5fad9 /include/net/netns | |
parent | d1a4be630fb068f251d64b62919f143c49ca8057 (diff) | |
parent | d1643d24c61b725bef399cc1cf2944b4c9c23177 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.26
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6.26: (1090 commits)
[NET]: Fix and allocate less memory for ->priv'less netdevices
[IPV6]: Fix dangling references on error in fib6_add().
[NETLABEL]: Fix NULL deref in netlbl_unlabel_staticlist_gen() if ifindex not found
[PKT_SCHED]: Fix datalen check in tcf_simp_init().
[INET]: Uninline the __inet_inherit_port call.
[INET]: Drop the inet_inherit_port() call.
SCTP: Initialize partial_bytes_acked to 0, when all of the data is acked.
[netdrvr] forcedeth: internal simplifications; changelog removal
phylib: factor out get_phy_id from within get_phy_device
PHY: add BCM5464 support to broadcom PHY driver
cxgb3: Fix __must_check warning with dev_dbg.
tc35815: Statistics cleanup
natsemi: fix MMIO for PPC 44x platforms
[TIPC]: Cleanup of TIPC reference table code
[TIPC]: Optimized initialization of TIPC reference table
[TIPC]: Remove inlining of reference table locking routines
e1000: convert uint16_t style integers to u16
ixgb: convert uint16_t style integers to u16
sb1000.c: make const arrays static
sb1000.c: stop inlining largish static functions
...
Diffstat (limited to 'include/net/netns')
-rw-r--r-- | include/net/netns/core.h | 16 | ||||
-rw-r--r-- | include/net/netns/dccp.h | 11 | ||||
-rw-r--r-- | include/net/netns/generic.h | 49 | ||||
-rw-r--r-- | include/net/netns/ipv4.h | 11 | ||||
-rw-r--r-- | include/net/netns/ipv6.h | 18 |
5 files changed, 105 insertions, 0 deletions
diff --git a/include/net/netns/core.h b/include/net/netns/core.h new file mode 100644 index 00000000000..24d4be76bbd --- /dev/null +++ b/include/net/netns/core.h @@ -0,0 +1,16 @@ +#ifndef __NETNS_CORE_H__ +#define __NETNS_CORE_H__ + +struct ctl_table_header; +struct prot_inuse; + +struct netns_core { + /* core sysctls */ + struct ctl_table_header *sysctl_hdr; + + int sysctl_somaxconn; + + struct prot_inuse *inuse; +}; + +#endif diff --git a/include/net/netns/dccp.h b/include/net/netns/dccp.h new file mode 100644 index 00000000000..98d2a7ce1f7 --- /dev/null +++ b/include/net/netns/dccp.h @@ -0,0 +1,11 @@ +#ifndef __NETNS_DCCP_H__ +#define __NETNS_DCCP_H__ + +struct sock; + +struct netns_dccp { + struct sock *v4_ctl_sk; + struct sock *v6_ctl_sk; +}; + +#endif diff --git a/include/net/netns/generic.h b/include/net/netns/generic.h new file mode 100644 index 00000000000..0c04fd2a700 --- /dev/null +++ b/include/net/netns/generic.h @@ -0,0 +1,49 @@ +/* + * generic net pointers + */ + +#ifndef __NET_GENERIC_H__ +#define __NET_GENERIC_H__ + +#include <linux/rcupdate.h> + +/* + * Generic net pointers are to be used by modules to put some private + * stuff on the struct net without explicit struct net modification + * + * The rules are simple: + * 1. register the ops with register_pernet_gen_device to get the id + * of your private pointer; + * 2. call net_assign_generic() to put the private data on the struct + * net (most preferably this should be done in the ->init callback + * of the ops registered); + * 3. do not change this pointer while the net is alive; + * 4. do not try to have any private reference on the net_generic object. + * + * After accomplishing all of the above, the private pointer can be + * accessed with the net_generic() call. + */ + +struct net_generic { + unsigned int len; + struct rcu_head rcu; + + void *ptr[0]; +}; + +static inline void *net_generic(struct net *net, int id) +{ + struct net_generic *ng; + void *ptr; + + rcu_read_lock(); + ng = rcu_dereference(net->gen); + BUG_ON(id == 0 || id > ng->len); + ptr = ng->ptr[id - 1]; + rcu_read_unlock(); + + return ptr; +} + +extern int net_assign_generic(struct net *net, int id, void *data); +#endif diff --git a/include/net/netns/ipv4.h b/include/net/netns/ipv4.h index a9b4f608629..34ee348a2cf 100644 --- a/include/net/netns/ipv4.h +++ b/include/net/netns/ipv4.h @@ -17,6 +17,7 @@ struct netns_ipv4 { #ifdef CONFIG_SYSCTL struct ctl_table_header *forw_hdr; struct ctl_table_header *frags_hdr; + struct ctl_table_header *ipv4_hdr; #endif struct ipv4_devconf *devconf_all; struct ipv4_devconf *devconf_dflt; @@ -26,6 +27,9 @@ struct netns_ipv4 { struct hlist_head *fib_table_hash; struct sock *fibnl; + struct sock **icmp_sk; + struct sock *tcp_sock; + struct netns_frags frags; #ifdef CONFIG_NETFILTER struct xt_table *iptable_filter; @@ -33,5 +37,12 @@ struct netns_ipv4 { struct xt_table *iptable_raw; struct xt_table *arptable_filter; #endif + + int sysctl_icmp_echo_ignore_all; + int sysctl_icmp_echo_ignore_broadcasts; + int sysctl_icmp_ignore_bogus_error_responses; + int sysctl_icmp_ratelimit; + int sysctl_icmp_ratemask; + int sysctl_icmp_errors_use_inbound_ifaddr; }; #endif diff --git a/include/net/netns/ipv6.h b/include/net/netns/ipv6.h index 1dd7de4e419..ac053be6c25 100644 --- a/include/net/netns/ipv6.h +++ b/include/net/netns/ipv6.h @@ -36,5 +36,23 @@ struct netns_ipv6 { struct xt_table *ip6table_mangle; struct xt_table *ip6table_raw; #endif + struct rt6_info *ip6_null_entry; + struct rt6_statistics *rt6_stats; + struct timer_list *ip6_fib_timer; + struct hlist_head *fib_table_hash; + struct fib6_table *fib6_main_tbl; + struct dst_ops *ip6_dst_ops; + unsigned int ip6_rt_gc_expire; + unsigned long ip6_rt_last_gc; +#ifdef CONFIG_IPV6_MULTIPLE_TABLES + struct rt6_info *ip6_prohibit_entry; + struct rt6_info *ip6_blk_hole_entry; + struct fib6_table *fib6_local_tbl; + struct fib_rules_ops *fib6_rules_ops; +#endif + struct sock **icmp_sk; + struct sock *ndisc_sk; + struct sock *tcp_sk; + struct sock *igmp_sk; }; #endif |