summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorknakahara <knakahara@NetBSD.org>2022-11-25 08:41:05 +0000
committerknakahara <knakahara@NetBSD.org>2022-11-25 08:41:05 +0000
commit022267e425e765d43b7873bc6cb11af9ef039f91 (patch)
treeef816e5a914307e3d4c622ebe90742876fd7aee3 /sbin
parenta5e9e5dbb704a122b4f451c24bce61e0cb5bcb2a (diff)
ifconfig(8) support unnumbered flag.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ifconfig.88
-rw-r--r--sbin/ifconfig/ifconfig.c6
2 files changed, 10 insertions, 4 deletions
diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8
index 0001453b786..7331079b94c 100644
--- a/sbin/ifconfig/ifconfig.8
+++ b/sbin/ifconfig/ifconfig.8
@@ -1,4 +1,4 @@
-.\" $NetBSD: ifconfig.8,v 1.123 2022/01/07 10:17:39 bad Exp $
+.\" $NetBSD: ifconfig.8,v 1.124 2022/11/25 08:41:05 knakahara Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)ifconfig.8 8.4 (Berkeley) 6/1/94
.\"
-.Dd March 9, 2021
+.Dd November 25, 2022
.Dt IFCONFIG 8
.Os
.Sh NAME
@@ -744,6 +744,10 @@ traffic can be protected using
If the driver is a
.Xr pfsync 4
pseudo-device, broadcast the packets using multicast.
+.It Cm unnumbered
+Treat the interface as unnumbered.
+.It Cm -unnumbered
+Don't treat the interface as unnumbered.
.El
.Pp
.Nm
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 3bb1ccd2141..f32c1773e39 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ifconfig.c,v 1.248 2020/10/14 13:37:14 roy Exp $ */
+/* $NetBSD: ifconfig.c,v 1.249 2022/11/25 08:41:05 knakahara Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1983, 1993\
The Regents of the University of California. All rights reserved.");
-__RCSID("$NetBSD: ifconfig.c,v 1.248 2020/10/14 13:37:14 roy Exp $");
+__RCSID("$NetBSD: ifconfig.c,v 1.249 2022/11/25 08:41:05 knakahara Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -141,6 +141,7 @@ __dead static void usage(void);
static const struct kwinst ifflagskw[] = {
IFKW("arp", -IFF_NOARP)
, IFKW("debug", IFF_DEBUG)
+ , IFKW("unnumbered", IFF_UNNUMBERED)
, IFKW("link0", IFF_LINK0)
, IFKW("link1", IFF_LINK1)
, IFKW("link2", IFF_LINK2)
@@ -1524,6 +1525,7 @@ usage(void)
"\t[ preference n ]\n"
"\t[ link0 | -link0 ] [ link1 | -link1 ] [ link2 | -link2 ]\n"
"\t[ linkstr str | -linkstr ]\n"
+ "\t[ unnumbered | -unnumbered ]\n"
"\t[ description str | descr str | -description | -descr ]\n"
" %s -a [-b] [-d] [-h] %s[-u] [-v] [-z] [ af ]\n"
" %s -l [-b] [-d] [-s] [-u]\n"