X-Git-Url: http://bbs.cooldavid.org/git/?a=blobdiff_plain;f=include%2Fnet%2Fsock.h;h=a441c9cdd62540cd7100189c5fa7aea2f6b0b22b;hb=11fe883936980fe242869d671092a466cf1db3e3;hp=0a691ea7654aefb403e25039f08641691d3de74c;hpb=573201f36fd9c7c6d5218cdcd9948cee700b277d;p=net-next-2.6.git diff --git a/include/net/sock.h b/include/net/sock.h index 0a691ea7654..a441c9cdd62 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -295,7 +295,8 @@ struct sock { unsigned short sk_ack_backlog; unsigned short sk_max_ack_backlog; __u32 sk_priority; - struct ucred sk_peercred; + struct pid *sk_peer_pid; + const struct cred *sk_peer_cred; long sk_rcvtimeo; long sk_sndtimeo; struct sk_filter *sk_filter; @@ -771,6 +772,7 @@ struct proto { int *sysctl_wmem; int *sysctl_rmem; int max_header; + bool no_autobind; struct kmem_cache *slab; unsigned int obj_size; @@ -1706,19 +1708,13 @@ static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_e static inline struct net *sock_net(const struct sock *sk) { -#ifdef CONFIG_NET_NS - return sk->sk_net; -#else - return &init_net; -#endif + return read_pnet(&sk->sk_net); } static inline void sock_net_set(struct sock *sk, struct net *net) { -#ifdef CONFIG_NET_NS - sk->sk_net = net; -#endif + write_pnet(&sk->sk_net, net); } /*