Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/hyperv hvn(4): fix unable to ifconfig up/down.



details:   https://anonhg.NetBSD.org/src/rev/332609a948d5
branches:  trunk
changeset: 957785:332609a948d5
user:      nonaka <nonaka%NetBSD.org@localhost>
date:      Fri Dec 11 08:13:08 2020 +0000

description:
hvn(4): fix unable to ifconfig up/down.

diffstat:

 sys/dev/hyperv/if_hvn.c |  25 +++----------------------
 1 files changed, 3 insertions(+), 22 deletions(-)

diffs (46 lines):

diff -r b638a97c5618 -r 332609a948d5 sys/dev/hyperv/if_hvn.c
--- a/sys/dev/hyperv/if_hvn.c   Fri Dec 11 07:49:39 2020 +0000
+++ b/sys/dev/hyperv/if_hvn.c   Fri Dec 11 08:13:08 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_hvn.c,v 1.18 2020/05/24 10:31:59 nonaka Exp $       */
+/*     $NetBSD: if_hvn.c,v 1.19 2020/12/11 08:13:08 nonaka Exp $       */
 /*     $OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $       */
 
 /*-
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.18 2020/05/24 10:31:59 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.19 2020/12/11 08:13:08 nonaka Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -387,26 +387,7 @@
 
        s = splnet();
 
-       switch (command) {
-       case SIOCSIFFLAGS:
-               if (ifp->if_flags & IFF_UP) {
-                       if (ifp->if_flags & IFF_RUNNING)
-                               error = ENETRESET;
-                       else {
-                               error = hvn_init(ifp);
-                               if (error)
-                                       ifp->if_flags &= ~IFF_UP;
-                       }
-               } else {
-                       if (ifp->if_flags & IFF_RUNNING)
-                               hvn_stop(ifp, 1);
-               }
-               break;
-       default:
-               error = ether_ioctl(ifp, command, data);
-               break;
-       }
-
+       error = ether_ioctl(ifp, command, data);
        if (error == ENETRESET) {
                if (ifp->if_flags & IFF_RUNNING)
                        hvn_iff(sc);



Home | Main Index | Thread Index | Old Index