dont return ENETRESET from SIOCSIFFLAGS, it wont't be handled properly
authordlg <dlg@openbsd.org>
Wed, 7 Feb 2018 06:02:01 +0000 (06:02 +0000)
committerdlg <dlg@openbsd.org>
Wed, 7 Feb 2018 06:02:01 +0000 (06:02 +0000)
sys/net/if_mobileip.c

index 28f8bbb..0eacbeb 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: if_mobileip.c,v 1.2 2018/02/07 05:59:00 dlg Exp $ */
+/*     $OpenBSD: if_mobileip.c,v 1.3 2018/02/07 06:02:01 dlg Exp $ */
 
 /*
  * Copyright (c) 2016 David Gwynne <dlg@openbsd.org>
@@ -357,7 +357,7 @@ mobileip_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
                        if (!ISSET(ifp->if_flags, IFF_RUNNING))
                                error = mobileip_up(sc);
                        else
-                               error = ENETRESET;
+                               error = 0;
                } else {
                        if (ISSET(ifp->if_flags, IFF_RUNNING))
                                error = mobileip_down(sc);