diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-22 12:49:58 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-22 12:49:58 -0400 |
| commit | 402168cee1a0b791c54c54a68ae21bb26880f40b (patch) | |
| tree | 127b1bd8f2d06b18449998022eaab1c20baab950 /include | |
| parent | 12e8ffe35eaca1411afc1f3124478f8e2b65eedc (diff) | |
| parent | a947a39d52f5b647a2fd5eca55d39e722a2fa90f (diff) | |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (37 commits)
sky2: Avoid races in sky2_down
drivers/net/mlx4: Adjust constant
drivers/net: Move a dereference below a NULL test
drivers/net: Move a dereference below a NULL test
connector: maintainer/mail update.
USB host CDC Phonet network interface driver
macsonic, jazzsonic: fix oops on module unload
macsonic: move probe function to .devinit.text
can: switch carrier on if device was stopped while in bus-off state
can: restart device even if dev_alloc_skb() fails
can: sja1000: remove duplicated includes
New device ID for sc92031 [1088:2031]
3c589_cs: re-initialize the multicast in the tc589_reset
Fix error return for setsockopt(SO_TIMESTAMPING)
netxen: fix thermal check and shutdown
netxen: fix deadlock on dev close
netxen: fix context deletion sequence
net: Micrel KS8851 SPI network driver
tcp: Use correct peer adr when copying MD5 keys
tcp: Fix MD5 signature checking on IPv4 mapped sockets
...
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/sock.h | 32 | ||||
| -rw-r--r-- | include/net/tcp.h | 5 |
2 files changed, 24 insertions, 13 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 2c0da9239b95..950409dcec3d 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
| @@ -104,15 +104,15 @@ struct net; | |||
| 104 | 104 | ||
| 105 | /** | 105 | /** |
| 106 | * struct sock_common - minimal network layer representation of sockets | 106 | * struct sock_common - minimal network layer representation of sockets |
| 107 | * @skc_node: main hash linkage for various protocol lookup tables | ||
| 108 | * @skc_nulls_node: main hash linkage for UDP/UDP-Lite protocol | ||
| 109 | * @skc_refcnt: reference count | ||
| 110 | * @skc_hash: hash value used with various protocol lookup tables | ||
| 107 | * @skc_family: network address family | 111 | * @skc_family: network address family |
| 108 | * @skc_state: Connection state | 112 | * @skc_state: Connection state |
| 109 | * @skc_reuse: %SO_REUSEADDR setting | 113 | * @skc_reuse: %SO_REUSEADDR setting |
| 110 | * @skc_bound_dev_if: bound device index if != 0 | 114 | * @skc_bound_dev_if: bound device index if != 0 |
| 111 | * @skc_node: main hash linkage for various protocol lookup tables | ||
| 112 | * @skc_nulls_node: main hash linkage for UDP/UDP-Lite protocol | ||
| 113 | * @skc_bind_node: bind hash linkage for various protocol lookup tables | 115 | * @skc_bind_node: bind hash linkage for various protocol lookup tables |
| 114 | * @skc_refcnt: reference count | ||
| 115 | * @skc_hash: hash value used with various protocol lookup tables | ||
| 116 | * @skc_prot: protocol handlers inside a network family | 116 | * @skc_prot: protocol handlers inside a network family |
| 117 | * @skc_net: reference to the network namespace of this socket | 117 | * @skc_net: reference to the network namespace of this socket |
| 118 | * | 118 | * |
| @@ -120,17 +120,21 @@ struct net; | |||
| 120 | * for struct sock and struct inet_timewait_sock. | 120 | * for struct sock and struct inet_timewait_sock. |
| 121 | */ | 121 | */ |
| 122 | struct sock_common { | 122 | struct sock_common { |
| 123 | unsigned short skc_family; | 123 | /* |
| 124 | volatile unsigned char skc_state; | 124 | * first fields are not copied in sock_copy() |
| 125 | unsigned char skc_reuse; | 125 | */ |
| 126 | int skc_bound_dev_if; | ||
| 127 | union { | 126 | union { |
| 128 | struct hlist_node skc_node; | 127 | struct hlist_node skc_node; |
| 129 | struct hlist_nulls_node skc_nulls_node; | 128 | struct hlist_nulls_node skc_nulls_node; |
| 130 | }; | 129 | }; |
| 131 | struct hlist_node skc_bind_node; | ||
| 132 | atomic_t skc_refcnt; | 130 | atomic_t skc_refcnt; |
| 131 | |||
| 133 | unsigned int skc_hash; | 132 | unsigned int skc_hash; |
| 133 | unsigned short skc_family; | ||
| 134 | volatile unsigned char skc_state; | ||
| 135 | unsigned char skc_reuse; | ||
| 136 | int skc_bound_dev_if; | ||
| 137 | struct hlist_node skc_bind_node; | ||
| 134 | struct proto *skc_prot; | 138 | struct proto *skc_prot; |
| 135 | #ifdef CONFIG_NET_NS | 139 | #ifdef CONFIG_NET_NS |
| 136 | struct net *skc_net; | 140 | struct net *skc_net; |
| @@ -208,15 +212,17 @@ struct sock { | |||
| 208 | * don't add nothing before this first member (__sk_common) --acme | 212 | * don't add nothing before this first member (__sk_common) --acme |
| 209 | */ | 213 | */ |
| 210 | struct sock_common __sk_common; | 214 | struct sock_common __sk_common; |
| 215 | #define sk_node __sk_common.skc_node | ||
| 216 | #define sk_nulls_node __sk_common.skc_nulls_node | ||
| 217 | #define sk_refcnt __sk_common.skc_refcnt | ||
| 218 | |||
| 219 | #define sk_copy_start __sk_common.skc_hash | ||
| 220 | #define sk_hash __sk_common.skc_hash | ||
| 211 | #define sk_family __sk_common.skc_family | 221 | #define sk_family __sk_common.skc_family |
| 212 | #define sk_state __sk_common.skc_state | 222 | #define sk_state __sk_common.skc_state |
| 213 | #define sk_reuse __sk_common.skc_reuse | 223 | #define sk_reuse __sk_common.skc_reuse |
| 214 | #define sk_bound_dev_if __sk_common.skc_bound_dev_if | 224 | #define sk_bound_dev_if __sk_common.skc_bound_dev_if |
| 215 | #define sk_node __sk_common.skc_node | ||
| 216 | #define sk_nulls_node __sk_common.skc_nulls_node | ||
| 217 | #define sk_bind_node __sk_common.skc_bind_node | 225 | #define sk_bind_node __sk_common.skc_bind_node |
| 218 | #define sk_refcnt __sk_common.skc_refcnt | ||
| 219 | #define sk_hash __sk_common.skc_hash | ||
| 220 | #define sk_prot __sk_common.skc_prot | 226 | #define sk_prot __sk_common.skc_prot |
| 221 | #define sk_net __sk_common.skc_net | 227 | #define sk_net __sk_common.skc_net |
| 222 | kmemcheck_bitfield_begin(flags); | 228 | kmemcheck_bitfield_begin(flags); |
diff --git a/include/net/tcp.h b/include/net/tcp.h index 19f4150f4d4d..88af84306471 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
| @@ -1425,6 +1425,11 @@ struct tcp_request_sock_ops { | |||
| 1425 | #ifdef CONFIG_TCP_MD5SIG | 1425 | #ifdef CONFIG_TCP_MD5SIG |
| 1426 | struct tcp_md5sig_key *(*md5_lookup) (struct sock *sk, | 1426 | struct tcp_md5sig_key *(*md5_lookup) (struct sock *sk, |
| 1427 | struct request_sock *req); | 1427 | struct request_sock *req); |
| 1428 | int (*calc_md5_hash) (char *location, | ||
| 1429 | struct tcp_md5sig_key *md5, | ||
| 1430 | struct sock *sk, | ||
| 1431 | struct request_sock *req, | ||
| 1432 | struct sk_buff *skb); | ||
| 1428 | #endif | 1433 | #endif |
| 1429 | }; | 1434 | }; |
| 1430 | 1435 | ||
