add support for handling the interface monitor flag
authordlg <dlg@openbsd.org>
Sat, 20 Feb 2021 01:17:45 +0000 (01:17 +0000)
committerdlg <dlg@openbsd.org>
Sat, 20 Feb 2021 01:17:45 +0000 (01:17 +0000)
ok benno@

sbin/ifconfig/ifconfig.c

index 9937e44..94697aa 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ifconfig.c,v 1.433 2021/02/10 14:45:27 bluhm Exp $    */
+/*     $OpenBSD: ifconfig.c,v 1.434 2021/02/20 01:17:45 dlg Exp $      */
 /*     $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $      */
 
 /*
@@ -468,6 +468,8 @@ const struct        cmd {
        { "-autoconfprivacy",   IFXF_INET6_NOPRIVACY,   0,      setifxflags },
        { "soii",       -IFXF_INET6_NOSOII,     0,      setifxflags },
        { "-soii",      IFXF_INET6_NOSOII,      0,      setifxflags },
+       { "monitor",    IFXF_MONITOR,   0,              setifxflags },
+       { "-monitor",   -IFXF_MONITOR,  0,              setifxflags },
 #ifndef SMALL
        { "hwfeatures", NEXTARG0,       0,              printifhwfeatures },
        { "metric",     NEXTARG,        0,              setifmetric },
@@ -675,7 +677,7 @@ const struct        cmd {
        "\7RUNNING\10NOARP\11PROMISC\12ALLMULTI\13OACTIVE\14SIMPLEX"    \
        "\15LINK0\16LINK1\17LINK2\20MULTICAST"                          \
        "\23INET6_NOPRIVACY\24MPLS\25WOL\26AUTOCONF6\27INET6_NOSOII"    \
-       "\30AUTOCONF4"
+       "\30AUTOCONF4" "\31MONITOR"
 
 int    getinfo(struct ifreq *, int);
 void   getsock(int);