diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/af_unix.h | 6 | ||||
-rw-r--r-- | include/net/genetlink.h | 20 | ||||
-rw-r--r-- | include/net/ieee80211softmac.h | 1 | ||||
-rw-r--r-- | include/net/ip6_route.h | 12 | ||||
-rw-r--r-- | include/net/ipv6.h | 3 | ||||
-rw-r--r-- | include/net/netdma.h | 4 | ||||
-rw-r--r-- | include/net/netevent.h | 33 | ||||
-rw-r--r-- | include/net/pkt_sched.h | 18 | ||||
-rw-r--r-- | include/net/protocol.h | 2 | ||||
-rw-r--r-- | include/net/scm.h | 29 | ||||
-rw-r--r-- | include/net/sctp/structs.h | 11 | ||||
-rw-r--r-- | include/net/sctp/user.h | 9 | ||||
-rw-r--r-- | include/net/tcp.h | 4 |
13 files changed, 122 insertions, 30 deletions
diff --git a/include/net/af_unix.h b/include/net/af_unix.h index 2fec827c8801..c0398f5a8cb9 100644 --- a/include/net/af_unix.h +++ b/include/net/af_unix.h | |||
@@ -54,15 +54,13 @@ struct unix_skb_parms { | |||
54 | struct ucred creds; /* Skb credentials */ | 54 | struct ucred creds; /* Skb credentials */ |
55 | struct scm_fp_list *fp; /* Passed files */ | 55 | struct scm_fp_list *fp; /* Passed files */ |
56 | #ifdef CONFIG_SECURITY_NETWORK | 56 | #ifdef CONFIG_SECURITY_NETWORK |
57 | char *secdata; /* Security context */ | 57 | u32 secid; /* Security ID */ |
58 | u32 seclen; /* Security length */ | ||
59 | #endif | 58 | #endif |
60 | }; | 59 | }; |
61 | 60 | ||
62 | #define UNIXCB(skb) (*(struct unix_skb_parms*)&((skb)->cb)) | 61 | #define UNIXCB(skb) (*(struct unix_skb_parms*)&((skb)->cb)) |
63 | #define UNIXCREDS(skb) (&UNIXCB((skb)).creds) | 62 | #define UNIXCREDS(skb) (&UNIXCB((skb)).creds) |
64 | #define UNIXSECDATA(skb) (&UNIXCB((skb)).secdata) | 63 | #define UNIXSID(skb) (&UNIXCB((skb)).secid) |
65 | #define UNIXSECLEN(skb) (&UNIXCB((skb)).seclen) | ||
66 | 64 | ||
67 | #define unix_state_rlock(s) spin_lock(&unix_sk(s)->lock) | 65 | #define unix_state_rlock(s) spin_lock(&unix_sk(s)->lock) |
68 | #define unix_state_runlock(s) spin_unlock(&unix_sk(s)->lock) | 66 | #define unix_state_runlock(s) spin_unlock(&unix_sk(s)->lock) |
diff --git a/include/net/genetlink.h b/include/net/genetlink.h index 805de50df00d..8c2287264266 100644 --- a/include/net/genetlink.h +++ b/include/net/genetlink.h | |||
@@ -150,4 +150,24 @@ static inline int genlmsg_unicast(struct sk_buff *skb, u32 pid) | |||
150 | return nlmsg_unicast(genl_sock, skb, pid); | 150 | return nlmsg_unicast(genl_sock, skb, pid); |
151 | } | 151 | } |
152 | 152 | ||
153 | /** | ||
154 | * gennlmsg_data - head of message payload | ||
155 | * @gnlh: genetlink messsage header | ||
156 | */ | ||
157 | static inline void *genlmsg_data(const struct genlmsghdr *gnlh) | ||
158 | { | ||
159 | return ((unsigned char *) gnlh + GENL_HDRLEN); | ||
160 | } | ||
161 | |||
162 | /** | ||
163 | * genlmsg_len - length of message payload | ||
164 | * @gnlh: genetlink message header | ||
165 | */ | ||
166 | static inline int genlmsg_len(const struct genlmsghdr *gnlh) | ||
167 | { | ||
168 | struct nlmsghdr *nlh = (struct nlmsghdr *)((unsigned char *)gnlh - | ||
169 | NLMSG_HDRLEN); | ||
170 | return (nlh->nlmsg_len - GENL_HDRLEN - NLMSG_HDRLEN); | ||
171 | } | ||
172 | |||
153 | #endif /* __NET_GENERIC_NETLINK_H */ | 173 | #endif /* __NET_GENERIC_NETLINK_H */ |
diff --git a/include/net/ieee80211softmac.h b/include/net/ieee80211softmac.h index 7a483ab4022f..00ad810eb883 100644 --- a/include/net/ieee80211softmac.h +++ b/include/net/ieee80211softmac.h | |||
@@ -104,6 +104,7 @@ struct ieee80211softmac_assoc_info { | |||
104 | */ | 104 | */ |
105 | u8 static_essid:1, | 105 | u8 static_essid:1, |
106 | associating:1, | 106 | associating:1, |
107 | assoc_wait:1, | ||
107 | bssvalid:1, | 108 | bssvalid:1, |
108 | bssfixed:1; | 109 | bssfixed:1; |
109 | 110 | ||
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index ab29dafb1a6a..96b0e66406ec 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -139,16 +139,22 @@ extern rwlock_t rt6_lock; | |||
139 | /* | 139 | /* |
140 | * Store a destination cache entry in a socket | 140 | * Store a destination cache entry in a socket |
141 | */ | 141 | */ |
142 | static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst, | 142 | static inline void __ip6_dst_store(struct sock *sk, struct dst_entry *dst, |
143 | struct in6_addr *daddr) | 143 | struct in6_addr *daddr) |
144 | { | 144 | { |
145 | struct ipv6_pinfo *np = inet6_sk(sk); | 145 | struct ipv6_pinfo *np = inet6_sk(sk); |
146 | struct rt6_info *rt = (struct rt6_info *) dst; | 146 | struct rt6_info *rt = (struct rt6_info *) dst; |
147 | 147 | ||
148 | write_lock(&sk->sk_dst_lock); | ||
149 | sk_setup_caps(sk, dst); | 148 | sk_setup_caps(sk, dst); |
150 | np->daddr_cache = daddr; | 149 | np->daddr_cache = daddr; |
151 | np->dst_cookie = rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0; | 150 | np->dst_cookie = rt->rt6i_node ? rt->rt6i_node->fn_sernum : 0; |
151 | } | ||
152 | |||
153 | static inline void ip6_dst_store(struct sock *sk, struct dst_entry *dst, | ||
154 | struct in6_addr *daddr) | ||
155 | { | ||
156 | write_lock(&sk->sk_dst_lock); | ||
157 | __ip6_dst_store(sk, dst, daddr); | ||
152 | write_unlock(&sk->sk_dst_lock); | 158 | write_unlock(&sk->sk_dst_lock); |
153 | } | 159 | } |
154 | 160 | ||
diff --git a/include/net/ipv6.h b/include/net/ipv6.h index a8fdf7970b37..ece7e8a84ffd 100644 --- a/include/net/ipv6.h +++ b/include/net/ipv6.h | |||
@@ -468,6 +468,9 @@ extern void ip6_flush_pending_frames(struct sock *sk); | |||
468 | extern int ip6_dst_lookup(struct sock *sk, | 468 | extern int ip6_dst_lookup(struct sock *sk, |
469 | struct dst_entry **dst, | 469 | struct dst_entry **dst, |
470 | struct flowi *fl); | 470 | struct flowi *fl); |
471 | extern int ip6_sk_dst_lookup(struct sock *sk, | ||
472 | struct dst_entry **dst, | ||
473 | struct flowi *fl); | ||
471 | 474 | ||
472 | /* | 475 | /* |
473 | * skb processing functions | 476 | * skb processing functions |
diff --git a/include/net/netdma.h b/include/net/netdma.h index 19760eb131aa..7f53cd1d8b1e 100644 --- a/include/net/netdma.h +++ b/include/net/netdma.h | |||
@@ -29,7 +29,7 @@ static inline struct dma_chan *get_softnet_dma(void) | |||
29 | { | 29 | { |
30 | struct dma_chan *chan; | 30 | struct dma_chan *chan; |
31 | rcu_read_lock(); | 31 | rcu_read_lock(); |
32 | chan = rcu_dereference(__get_cpu_var(softnet_data.net_dma)); | 32 | chan = rcu_dereference(__get_cpu_var(softnet_data).net_dma); |
33 | if (chan) | 33 | if (chan) |
34 | dma_chan_get(chan); | 34 | dma_chan_get(chan); |
35 | rcu_read_unlock(); | 35 | rcu_read_unlock(); |
@@ -37,7 +37,7 @@ static inline struct dma_chan *get_softnet_dma(void) | |||
37 | } | 37 | } |
38 | 38 | ||
39 | int dma_skb_copy_datagram_iovec(struct dma_chan* chan, | 39 | int dma_skb_copy_datagram_iovec(struct dma_chan* chan, |
40 | const struct sk_buff *skb, int offset, struct iovec *to, | 40 | struct sk_buff *skb, int offset, struct iovec *to, |
41 | size_t len, struct dma_pinned_list *pinned_list); | 41 | size_t len, struct dma_pinned_list *pinned_list); |
42 | 42 | ||
43 | #endif /* CONFIG_NET_DMA */ | 43 | #endif /* CONFIG_NET_DMA */ |
diff --git a/include/net/netevent.h b/include/net/netevent.h new file mode 100644 index 000000000000..e5d216241423 --- /dev/null +++ b/include/net/netevent.h | |||
@@ -0,0 +1,33 @@ | |||
1 | #ifndef _NET_EVENT_H | ||
2 | #define _NET_EVENT_H | ||
3 | |||
4 | /* | ||
5 | * Generic netevent notifiers | ||
6 | * | ||
7 | * Authors: | ||
8 | * Tom Tucker <tom@opengridcomputing.com> | ||
9 | * Steve Wise <swise@opengridcomputing.com> | ||
10 | * | ||
11 | * Changes: | ||
12 | */ | ||
13 | #ifdef __KERNEL__ | ||
14 | |||
15 | #include <net/dst.h> | ||
16 | |||
17 | struct netevent_redirect { | ||
18 | struct dst_entry *old; | ||
19 | struct dst_entry *new; | ||
20 | }; | ||
21 | |||
22 | enum netevent_notif_type { | ||
23 | NETEVENT_NEIGH_UPDATE = 1, /* arg is struct neighbour ptr */ | ||
24 | NETEVENT_PMTU_UPDATE, /* arg is struct dst_entry ptr */ | ||
25 | NETEVENT_REDIRECT, /* arg is struct netevent_redirect ptr */ | ||
26 | }; | ||
27 | |||
28 | extern int register_netevent_notifier(struct notifier_block *nb); | ||
29 | extern int unregister_netevent_notifier(struct notifier_block *nb); | ||
30 | extern int call_netevent_notifiers(unsigned long val, void *v); | ||
31 | |||
32 | #endif | ||
33 | #endif | ||
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 1925c65e617b..f6afee73235d 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h | |||
@@ -169,23 +169,17 @@ psched_tod_diff(int delta_sec, int bound) | |||
169 | 169 | ||
170 | #define PSCHED_TADD2(tv, delta, tv_res) \ | 170 | #define PSCHED_TADD2(tv, delta, tv_res) \ |
171 | ({ \ | 171 | ({ \ |
172 | int __delta = (delta); \ | 172 | int __delta = (tv).tv_usec + (delta); \ |
173 | (tv_res) = (tv); \ | 173 | (tv_res).tv_sec = (tv).tv_sec; \ |
174 | while(__delta >= USEC_PER_SEC){ \ | 174 | while (__delta >= USEC_PER_SEC) { (tv_res).tv_sec++; __delta -= USEC_PER_SEC; } \ |
175 | (tv_res).tv_sec++; \ | ||
176 | __delta -= USEC_PER_SEC; \ | ||
177 | } \ | ||
178 | (tv_res).tv_usec = __delta; \ | 175 | (tv_res).tv_usec = __delta; \ |
179 | }) | 176 | }) |
180 | 177 | ||
181 | #define PSCHED_TADD(tv, delta) \ | 178 | #define PSCHED_TADD(tv, delta) \ |
182 | ({ \ | 179 | ({ \ |
183 | int __delta = (delta); \ | 180 | (tv).tv_usec += (delta); \ |
184 | while(__delta >= USEC_PER_SEC){ \ | 181 | while ((tv).tv_usec >= USEC_PER_SEC) { (tv).tv_sec++; \ |
185 | (tv).tv_sec++; \ | 182 | (tv).tv_usec -= USEC_PER_SEC; } \ |
186 | __delta -= USEC_PER_SEC; \ | ||
187 | } \ | ||
188 | (tv).tv_usec = __delta; \ | ||
189 | }) | 183 | }) |
190 | 184 | ||
191 | /* Set/check that time is in the "past perfect"; | 185 | /* Set/check that time is in the "past perfect"; |
diff --git a/include/net/protocol.h b/include/net/protocol.h index a225d6371cb1..c643bce64e55 100644 --- a/include/net/protocol.h +++ b/include/net/protocol.h | |||
@@ -36,6 +36,7 @@ | |||
36 | struct net_protocol { | 36 | struct net_protocol { |
37 | int (*handler)(struct sk_buff *skb); | 37 | int (*handler)(struct sk_buff *skb); |
38 | void (*err_handler)(struct sk_buff *skb, u32 info); | 38 | void (*err_handler)(struct sk_buff *skb, u32 info); |
39 | int (*gso_send_check)(struct sk_buff *skb); | ||
39 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, | 40 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, |
40 | int features); | 41 | int features); |
41 | int no_policy; | 42 | int no_policy; |
@@ -51,6 +52,7 @@ struct inet6_protocol | |||
51 | int type, int code, int offset, | 52 | int type, int code, int offset, |
52 | __u32 info); | 53 | __u32 info); |
53 | 54 | ||
55 | int (*gso_send_check)(struct sk_buff *skb); | ||
54 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, | 56 | struct sk_buff *(*gso_segment)(struct sk_buff *skb, |
55 | int features); | 57 | int features); |
56 | 58 | ||
diff --git a/include/net/scm.h b/include/net/scm.h index 02daa097cdcd..5637d5e22d5f 100644 --- a/include/net/scm.h +++ b/include/net/scm.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <linux/limits.h> | 4 | #include <linux/limits.h> |
5 | #include <linux/net.h> | 5 | #include <linux/net.h> |
6 | #include <linux/security.h> | ||
6 | 7 | ||
7 | /* Well, we should have at least one descriptor open | 8 | /* Well, we should have at least one descriptor open |
8 | * to accept passed FDs 8) | 9 | * to accept passed FDs 8) |
@@ -20,8 +21,7 @@ struct scm_cookie | |||
20 | struct ucred creds; /* Skb credentials */ | 21 | struct ucred creds; /* Skb credentials */ |
21 | struct scm_fp_list *fp; /* Passed files */ | 22 | struct scm_fp_list *fp; /* Passed files */ |
22 | #ifdef CONFIG_SECURITY_NETWORK | 23 | #ifdef CONFIG_SECURITY_NETWORK |
23 | char *secdata; /* Security context */ | 24 | u32 secid; /* Passed security ID */ |
24 | u32 seclen; /* Security length */ | ||
25 | #endif | 25 | #endif |
26 | unsigned long seq; /* Connection seqno */ | 26 | unsigned long seq; /* Connection seqno */ |
27 | }; | 27 | }; |
@@ -32,6 +32,16 @@ extern int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie | |||
32 | extern void __scm_destroy(struct scm_cookie *scm); | 32 | extern void __scm_destroy(struct scm_cookie *scm); |
33 | extern struct scm_fp_list * scm_fp_dup(struct scm_fp_list *fpl); | 33 | extern struct scm_fp_list * scm_fp_dup(struct scm_fp_list *fpl); |
34 | 34 | ||
35 | #ifdef CONFIG_SECURITY_NETWORK | ||
36 | static __inline__ void unix_get_peersec_dgram(struct socket *sock, struct scm_cookie *scm) | ||
37 | { | ||
38 | security_socket_getpeersec_dgram(sock, NULL, &scm->secid); | ||
39 | } | ||
40 | #else | ||
41 | static __inline__ void unix_get_peersec_dgram(struct socket *sock, struct scm_cookie *scm) | ||
42 | { } | ||
43 | #endif /* CONFIG_SECURITY_NETWORK */ | ||
44 | |||
35 | static __inline__ void scm_destroy(struct scm_cookie *scm) | 45 | static __inline__ void scm_destroy(struct scm_cookie *scm) |
36 | { | 46 | { |
37 | if (scm && scm->fp) | 47 | if (scm && scm->fp) |
@@ -47,6 +57,7 @@ static __inline__ int scm_send(struct socket *sock, struct msghdr *msg, | |||
47 | scm->creds.pid = p->tgid; | 57 | scm->creds.pid = p->tgid; |
48 | scm->fp = NULL; | 58 | scm->fp = NULL; |
49 | scm->seq = 0; | 59 | scm->seq = 0; |
60 | unix_get_peersec_dgram(sock, scm); | ||
50 | if (msg->msg_controllen <= 0) | 61 | if (msg->msg_controllen <= 0) |
51 | return 0; | 62 | return 0; |
52 | return __scm_send(sock, msg, scm); | 63 | return __scm_send(sock, msg, scm); |
@@ -55,8 +66,18 @@ static __inline__ int scm_send(struct socket *sock, struct msghdr *msg, | |||
55 | #ifdef CONFIG_SECURITY_NETWORK | 66 | #ifdef CONFIG_SECURITY_NETWORK |
56 | static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm) | 67 | static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm) |
57 | { | 68 | { |
58 | if (test_bit(SOCK_PASSSEC, &sock->flags) && scm->secdata != NULL) | 69 | char *secdata; |
59 | put_cmsg(msg, SOL_SOCKET, SCM_SECURITY, scm->seclen, scm->secdata); | 70 | u32 seclen; |
71 | int err; | ||
72 | |||
73 | if (test_bit(SOCK_PASSSEC, &sock->flags)) { | ||
74 | err = security_secid_to_secctx(scm->secid, &secdata, &seclen); | ||
75 | |||
76 | if (!err) { | ||
77 | put_cmsg(msg, SOL_SOCKET, SCM_SECURITY, seclen, secdata); | ||
78 | security_release_secctx(secdata, seclen); | ||
79 | } | ||
80 | } | ||
60 | } | 81 | } |
61 | #else | 82 | #else |
62 | static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm) | 83 | static inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm) |
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 5f69158c1006..e5aa7ff1f5b5 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -445,6 +445,7 @@ typedef struct sctp_sender_hb_info { | |||
445 | struct sctp_paramhdr param_hdr; | 445 | struct sctp_paramhdr param_hdr; |
446 | union sctp_addr daddr; | 446 | union sctp_addr daddr; |
447 | unsigned long sent_at; | 447 | unsigned long sent_at; |
448 | __u64 hb_nonce; | ||
448 | } __attribute__((packed)) sctp_sender_hb_info_t; | 449 | } __attribute__((packed)) sctp_sender_hb_info_t; |
449 | 450 | ||
450 | /* | 451 | /* |
@@ -730,13 +731,10 @@ void sctp_init_addrs(struct sctp_chunk *, union sctp_addr *, | |||
730 | const union sctp_addr *sctp_source(const struct sctp_chunk *chunk); | 731 | const union sctp_addr *sctp_source(const struct sctp_chunk *chunk); |
731 | 732 | ||
732 | /* This is a structure for holding either an IPv6 or an IPv4 address. */ | 733 | /* This is a structure for holding either an IPv6 or an IPv4 address. */ |
733 | /* sin_family -- AF_INET or AF_INET6 | ||
734 | * sin_port -- ordinary port number | ||
735 | * sin_addr -- cast to either (struct in_addr) or (struct in6_addr) | ||
736 | */ | ||
737 | struct sctp_sockaddr_entry { | 734 | struct sctp_sockaddr_entry { |
738 | struct list_head list; | 735 | struct list_head list; |
739 | union sctp_addr a; | 736 | union sctp_addr a; |
737 | __u8 use_as_src; | ||
740 | }; | 738 | }; |
741 | 739 | ||
742 | typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *); | 740 | typedef struct sctp_chunk *(sctp_packet_phandler_t)(struct sctp_association *); |
@@ -984,6 +982,9 @@ struct sctp_transport { | |||
984 | */ | 982 | */ |
985 | char cacc_saw_newack; | 983 | char cacc_saw_newack; |
986 | } cacc; | 984 | } cacc; |
985 | |||
986 | /* 64-bit random number sent with heartbeat. */ | ||
987 | __u64 hb_nonce; | ||
987 | }; | 988 | }; |
988 | 989 | ||
989 | struct sctp_transport *sctp_transport_new(const union sctp_addr *, | 990 | struct sctp_transport *sctp_transport_new(const union sctp_addr *, |
@@ -1138,7 +1139,7 @@ int sctp_bind_addr_copy(struct sctp_bind_addr *dest, | |||
1138 | sctp_scope_t scope, gfp_t gfp, | 1139 | sctp_scope_t scope, gfp_t gfp, |
1139 | int flags); | 1140 | int flags); |
1140 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, | 1141 | int sctp_add_bind_addr(struct sctp_bind_addr *, union sctp_addr *, |
1141 | gfp_t gfp); | 1142 | __u8 use_as_src, gfp_t gfp); |
1142 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); | 1143 | int sctp_del_bind_addr(struct sctp_bind_addr *, union sctp_addr *); |
1143 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, | 1144 | int sctp_bind_addr_match(struct sctp_bind_addr *, const union sctp_addr *, |
1144 | struct sctp_sock *); | 1145 | struct sctp_sock *); |
diff --git a/include/net/sctp/user.h b/include/net/sctp/user.h index 8a6bef6f91eb..1b7aae6cdd82 100644 --- a/include/net/sctp/user.h +++ b/include/net/sctp/user.h | |||
@@ -560,9 +560,18 @@ struct sctp_paddrinfo { | |||
560 | } __attribute__((packed, aligned(4))); | 560 | } __attribute__((packed, aligned(4))); |
561 | 561 | ||
562 | /* Peer addresses's state. */ | 562 | /* Peer addresses's state. */ |
563 | /* UNKNOWN: Peer address passed by the upper layer in sendmsg or connect[x] | ||
564 | * calls. | ||
565 | * UNCONFIRMED: Peer address received in INIT/INIT-ACK address parameters. | ||
566 | * Not yet confirmed by a heartbeat and not available for data | ||
567 | * transfers. | ||
568 | * ACTIVE : Peer address confirmed, active and available for data transfers. | ||
569 | * INACTIVE: Peer address inactive and not available for data transfers. | ||
570 | */ | ||
563 | enum sctp_spinfo_state { | 571 | enum sctp_spinfo_state { |
564 | SCTP_INACTIVE, | 572 | SCTP_INACTIVE, |
565 | SCTP_ACTIVE, | 573 | SCTP_ACTIVE, |
574 | SCTP_UNCONFIRMED, | ||
566 | SCTP_UNKNOWN = 0xffff /* Value used for transport state unknown */ | 575 | SCTP_UNKNOWN = 0xffff /* Value used for transport state unknown */ |
567 | }; | 576 | }; |
568 | 577 | ||
diff --git a/include/net/tcp.h b/include/net/tcp.h index 3cd803b0d7a5..7a093d0aa0fe 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -914,6 +914,9 @@ static inline void tcp_set_state(struct sock *sk, int state) | |||
914 | 914 | ||
915 | static inline void tcp_done(struct sock *sk) | 915 | static inline void tcp_done(struct sock *sk) |
916 | { | 916 | { |
917 | if(sk->sk_state == TCP_SYN_SENT || sk->sk_state == TCP_SYN_RECV) | ||
918 | TCP_INC_STATS_BH(TCP_MIB_ATTEMPTFAILS); | ||
919 | |||
917 | tcp_set_state(sk, TCP_CLOSE); | 920 | tcp_set_state(sk, TCP_CLOSE); |
918 | tcp_clear_xmit_timers(sk); | 921 | tcp_clear_xmit_timers(sk); |
919 | 922 | ||
@@ -1086,6 +1089,7 @@ extern struct request_sock_ops tcp_request_sock_ops; | |||
1086 | 1089 | ||
1087 | extern int tcp_v4_destroy_sock(struct sock *sk); | 1090 | extern int tcp_v4_destroy_sock(struct sock *sk); |
1088 | 1091 | ||
1092 | extern int tcp_v4_gso_send_check(struct sk_buff *skb); | ||
1089 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features); | 1093 | extern struct sk_buff *tcp_tso_segment(struct sk_buff *skb, int features); |
1090 | 1094 | ||
1091 | #ifdef CONFIG_PROC_FS | 1095 | #ifdef CONFIG_PROC_FS |