-.\" $OpenBSD: ifconfig.8,v 1.303 2018/02/20 07:34:28 jmc Exp $
+.\" $OpenBSD: ifconfig.8,v 1.304 2018/02/23 05:17:39 akoshibe Exp $
.\" $NetBSD: ifconfig.8,v 1.11 1996/01/04 21:27:29 pk Exp $
.\" $FreeBSD: ifconfig.8,v 1.16 1998/02/01 07:03:29 steve Exp $
.\"
.\"
.\" @(#)ifconfig.8 8.4 (Berkeley) 6/1/94
.\"
-.Dd $Mdocdate: February 20 2018 $
+.Dd $Mdocdate: February 23 2018 $
.Dt IFCONFIG 8
.Os
.Sh NAME
If the specified rdomain does not yet exist it will be created, including
a routing table with the same id.
By default all interfaces belong to routing domain 0.
+.It Cm -rdomain
+Remove the interface from the routing domain and return it to routing
+domain 0.
+Any inet and inet6 addresses on the interface will also be removed.
.It Cm rtlabel Ar route-label
(inet)
Attach
-/* $OpenBSD: ifconfig.c,v 1.360 2018/02/20 15:33:16 tb Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.361 2018/02/23 05:17:39 akoshibe Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
void mpe_status(void);
void mpw_status(void);
void setrdomain(const char *, int);
+void unsetrdomain(const char *, int);
int prefix(void *val, int);
void getifgroups(void);
void setifgroup(const char *, int);
{ "rtlabel", NEXTARG, 0, setifrtlabel },
{ "-rtlabel", -1, 0, setifrtlabel },
{ "rdomain", NEXTARG, 0, setrdomain },
+ { "-rdomain", 0, 0, unsetrdomain },
{ "staticarp", IFF_STATICARP, 0, setifflags },
{ "-staticarp", -IFF_STATICARP, 0, setifflags },
{ "mpls", IFXF_MPLS, 0, setifxflags },
if (ioctl(s, SIOCSIFRDOMAIN, (caddr_t)&ifr) < 0)
warn("SIOCSIFRDOMAIN");
}
+
+void
+unsetrdomain(const char *ignored, int alsoignored)
+{
+ strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
+ ifr.ifr_rdomainid = 0;
+ if (ioctl(s, SIOCSIFRDOMAIN, (caddr_t)&ifr) < 0)
+ warn("SIOCSIFRDOMAIN");
+}
#endif
#ifndef SMALL