Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Aug 2007 22:21:46 GMT
From:      Matus Harvan <mharvan@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 125122 for review
Message-ID:  <200708132221.l7DMLk3t018039@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=125122

Change 125122 by mharvan@mharvan_bike-planet on 2007/08/13 22:20:46

	return EBUSY if trying to set TCP_CATCHALL on multiple sockets
	silently succeed if disabling TCP_CATCHALL on a socket where it
	  	was not enabled

Affected files ...

.. //depot/projects/soc2007/mharvan-mtund/sys.patches/catchall_tcp_udp/catchall.sys.patch#3 edit

Differences ...

==== //depot/projects/soc2007/mharvan-mtund/sys.patches/catchall_tcp_udp/catchall.sys.patch#3 (text+ko) ====

@@ -4,7 +4,7 @@
 retrieving revision 1.90.2.5
 diff -u -r1.90.2.5 in.h
 --- in.h	14 Feb 2007 13:39:01 -0000	1.90.2.5
-+++ in.h	11 Aug 2007 17:43:22 -0000
++++ in.h	13 Aug 2007 22:17:19 -0000
 @@ -429,6 +429,11 @@
  #define	IP_MINTTL		66   /* minimum TTL for packet or drop */
  #define	IP_DONTFRAG		67   /* don't fragment packet */
@@ -23,7 +23,7 @@
 retrieving revision 1.31.2.2
 diff -u -r1.31.2.2 tcp.h
 --- tcp.h	5 Mar 2007 10:21:52 -0000	1.31.2.2
-+++ tcp.h	11 Aug 2007 17:43:23 -0000
++++ tcp.h	13 Aug 2007 22:17:20 -0000
 @@ -160,6 +160,7 @@
  #define TCP_NOOPT	0x08	/* don't use TCP options */
  #define TCP_MD5SIG	0x10	/* use MD5 digests (RFC2385) */
@@ -38,7 +38,7 @@
 retrieving revision 1.281.2.13
 diff -u -r1.281.2.13 tcp_input.c
 --- tcp_input.c	12 Jun 2007 18:53:32 -0000	1.281.2.13
-+++ tcp_input.c	11 Aug 2007 17:43:25 -0000
++++ tcp_input.c	13 Aug 2007 22:17:24 -0000
 @@ -159,10 +159,16 @@
  	   &tcp_reass_overflows, 0,
  	   "Global number of TCP Segment Reassembly Queue Overflows");
@@ -107,7 +107,7 @@
 retrieving revision 1.228.2.14
 diff -u -r1.228.2.14 tcp_subr.c
 --- tcp_subr.c	30 Dec 2006 17:58:46 -0000	1.228.2.14
-+++ tcp_subr.c	11 Aug 2007 17:43:28 -0000
++++ tcp_subr.c	13 Aug 2007 22:17:26 -0000
 @@ -324,6 +324,10 @@
  	tcp_rexmit_slop = TCPTV_CPU_VAR;
  	tcp_inflight_rttthresh = TCPTV_INFLIGHT_RTTTHRESH;
@@ -125,7 +125,7 @@
 retrieving revision 1.124.2.6
 diff -u -r1.124.2.6 tcp_usrreq.c
 --- tcp_usrreq.c	8 Jan 2007 18:10:12 -0000	1.124.2.6
-+++ tcp_usrreq.c	11 Aug 2007 17:43:29 -0000
++++ tcp_usrreq.c	13 Aug 2007 22:17:27 -0000
 @@ -162,6 +162,12 @@
  		INP_INFO_WUNLOCK(&tcbinfo);
  		return error;
@@ -139,7 +139,7 @@
  	INP_LOCK(inp);
  	tp = intotcpcb(inp);
  	TCPDEBUG1();
-@@ -1112,6 +1118,37 @@
+@@ -1112,6 +1118,36 @@
  			error = EINVAL;
  			break;
  
@@ -159,7 +159,7 @@
 +				} else {
 +					printf("TCP_CATCHALL already enabled, "
 +					    "ignoring setsockopt()\n");
-+					error = EINVAL;
++					error = EBUSY;
 +				}
 +			} else {/* disable CATCHALL */
 +				printf("request to disable TCP_CATCHALL\n");
@@ -169,7 +169,6 @@
 +				} else {
 +					printf("TCP_CATCHALL already disabled"
 +					       ", ignoring setsockopt()\n");
-+					error = EINVAL;
 +				}
 +			}
 +			break;
@@ -177,7 +176,7 @@
  		default:
  			error = ENOPROTOOPT;
  			break;
-@@ -1145,6 +1182,13 @@
+@@ -1145,6 +1181,13 @@
  		case TCP_INFO:
  			tcp_fill_info(tp, &ti);
  			error = sooptcopyout(sopt, &ti, sizeof ti);
@@ -197,7 +196,7 @@
 retrieving revision 1.126.2.3
 diff -u -r1.126.2.3 tcp_var.h
 --- tcp_var.h	19 Sep 2006 12:58:40 -0000	1.126.2.3
-+++ tcp_var.h	11 Aug 2007 17:43:30 -0000
++++ tcp_var.h	13 Aug 2007 22:17:29 -0000
 @@ -504,6 +504,7 @@
  
  extern	struct inpcbhead tcb;		/* head of queue of active tcpcb's */
@@ -212,7 +211,7 @@
 retrieving revision 1.175.2.11
 diff -u -r1.175.2.11 udp_usrreq.c
 --- udp_usrreq.c	10 Jun 2007 07:28:29 -0000	1.175.2.11
-+++ udp_usrreq.c	11 Aug 2007 17:43:30 -0000
++++ udp_usrreq.c	13 Aug 2007 22:17:29 -0000
 @@ -110,6 +110,15 @@
  SYSCTL_INT(_net_inet_udp, OID_AUTO, strict_mcast_mship, CTLFLAG_RW,
  	&strict_mcast_mship, 0, "Only send multicast to member sockets");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708132221.l7DMLk3t018039>