diff options
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 0a691ea7654a..a441c9cdd625 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -295,7 +295,8 @@ struct sock { | |||
295 | unsigned short sk_ack_backlog; | 295 | unsigned short sk_ack_backlog; |
296 | unsigned short sk_max_ack_backlog; | 296 | unsigned short sk_max_ack_backlog; |
297 | __u32 sk_priority; | 297 | __u32 sk_priority; |
298 | struct ucred sk_peercred; | 298 | struct pid *sk_peer_pid; |
299 | const struct cred *sk_peer_cred; | ||
299 | long sk_rcvtimeo; | 300 | long sk_rcvtimeo; |
300 | long sk_sndtimeo; | 301 | long sk_sndtimeo; |
301 | struct sk_filter *sk_filter; | 302 | struct sk_filter *sk_filter; |
@@ -771,6 +772,7 @@ struct proto { | |||
771 | int *sysctl_wmem; | 772 | int *sysctl_wmem; |
772 | int *sysctl_rmem; | 773 | int *sysctl_rmem; |
773 | int max_header; | 774 | int max_header; |
775 | bool no_autobind; | ||
774 | 776 | ||
775 | struct kmem_cache *slab; | 777 | struct kmem_cache *slab; |
776 | unsigned int obj_size; | 778 | unsigned int obj_size; |
@@ -1706,19 +1708,13 @@ static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, int copied_e | |||
1706 | static inline | 1708 | static inline |
1707 | struct net *sock_net(const struct sock *sk) | 1709 | struct net *sock_net(const struct sock *sk) |
1708 | { | 1710 | { |
1709 | #ifdef CONFIG_NET_NS | 1711 | return read_pnet(&sk->sk_net); |
1710 | return sk->sk_net; | ||
1711 | #else | ||
1712 | return &init_net; | ||
1713 | #endif | ||
1714 | } | 1712 | } |
1715 | 1713 | ||
1716 | static inline | 1714 | static inline |
1717 | void sock_net_set(struct sock *sk, struct net *net) | 1715 | void sock_net_set(struct sock *sk, struct net *net) |
1718 | { | 1716 | { |
1719 | #ifdef CONFIG_NET_NS | 1717 | write_pnet(&sk->sk_net, net); |
1720 | sk->sk_net = net; | ||
1721 | #endif | ||
1722 | } | 1718 | } |
1723 | 1719 | ||
1724 | /* | 1720 | /* |