From george@m5p.com  Mon Aug 14 21:17:22 2006
Return-Path: <george@m5p.com>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id A1A2A16A4DF
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 14 Aug 2006 21:17:22 +0000 (UTC)
	(envelope-from george@m5p.com)
Received: from mailhost.m5p.com (209-162-215-52.dq1sn.easystreet.com [209.162.215.52])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 13D9D43D45
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 14 Aug 2006 21:17:21 +0000 (GMT)
	(envelope-from george@m5p.com)
Received: from m5p.com (ssh.m5p.com [IPv6:2001:418:3fd::fb])
	by mailhost.m5p.com (8.13.7/8.13.7) with ESMTP id k7ELHJ37095398
	(version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=OK)
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 14 Aug 2006 14:17:20 -0700 (PDT)
Received: (from george@localhost)
	by m5p.com (8.13.7/8.13.7/Submit) id k7ELHJxd070103;
	Mon, 14 Aug 2006 14:17:19 -0700 (PDT)
Message-Id: <200608142117.k7ELHJxd070103@m5p.com>
Date: Mon, 14 Aug 2006 14:17:19 -0700 (PDT)
From: George Mitchell <george@m5p.com>
Reply-To: George Mitchell <george@m5p.com>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: plip networking disables parallel port printing
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         102035
>Category:       kern
>Synopsis:       [plip] plip networking disables parallel port printing
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 14 21:20:12 GMT 2006
>Closed-Date:    
>Last-Modified:  Sun Sep  3 02:20:22 GMT 2006
>Originator:     George Mitchell
>Release:        FreeBSD 6.1-RELEASE i386
>Organization:
Mitchell Voting Products, Inc.
>Environment:
System: FreeBSD parkstreet.m5p.com 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 7 04:32:43 UTC 2006 root@opus.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:
	If a machine has one or more parallel ports, the generic kernel will
	enable plip networking on them, making it impossible to open the
	port(s) for printing.
	
>How-To-Repeat:
	Boot a generic kernel with an unmodified /etc/rc.conf on it on a
	machine with a parallel port priner on it.  It will be impossible to
	print to the printer because interface plip0 will have grabbed the
	port.
>Fix:
	This patch disables plip interfaces by default:


--- etc/defaults/rc.conf.orig	Wed Mar  8 22:52:39 2006
+++ etc/defaults/rc.conf	Mon Aug 14 14:11:27 2006
@@ -163,6 +163,11 @@
 #ifconfig_fxp0_name="net0"	# Change interface name from fxp0 to net0.
 #ipv4_addrs_fxp0="192.168.0.1/24 192.168.1.1-5/28" # example IPv4 address entry.
 #
+# Bringing plip interfaces up will disable parallel port printing
+ifconfig_plip0="down"	# most users won't want IP over parallel
+ifconfig_plip1="down"
+ifconfig_plip2="down"
+#
 # If you have any sppp(4) interfaces above, you might also want to set
 # the following parameters.  Refer to spppcontrol(8) for their meaning.
 sppp_interfaces=""		# List of sppp interfaces.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Aug 14 21:39:21 UTC 2006 
Responsible-Changed-Why:  
Involves patch to rc. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=102035 
Responsible-Changed-From-To: freebsd-rc->freebsd-net 
Responsible-Changed-By: brooks 
Responsible-Changed-When: Mon Aug 14 21:42:04 UTC 2006 
Responsible-Changed-Why:  
The patch involving the rc system is a red herring.  The actual 
bug is in the plip interface. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=102035 

From: Brooks Davis <brooks@one-eyed-alien.net>
To: George Mitchell <george@m5p.com>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: misc/102035: plip networking disables parallel port printing
Date: Mon, 14 Aug 2006 16:41:17 -0500

 If the included patch works, the plip interface is buggy.  Interfaces
 should not enter the up state unless the administrator causes them to do
 so and thus this patch should have no effect.
 
 -- Brooks

From: George Mitchell <george@m5p.com>
To: bug-followup@FreeBSD.org, george@m5p.com
Cc:  
Subject: Re: kern/102035: [plip] plip networking disables parallel port printing
Date: Tue, 15 Aug 2006 11:48:19 -0700

 Originally submitted patch does not work; please ignore.
 -- George

