NetBSD Problem Report #46602

From yamt@NetBSD.org  Fri Jun 15 07:23:03 2012
Return-Path: <yamt@NetBSD.org>
Received: by www.NetBSD.org (Postfix, from userid 1270)
	id 3FBA063B882; Fri, 15 Jun 2012 07:23:03 +0000 (UTC)
Message-Id: <20120615072303.3FBA063B882@www.NetBSD.org>
Date: Fri, 15 Jun 2012 07:23:03 +0000 (UTC)
From: yamt@NetBSD.org
Reply-To: yamt@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: rfc6056 sysctl names are odd
X-Send-Pr-Version: 3.95

>Number:         46602
>Category:       kern
>Synopsis:       rfc6056 sysctl names are odd
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Jun 15 07:25:00 +0000 2012
>Last-Modified:  Mon Jun 25 13:30:03 +0000 2012
>Originator:     YAMAMOTO Takashi
>Release:        NetBSD current
>Organization:

>Environment:

>Description:

	-current has the following sysctl mibs.

		net.inet.udp.rfc6056.available
		net.inet.udp.rfc6056.selected
		net.inet6.udp6.rfc6056.available
		net.inet6.udp6.rfc6056.selected

	they seems odd because

		1. they are not udp-specific and inconsist with
		   a precedent (net.inet.ip.anonportmin)

		2. using the rfc number as a sysctl name is not appropriate.
		   eg. what happens if we add another algorithm?
		   something like "portselect" is a better name.

	UDP_RFC6056ALGO socket option has the same problems.

>How-To-Repeat:
	man rfc6056
>Fix:
	rename them before a release.

>Audit-Trail:
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc: 
Subject: Re: kern/46602: rfc6056 sysctl names are odd
Date: Fri, 15 Jun 2012 10:39:55 -0400

 On Jun 15,  7:25am, yamt@NetBSD.org (yamt@NetBSD.org) wrote:
 -- Subject: kern/46602: rfc6056 sysctl names are odd

 | 	-current has the following sysctl mibs.
 | 
 | 		net.inet.udp.rfc6056.available
 | 		net.inet.udp.rfc6056.selected
 | 		net.inet6.udp6.rfc6056.available
 | 		net.inet6.udp6.rfc6056.selected
 | 
 | 	they seems odd because
 | 
 | 		1. they are not udp-specific and inconsist with
 | 		   a precedent (net.inet.ip.anonportmin)
 | 
 | 		2. using the rfc number as a sysctl name is not appropriate.
 | 		   eg. what happens if we add another algorithm?
 | 		   something like "portselect" is a better name.
 | 
 | 	UDP_RFC6056ALGO socket option has the same problems.

 Please suggest new names and I'll change them.

 christos

