-.\" $OpenBSD: ifconfig.8,v 1.299 2018/02/15 04:21:46 dlg Exp $
+.\" $OpenBSD: ifconfig.8,v 1.300 2018/02/19 00:23:57 dlg 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 15 2018 $
+.Dd $Mdocdate: February 19 2018 $
.Dt IFCONFIG 8
.Os
.Sh NAME
.Op Oo Fl Oc Ns Cm keepalive Ar period count
.Op Oo Fl Oc Ns Cm tunnel Ar src_address dest_address
.Op Cm tunneldomain Ar tableid
+.Op Oo Fl Oc Ns Cm tunneldf
.Op Cm tunnelttl Ar ttl
.Op Oo Fl Oc Ns Cm vnetid Ar network-id
.Ek
.Ar tableid
can be set to any valid routing table ID;
the corresponding routing domain is derived from this table.
+.It Cm tunneldf
+Do not allow fragmentation of encapsulated packets.
+.It Cm -tunneldf
+Allow fragmentation of the encapsulated packets.
.It Cm tunnelttl Ar ttl
Set the IP or multicast TTL of the tunnel packets.
If supported by the tunnel protocol,
-/* $OpenBSD: ifconfig.c,v 1.357 2018/02/10 05:55:26 florian Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.358 2018/02/19 00:23:57 dlg Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
void unsetpfsync_syncpeer(const char *, int);
void setpfsync_defer(const char *, int);
void pfsync_status(void);
+void settunneldf(const char *, int);
+void settunnelnodf(const char *, int);
void setpppoe_dev(const char *,int);
void setpppoe_svc(const char *,int);
void setpppoe_ac(const char *,int);
{ "deletetunnel", 0, 0, deletetunnel },
{ "tunneldomain", NEXTARG, 0, settunnelinst },
{ "tunnelttl", NEXTARG, 0, settunnelttl },
+ { "tunneldf", 0, 0, settunneldf },
+ { "-tunneldf", 0, 0, settunnelnodf },
{ "pppoedev", NEXTARG, 0, setpppoe_dev },
{ "pppoesvc", NEXTARG, 0, setpppoe_svc },
{ "-pppoesvc", 1, 0, setpppoe_svc },
else if (ifr.ifr_ttl > 0)
printf(" ttl %d", ifr.ifr_ttl);
}
+
+ if (ioctl(s, SIOCGLIFPHYDF, (caddr_t)&ifr) == 0)
+ printf(" %s", ifr.ifr_df ? "df" : "nodf");
+
#ifndef SMALL
if (ioctl(s, SIOCGLIFPHYRTABLE, (caddr_t)&ifr) == 0 &&
(rdomainid != 0 || ifr.ifr_rdomainid != 0))
warn("SIOCSLIFPHYTTL");
}
+void
+settunneldf(const char *ignored, int alsoignored)
+{
+ strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
+ ifr.ifr_df = 1;
+ if (ioctl(s, SIOCSLIFPHYDF, (caddr_t)&ifr) < 0)
+ warn("SIOCSLIFPHYDF");
+}
+
+void
+settunnelnodf(const char *ignored, int alsoignored)
+{
+ strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name));
+ ifr.ifr_df = 0;
+ if (ioctl(s, SIOCSLIFPHYDF, (caddr_t)&ifr) < 0)
+ warn("SIOCSLIFPHYDF");
+}
+
void
mpe_status(void)
{