From: George Mitchell <george@m5p.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/102035: [plip] plip networking disables parallel port printing
Date: Sat, 2 Sep 2006 10:35:32 -0700 (PDT)

 Here is a corrected patch for this problem.  In a default installation
 with IPv6 enabled, there will be attempts by both IPv4 and IPv6 to
 bring up plip[012].  The patch to rc.d/network_ipv6 detects when
 ipv6_ifconfig_plipn is set to NOAUTO.  The patch to defaults/rc.conf
 sets both ifconfig_plip[012] and ipv6_ifconfig_plip[012] to NOAUTO,
 keeping the plip interfaces from being brought UP automatically.
 
 
 
 --- etc/defaults/rc.conf.orig   Sat May  6 21:00:25 2006
 +++ etc/defaults/rc.conf        Sat Sep  2 10:29:53 2006
 @@ -158,6 +158,10 @@
  cloned_interfaces=""           # List of cloned network interfaces to create.
  #cloned_interfaces="gif0 gif1 gif2 gif3" # Pre-cloning GENERIC config.
  ifconfig_lo0="inet 127.0.0.1"  # default loopback device configuration.
 +# Average user does not want to start networking on plip[012].
 +ifconfig_plip0="NOAUTO"
 +ifconfig_plip1="NOAUTO"
 +ifconfig_plip2="NOAUTO"
  #ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry

From: George Mitchell <george@m5p.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/102035: [plip] plip networking disables parallel port printing
Date: Sat, 2 Sep 2006 10:36:22 -0700 (PDT)

 Here is a corrected patch for this problem.  In a default installation
 with IPv6 enabled, there will be attempts by both IPv4 and IPv6 to
 bring up plip[012].  The patch to rc.d/network_ipv6 detects when
 ipv6_ifconfig_plipn is set to NOAUTO.  The patch to defaults/rc.conf
 sets both ifconfig_plip[012] and ipv6_ifconfig_plip[012] to NOAUTO,
 keeping the plip interfaces from being brought UP automatically.
 
 
 
 --- etc/defaults/rc.conf.orig   Sat May  6 21:00:25 2006
 +++ etc/defaults/rc.conf        Sat Sep  2 10:29:53 2006
 @@ -158,6 +158,10 @@
  cloned_interfaces=""           # List of cloned network interfaces to create.
  #cloned_interfaces="gif0 gif1 gif2 gif3" # Pre-cloning GENERIC config.
  ifconfig_lo0="inet 127.0.0.1"  # default loopback device configuration.
 +# Average user does not want to start networking on plip[012].
 +ifconfig_plip0="NOAUTO"
 +ifconfig_plip1="NOAUTO"
 +ifconfig_plip2="NOAUTO"
  #ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry

From: George Mitchell <george@m5p.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/102035: [plip] plip networking disables parallel port printing
Date: Sat, 2 Sep 2006 10:38:10 -0700 (PDT)

 Here is a corrected patch for this problem.  In a default installation
 with IPv6 enabled, there will be attempts by both IPv4 and IPv6 to
 bring up plip[012].  The patch to rc.d/network_ipv6 detects when
 ipv6_ifconfig_plipn is set to NOAUTO.  The patch to defaults/rc.conf
 sets both ifconfig_plip[012] and ipv6_ifconfig_plip[012] to NOAUTO,
 keeping the plip interfaces from being brought UP automatically.
 
 
 
 --- etc/defaults/rc.conf.orig   Sat May  6 21:00:25 2006
 +++ etc/defaults/rc.conf        Sat Sep  2 10:29:53 2006
 @@ -158,6 +158,10 @@
  cloned_interfaces=""           # List of cloned network interfaces to create.
  #cloned_interfaces="gif0 gif1 gif2 gif3" # Pre-cloning GENERIC config.
  ifconfig_lo0="inet 127.0.0.1"  # default loopback device configuration.
 +# Average user does not want to start networking on plip[012].
 +ifconfig_plip0="NOAUTO"
 +ifconfig_plip1="NOAUTO"
 +ifconfig_plip2="NOAUTO"
  #ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry
 .
  #ifconfig_ed0_ipx="ipx 0x00010010"     # Sample IPX address family entry.
  #ifconfig_fxp0_name="net0"     # Change interface name from fxp0 to net0.
 @@ -358,6 +362,10 @@
  #ipv6_prefix_ep0="fec0:0000:0000:0003 fec0:0000:0000:0004"  # Examples for rtr.
  #ipv6_ifconfig_ed0="fec0:0:0:5::1 prefixlen 64"        # Sample manual assign e
 ntry
  #ipv6_ifconfig_ed0_alias0="fec0:0:0:5::2 prefixlen 64" # Sample alias entry.
 +# Average user does not want to start networking on plip[012].
 +ipv6_ifconfig_plip0="NOAUTO"
 +ipv6_ifconfig_plip1="NOAUTO"
 +ipv6_ifconfig_plip2="NOAUTO"
  ipv6_default_interface="NO"    # Default output interface for scoped addrs.
                                 # Now this works only for IPv6 link local
                                 # multicast addrs.
 --- etc/rc.d/network_ipv6.orig  Sat May  6 21:00:26 2006
 +++ etc/rc.d/network_ipv6       Sat Sep  2 10:13:21 2006
 @@ -47,8 +47,19 @@
  
         case ${ipv6_network_interfaces} in
         [Aa][Uu][Tt][Oo])
 -               # Get a list of network interfaces
 -               ipv6_network_interfaces="`ifconfig -l`"
 +               # Get a list of network interfaces, minus the NOAUTO ones
 +               ipv6_network_interfaces=''
 +               _args="`ifconfig -l`"
 +               for i in $_args; do
 +                       eval _arg=\$ipv6_ifconfig_$i
 +                       case $_arg in
 +                       [Nn][Oo][Aa][Uu][Tt][Oo])
 +                               ;;
 +                       *)
 +                               ipv6_network_interfaces="$ipv6_network_interface
 s $i"
 +                               ;;
 +                       esac
 +               done
                 ;;
         [Nn][Oo][Nn][Ee])
                 ipv6_network_interfaces=''