From: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi)
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org, yamt@NetBSD.org
Subject: Re: kern/46602: rfc6056 sysctl names are odd
Date: Mon, 18 Jun 2012 05:34:48 +0000 (UTC)

 > The following reply was made to PR kern/46602; it has been noted by GNATS.
 > 
 > From: christos@zoulas.com (Christos Zoulas)
 > To: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org, 
 > 	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
 > Cc: 
 > Subject: Re: kern/46602: rfc6056 sysctl names are odd
 > Date: Fri, 15 Jun 2012 10:39:55 -0400
 > 
 >  On Jun 15,  7:25am, yamt@NetBSD.org (yamt@NetBSD.org) wrote:
 >  -- Subject: kern/46602: rfc6056 sysctl names are odd
 >  
 >  | 	-current has the following sysctl mibs.
 >  | 
 >  | 		net.inet.udp.rfc6056.available
 >  | 		net.inet.udp.rfc6056.selected
 >  | 		net.inet6.udp6.rfc6056.available
 >  | 		net.inet6.udp6.rfc6056.selected
 >  | 
 >  | 	they seems odd because
 >  | 
 >  | 		1. they are not udp-specific and inconsist with
 >  | 		   a precedent (net.inet.ip.anonportmin)
 >  | 
 >  | 		2. using the rfc number as a sysctl name is not appropriate.
 >  | 		   eg. what happens if we add another algorithm?
 >  | 		   something like "portselect" is a better name.
 >  | 
 >  | 	UDP_RFC6056ALGO socket option has the same problems.
 >  
 >  Please suggest new names and I'll change them.
 >  
 >  christos

 how about:
 	net.inet.ip.anonportsel.available
 	net.inet.ip.anonportsel.selected
 	net.inet6.ip6.anonportsel.available
 	net.inet6.ip6.anonportsel.selected

 	IP_PORTSEL (IPPROTO_IP-level sockopt, along IP_PORTRANGE)

 YAMAMOTOTakashi

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, yamt@NetBSD.org
Cc: 
Subject: Re: kern/46602: rfc6056 sysctl names are odd
Date: Mon, 18 Jun 2012 07:51:46 -0400

 On Jun 18,  5:35am, yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote:
 -- Subject: Re: kern/46602: rfc6056 sysctl names are odd

 |  how about:
 |  	net.inet.ip.anonportsel.available
 |  	net.inet.ip.anonportsel.selected
 |  	net.inet6.ip6.anonportsel.available
 |  	net.inet6.ip6.anonportsel.selected
 |  
 |  	IP_PORTSEL (IPPROTO_IP-level sockopt, along IP_PORTRANGE)

 Sounds good to me.

 christos

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, yamt@NetBSD.org
Cc: 
Subject: Re: kern/46602: rfc6056 sysctl names are odd
Date: Wed, 20 Jun 2012 15:20:57 -0400

 On Jun 18, 11:55am, christos@zoulas.com (Christos Zoulas) wrote:
 -- Subject: Re: kern/46602: rfc6056 sysctl names are odd

 Check out http://www.netbsd.org/~christos/rfc6056.diff.
 I'll commit once I hear that it is ok.

 christos

From: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi)
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org, yamt@NetBSD.org
Subject: Re: kern/46602: rfc6056 sysctl names are odd
Date: Fri, 22 Jun 2012 04:21:50 +0000 (UTC)

 hi,

 >  Check out http://www.netbsd.org/~christos/rfc6056.diff.
 >  I'll commit once I hear that it is ok.

 i'd like to see user visible names (rfc6056.h and its RFC6056_* constants)
 renamed as well.

 otherwise looks fine to me.  thanks!

 YAMAMOTO Takashi

 >  
 >  christos

From: christos@zoulas.com (Christos Zoulas)
To: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi), gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, 
	netbsd-bugs@netbsd.org, yamt@NetBSD.org
Subject: Re: kern/46602: rfc6056 sysctl names are odd
Date: Fri, 22 Jun 2012 08:56:41 -0400

 On Jun 22,  4:21am, yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote:
 -- Subject: Re: kern/46602: rfc6056 sysctl names are odd

 | hi,
 | 
 | >  Check out http://www.netbsd.org/~christos/rfc6056.diff.
 | >  I'll commit once I hear that it is ok.
 | 
 | i'd like to see user visible names (rfc6056.h and its RFC6056_* constants)
 | renamed as well.
 | 
 | otherwise looks fine to me.  thanks!

 Just to be clear: You would like me to rename the header file name and the
 constants in it, or just the constants? Please suggest names.

 christos

