patch-2.3.41 linux/net/ipv6/ipv6_sockglue.c

Next file: linux/net/ipv6/mcast.c
Previous file: linux/net/ipv6/ip6_fib.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.40/linux/net/ipv6/ipv6_sockglue.c linux/net/ipv6/ipv6_sockglue.c
@@ -7,7 +7,7 @@
  *
  *	Based on linux/net/ipv4/ip_sockglue.c
  *
- *	$Id: ipv6_sockglue.c,v 1.30 2000/01/09 02:19:49 davem Exp $
+ *	$Id: ipv6_sockglue.c,v 1.31 2000/01/16 05:11:38 davem Exp $
  *
  *	This program is free software; you can redistribute it and/or
  *      modify it under the terms of the GNU General Public License
@@ -192,7 +192,9 @@
 				kfree_skb(pktopt);
 
 			sk->destruct = inet_sock_destruct;
+#ifdef INET_REFCNT_DEBUG
 			atomic_dec(&inet6_sock_nr);
+#endif
 			MOD_DEC_USE_COUNT;
 			retv = 0;
 			break;
@@ -271,7 +273,7 @@
 		if (sk->type == SOCK_STREAM) {
 			if (opt) {
 				struct tcp_opt *tp = &sk->tp_pinfo.af_tcp;
-				if ((tcp_connected(sk->state) || sk->state == TCP_SYN_SENT)
+				if (!((1<<sk->state)&(TCPF_LISTEN|TCPF_CLOSE))
 				    && sk->daddr != LOOPBACK4_IPV6) {
 					tp->ext_header_len = opt->opt_flen + opt->opt_nflen;
 					tcp_sync_mss(sk, tp->pmtu_cookie);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)