Bug 102035 - [plip] plip networking disables parallel port printing
Summary: [plip] plip networking disables parallel port printing
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 6.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-14 22:20 UTC by George Mitchell
Modified: 2017-07-11 13:44 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (654 bytes, patch)
2006-08-14 22:20 UTC, George Mitchell
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description George Mitchell 2006-08-14 22:20:12 UTC
	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.

Fix: This patch disables plip interfaces by default:

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.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2006-08-14 22:39:21 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc

Involves patch to rc.
Comment 2 brooks 2006-08-14 22:41:17 UTC
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
Comment 3 Brooks Davis freebsd_committer freebsd_triage 2006-08-14 22:42:04 UTC
Responsible Changed
From-To: freebsd-rc->freebsd-net

The patch involving the rc system is a red herring.  The actual 
bug is in the plip interface.
Comment 4 George Mitchell 2006-08-15 19:48:19 UTC
Originally submitted patch does not work; please ignore.
-- George
Comment 5 George Mitchell 2006-09-02 18:35:32 UTC
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
Comment 6 George Mitchell 2006-09-02 18:36:22 UTC
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
Comment 7 George Mitchell 2006-09-02 18:38:10 UTC
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=''
Comment 8 George Mitchell 2006-09-03 03:12:18 UTC
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=''