Bluetooth: Fix race condition on l2cap_ertm_send()
[safe/jmp/linux-2.6] / include / net / inet_sock.h
index 47004f3..1653de5 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/string.h>
 #include <linux/types.h>
 #include <linux/jhash.h>
+#include <linux/netdevice.h>
 
 #include <net/flow.h>
 #include <net/sock.h>
@@ -93,14 +94,14 @@ struct rtable;
  *
  * @sk - ancestor class
  * @pinet6 - pointer to IPv6 control block
- * @daddr - Foreign IPv4 addr
- * @rcv_saddr - Bound local IPv4 addr
- * @dport - Destination port
- * @num - Local port
- * @saddr - Sending source
+ * @inet_daddr - Foreign IPv4 addr
+ * @inet_rcv_saddr - Bound local IPv4 addr
+ * @inet_dport - Destination port
+ * @inet_num - Local port
+ * @inet_saddr - Sending source
  * @uc_ttl - Unicast TTL
- * @sport - Source port
- * @id - ID counter for DF pkts
+ * @inet_sport - Source port
+ * @inet_id - ID counter for DF pkts
  * @tos - TOS
  * @mc_ttl - Multicasting TTL
  * @is_icsk - is this an inet_connection_sock?
@@ -115,17 +116,19 @@ struct inet_sock {
        struct ipv6_pinfo       *pinet6;
 #endif
        /* Socket demultiplex comparisons on incoming packets. */
-       __be32                  daddr;
-       __be32                  rcv_saddr;
-       __be16                  dport;
-       __u16                   num;
-       __be32                  saddr;
+       __be32                  inet_daddr;
+       __be32                  inet_rcv_saddr;
+       __be16                  inet_dport;
+       __u16                   inet_num;
+       __be32                  inet_saddr;
        __s16                   uc_ttl;
        __u16                   cmsg_flags;
+       __be16                  inet_sport;
+       __u16                   inet_id;
+
        struct ip_options       *opt;
-       __be16                  sport;
-       __u16                   id;
        __u8                    tos;
+       __u8                    min_ttl;
        __u8                    mc_ttl;
        __u8                    pmtudisc;
        __u8                    recverr:1,
@@ -190,10 +193,10 @@ static inline unsigned int inet_ehashfn(struct net *net,
 static inline int inet_sk_ehashfn(const struct sock *sk)
 {
        const struct inet_sock *inet = inet_sk(sk);
-       const __be32 laddr = inet->rcv_saddr;
-       const __u16 lport = inet->num;
-       const __be32 faddr = inet->daddr;
-       const __be16 fport = inet->dport;
+       const __be32 laddr = inet->inet_rcv_saddr;
+       const __u16 lport = inet->inet_num;
+       const __be32 faddr = inet->inet_daddr;
+       const __be16 fport = inet->inet_dport;
        struct net *net = sock_net(sk);
 
        return inet_ehashfn(net, laddr, lport, faddr, fport);