Module Name:    src
Committed By:   mlelstv
Date:           Mon Nov  5 18:37:18 UTC 2018

Modified Files:
        src/sys/dev/ppbus: if_plip.c

Log Message:
When refactoring interface drivers after netbsd-4, the SIOCINITIFADDR
ioctl was passed through ifioctl_common, because the case falls through
to the SIOCSIFFLAGS case. The common handler however doesn't implement
SIOCINITIFADDR, so an attempt to configure plip always failed with ENOTTY.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/ppbus/if_plip.c

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

Modified files:

Index: src/sys/dev/ppbus/if_plip.c
diff -u src/sys/dev/ppbus/if_plip.c:1.31 src/sys/dev/ppbus/if_plip.c:1.32
--- src/sys/dev/ppbus/if_plip.c:1.31	Wed Jul 25 07:55:45 2018
+++ src/sys/dev/ppbus/if_plip.c	Mon Nov  5 18:37:18 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: if_plip.c,v 1.31 2018/07/25 07:55:45 msaitoh Exp $ */
+/* $NetBSD: if_plip.c,v 1.32 2018/11/05 18:37:18 mlelstv Exp $ */
 
 /*-
  * Copyright (c) 1997 Poul-Henning Kamp
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.31 2018/07/25 07:55:45 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_plip.c,v 1.32 2018/11/05 18:37:18 mlelstv Exp $");
 
 /*
  * Parallel port TCP/IP interfaces added.  I looked at the driver from
@@ -375,8 +375,10 @@ lpioctl(struct ifnet *ifp, u_long cmd, v
 		ifp->if_flags |= IFF_UP;
 	/* FALLTHROUGH */
 	case SIOCSIFFLAGS:
-		if ((error = ifioctl_common(ifp, cmd, data)) != 0)
-			break;
+		if (cmd == SIOCSIFFLAGS) {
+			if ((error = ifioctl_common(ifp, cmd, data)) != 0)
+				break;
+		}
 		if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) == IFF_UP) {
 			if ((error = ppbus_request_bus(ppbus, dev, 0, 0)))
 				break;

Reply via email to