Skip to contentSkip to conversation

ipv6: Add missing ipv6 control socket

PATCH New Arnaldo Carvalho de Melo 1 participant 1 message Feb 25, 2006 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 3/3 ipv6: Add missing ipv6 control socket

I guess I forgot to add it, nah, now it just works:

18:04:33.274066 IP6 ::1.1476 > ::1.5001: request (service=0) 18:04:33.334482 IP6 ::1.5001 > ::1.1476: reset (codeºd_service_code)

Ditched IP_DCCP_UNLOAD_HACK, as now we would have to do it for both IPv6 and IPv4, so I'll come up with another way for freeing the control sockets in upcoming changesets.

---

 net/dccp/Kconfig       |    9 -------
 net/dccp/ccids/ccid3.c |    9 -------
 net/dccp/dccp.h        |    4 +--
 net/dccp/ipv4.c        |   65 +++++++++++++++++++++---------------------------
 net/dccp/ipv6.c        |   44 ++++++++++++++++++++++++++++++--
 net/dccp/proto.c       |    6 +---
 6 files changed, 72 insertions(+), 65 deletions(-)

3e8d786e99c8e5abd88177763e7121341bb05d05

net/dccp/Kconfig +0 -9
index 24a6981..7e096ba 100644
@@ -40,15 +40,6 @@ config IP_DCCP_DEBUG
 
 	  Just say N.
 
-config IP_DCCP_UNLOAD_HACK
-	depends on IP_DCCP=m && IP_DCCP_CCID3=m
-	bool "DCCP control sock unload hack"
-	---help---
-	  Enable this to be able to unload the dccp module when the it
-	  has only one refcount held, the control sock one. Just execute
-	  "rmmod dccp_ccid3 dccp"
-
-	  Just say N.
 endmenu
 
 endmenu
net/dccp/ccids/ccid3.c +0 -9
index 47660ca..2b82f96 100644
@@ -1207,15 +1207,6 @@ module_init(ccid3_module_init);
 
 static __exit void ccid3_module_exit(void)
 {
-#ifdef CONFIG_IP_DCCP_UNLOAD_HACK
-	/*
-	 * Hack to use while developing, so that we get rid of the control
-	 * sock, that is what keeps a refcount on dccp.ko -acme
-	 */
-	extern void dccp_ctl_sock_exit(void);
-
-	dccp_ctl_sock_exit();
-#endif
 	ccid_unregister(&ccid3);
 
 	if (ccid3_tx_hist != NULL) {
net/dccp/dccp.h +1 -3
index 6fcc9d4..d57d213 100644
@@ -177,7 +177,7 @@ extern int dccp_rcv_state_process(struct
 extern int dccp_rcv_established(struct sock *sk, struct sk_buff *skb,
 				const struct dccp_hdr *dh, const unsigned len);
 
-extern int dccp_init_sock(struct sock *sk);
+extern int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized);
 extern int dccp_destroy_sock(struct sock *sk);
 
 extern void		dccp_close(struct sock *sk, long timeout);
@@ -337,8 +337,6 @@ extern void dccp_insert_option(struct so
 			       unsigned char option,
 			       const void *value, unsigned char len);
 
-extern struct socket *dccp_ctl_socket;
-
 extern void dccp_timestamp(const struct sock *sk, struct timeval *tv);
 
 static inline suseconds_t timeval_usecs(const struct timeval *tv)
net/dccp/ipv4.c +28 -36

127 lines not on this page · raw message

net/dccp/ipv6.c +39 -4

83 lines not on this page · raw message

net/dccp/proto.c +2 -4
index c735433..9e97ce6 100644
@@ -163,11 +163,10 @@ void dccp_unhash(struct sock *sk)
 
 EXPORT_SYMBOL_GPL(dccp_unhash);
 
-int dccp_init_sock(struct sock *sk)
+int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized)
 {
 	struct dccp_sock *dp = dccp_sk(sk);
 	struct inet_connection_sock *icsk = inet_csk(sk);
-	static int dccp_ctl_socket_init = 1;
 
 	dccp_options_init(&dp->dccps_options);
 	do_gettimeofday(&dp->dccps_epoch);
@@ -179,7 +178,7 @@ int dccp_init_sock(struct sock *sk)
 	 * lets leave it here, later the real solution is to do this in a
 	 * setsockopt(CCIDs-I-want/accept). -acme
 	 */
-	if (likely(!dccp_ctl_socket_init)) {
+	if (likely(ctl_sock_initialized)) {
 		int rc = dccp_feat_init(sk);
 
 		if (rc)
@@ -211,7 +210,6 @@ int dccp_init_sock(struct sock *sk)
 		/* control socket doesn't need feat nego */
 		INIT_LIST_HEAD(&dp->dccps_options.dccpo_pending);
 		INIT_LIST_HEAD(&dp->dccps_options.dccpo_conf);
-		dccp_ctl_socket_init = 0;
 	}	
 
 	dccp_init_xmit_timers(sk);
Signature · 1 line
1.2.2.gd27d