From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46602 CVS commit: src
Date: Fri, 22 Jun 2012 10:54:36 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Fri Jun 22 14:54:36 UTC 2012

 Modified Files:
 	src/share/man/man4: ip.4 ip6.4 udp.4
 	src/share/man/man7: rfc6056.7 sysctl.7
 	src/sys/netinet: in.h ip_input.c ip_output.c rfc6056.h tcp_input.c
 	    udp.h udp_usrreq.c udp_var.h
 	src/sys/netinet6: in6.h ip6_input.c ip6_output.c udp6_usrreq.c
 	    udp6_var.h
 	src/tests/net/sys: t_rfc6056.c

 Log Message:
 PR/46602: Move the rfc6056 port randomization to the IP layer.


 To generate a diff of this commit:
 cvs rdiff -u -r1.31 -r1.32 src/share/man/man4/ip.4
 cvs rdiff -u -r1.28 -r1.29 src/share/man/man4/ip6.4
 cvs rdiff -u -r1.12 -r1.13 src/share/man/man4/udp.4
 cvs rdiff -u -r1.2 -r1.3 src/share/man/man7/rfc6056.7
 cvs rdiff -u -r1.71 -r1.72 src/share/man/man7/sysctl.7
 cvs rdiff -u -r1.86 -r1.87 src/sys/netinet/in.h
 cvs rdiff -u -r1.300 -r1.301 src/sys/netinet/ip_input.c
 cvs rdiff -u -r1.215 -r1.216 src/sys/netinet/ip_output.c
 cvs rdiff -u -r1.2 -r1.3 src/sys/netinet/rfc6056.h
 cvs rdiff -u -r1.323 -r1.324 src/sys/netinet/tcp_input.c
 cvs rdiff -u -r1.15 -r1.16 src/sys/netinet/udp.h
 cvs rdiff -u -r1.186 -r1.187 src/sys/netinet/udp_usrreq.c
 cvs rdiff -u -r1.37 -r1.38 src/sys/netinet/udp_var.h
 cvs rdiff -u -r1.69 -r1.70 src/sys/netinet6/in6.h
 cvs rdiff -u -r1.137 -r1.138 src/sys/netinet6/ip6_input.c
 cvs rdiff -u -r1.147 -r1.148 src/sys/netinet6/ip6_output.c
 cvs rdiff -u -r1.90 -r1.91 src/sys/netinet6/udp6_usrreq.c
 cvs rdiff -u -r1.24 -r1.25 src/sys/netinet6/udp6_var.h
 cvs rdiff -u -r1.2 -r1.3 src/tests/net/sys/t_rfc6056.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi)
To: gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
	netbsd-bugs@netbsd.org, yamt@NetBSD.org
Subject: Re: kern/46602: rfc6056 sysctl names are odd
Date: Mon, 25 Jun 2012 07:59:08 +0000 (UTC)

 > The following reply was made to PR kern/46602; it has been noted by GNATS.
 > 
 > From: christos@zoulas.com (Christos Zoulas)
 > To: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi), gnats-bugs@NetBSD.org
 > Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, 
 > 	netbsd-bugs@netbsd.org, yamt@NetBSD.org
 > Subject: Re: kern/46602: rfc6056 sysctl names are odd
 > Date: Fri, 22 Jun 2012 08:56:41 -0400
 > 
 >  On Jun 22,  4:21am, yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote:
 >  -- Subject: Re: kern/46602: rfc6056 sysctl names are odd
 >  
 >  | hi,
 >  | 
 >  | >  Check out http://www.netbsd.org/~christos/rfc6056.diff.
 >  | >  I'll commit once I hear that it is ok.
 >  | 
 >  | i'd like to see user visible names (rfc6056.h and its RFC6056_* constants)
 >  | renamed as well.
 >  | 
 >  | otherwise looks fine to me.  thanks!
 >  
 >  Just to be clear: You would like me to rename the header file name and the
 >  constants in it, or just the constants? Please suggest names.

 both.

 how about:
 	netinet/portalgo.h
 	PORTALGO_BSD and such

 YAMAMOTO Takashi

 >  
 >  christos

From: christos@zoulas.com (Christos Zoulas)
To: yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi), gnats-bugs@NetBSD.org
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org, 
	netbsd-bugs@netbsd.org, yamt@NetBSD.org
Subject: Re: kern/46602: rfc6056 sysctl names are odd
Date: Mon, 25 Jun 2012 09:26:03 -0400

 On Jun 25,  7:59am, yamt@mwd.biglobe.ne.jp (YAMAMOTO Takashi) wrote:
 -- Subject: Re: kern/46602: rfc6056 sysctl names are odd

 | >  Just to be clear: You would like me to rename the header file name and the
 | >  constants in it, or just the constants? Please suggest names.
 | 
 | both.
 | 
 | how about:
 | 	netinet/portalgo.h
 | 	PORTALGO_BSD and such

 Ok, will do.

 christos

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.