From: George Mitchell <george@m5p.com>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/102035: [plip] plip networking disables parallel port printing
Date: Sat, 2 Sep 2006 19:12:18 -0700 (PDT)

 My apologies for the multiple screwed-up mailings of this patch!  Here is the
 proper patch correctly formatted.
 
 Here is a corrected patch for this problem.  In a default installation
 with IPv6 enabled, there will be attempts by both IPv4 and IPv6 to
 bring up plip[012].  The patch to rc.d/network_ipv6 detects when
 ipv6_ifconfig_plipn is set to NOAUTO.  The patch to defaults/rc.conf
 sets both ifconfig_plip[012] and ipv6_ifconfig_plip[012] to NOAUTO,
 keeping the plip interfaces from being brought UP automatically.
 
 
 --- etc/defaults/rc.conf.orig	Sat May  6 21:00:25 2006
 +++ etc/defaults/rc.conf	Sat Sep  2 10:29:53 2006
 @@ -158,6 +158,10 @@
  cloned_interfaces=""		# List of cloned network interfaces to create.
  #cloned_interfaces="gif0 gif1 gif2 gif3" # Pre-cloning GENERIC config.
  ifconfig_lo0="inet 127.0.0.1"	# default loopback device configuration.
 +# Average user does not want to start networking on plip[012].
 +ifconfig_plip0="NOAUTO"
 +ifconfig_plip1="NOAUTO"
 +ifconfig_plip2="NOAUTO"
  #ifconfig_lo0_alias0="inet 127.0.0.254 netmask 0xffffffff" # Sample alias entry.
  #ifconfig_ed0_ipx="ipx 0x00010010"	# Sample IPX address family entry.
  #ifconfig_fxp0_name="net0"	# Change interface name from fxp0 to net0.
 @@ -358,6 +362,10 @@
  #ipv6_prefix_ep0="fec0:0000:0000:0003 fec0:0000:0000:0004"  # Examples for rtr.
  #ipv6_ifconfig_ed0="fec0:0:0:5::1 prefixlen 64"	# Sample manual assign entry
  #ipv6_ifconfig_ed0_alias0="fec0:0:0:5::2 prefixlen 64" # Sample alias entry.
 +# Average user does not want to start networking on plip[012].
 +ipv6_ifconfig_plip0="NOAUTO"
 +ipv6_ifconfig_plip!="NOAUTO"
 +ipv6_ifconfig_plip2="NOAUTO"
  ipv6_default_interface="NO"	# Default output interface for scoped addrs.
  				# Now this works only for IPv6 link local
  				# multicast addrs.
 --- etc/rc.d/network_ipv6.orig	Sat May  6 21:00:26 2006
 +++ etc/rc.d/network_ipv6	Sat Sep  2 10:13:21 2006
 @@ -47,8 +47,19 @@
  
  	case ${ipv6_network_interfaces} in
  	[Aa][Uu][Tt][Oo])
 -		# Get a list of network interfaces
 -		ipv6_network_interfaces="`ifconfig -l`"
 +		# Get a list of network interfaces, minus the NOAUTO ones
 +		ipv6_network_interfaces=''
 +		_args="`ifconfig -l`"
 +		for i in $_args; do
 +			eval _arg=\$ipv6_ifconfig_$i
 +			case $_arg in
 +			[Nn][Oo][Aa][Uu][Tt][Oo])
 +				;;
 +			*)
 +				ipv6_network_interfaces="$ipv6_network_interfaces $i"
 +				;;
 +			esac
 +		done
  		;;
  	[Nn][Oo][Nn][Ee])
  		ipv6_network_interfaces=''
>Unformatted:
