View | Details | Raw Unified | Return to bug 235500
Collapse All | Expand All

(-)sys/netgraph/ng_iface.c (-1 / +10 lines)
Lines 68-73 Link Here
68
#include <sys/rmlock.h>
68
#include <sys/rmlock.h>
69
#include <sys/sockio.h>
69
#include <sys/sockio.h>
70
#include <sys/socket.h>
70
#include <sys/socket.h>
71
#include <sys/sysctl.h>
71
#include <sys/syslog.h>
72
#include <sys/syslog.h>
72
#include <sys/libkern.h>
73
#include <sys/libkern.h>
73
74
Lines 92-97 static MALLOC_DEFINE(M_NETGRAPH_IFACE, "netgraph_i Link Here
92
#define M_NETGRAPH_IFACE M_NETGRAPH
93
#define M_NETGRAPH_IFACE M_NETGRAPH
93
#endif
94
#endif
94
95
96
static SYSCTL_NODE(_net_graph, OID_AUTO, iface, CTLFLAG_RW, 0,
97
    "Point to point netgraph interface");
98
VNET_DEFINE_STATIC(int, ng_iface_max_nest) = 2;
99
#define	V_ng_iface_max_nest	VNET(ng_iface_max_nest)
100
SYSCTL_INT(_net_graph_iface, OID_AUTO, max_nesting, CTLFLAG_VNET | CTLFLAG_RW,
101
    &VNET_NAME(ng_iface_max_nest), 0, "Max nested tunnels");
102
95
/* This struct describes one address family */
103
/* This struct describes one address family */
96
struct iffam {
104
struct iffam {
97
	sa_family_t	family;		/* Address family */
105
	sa_family_t	family;		/* Address family */
Lines 355-361 ng_iface_output(struct ifnet *ifp, struct mbuf *m, Link Here
355
	}
363
	}
356
364
357
	/* Protect from deadly infinite recursion. */
365
	/* Protect from deadly infinite recursion. */
358
	error = if_tunnel_check_nesting(ifp, m, NGM_IFACE_COOKIE, 1);
366
	error = if_tunnel_check_nesting(ifp, m, NGM_IFACE_COOKIE,
367
	    V_ng_iface_max_nest);
359
	if (error) {
368
	if (error) {
360
		m_freem(m);
369
		m_freem(m);
361
		return (error);
370
		return (error);
(-)share/man/man4/ng_iface.4 (-1 / +13 lines)
Lines 35-41 Link Here
35
.\" $FreeBSD$
35
.\" $FreeBSD$
36
.\" $Whistle: ng_iface.8,v 1.5 1999/01/25 23:46:26 archie Exp $
36
.\" $Whistle: ng_iface.8,v 1.5 1999/01/25 23:46:26 archie Exp $
37
.\"
37
.\"
38
.Dd January 12, 2015
38
.Dd February 6, 2019
39
.Dt NG_IFACE 4
39
.Dt NG_IFACE 4
40
.Os
40
.Os
41
.Sh NAME
41
.Sh NAME
Lines 144-149 In case when your graph ends up with some kind of Link Here
144
synchronous or modem, the
144
synchronous or modem, the
145
.Nm
145
.Nm
146
is the right place to turn ALTQ on.
146
is the right place to turn ALTQ on.
147
.Sh Nesting
148
.Nm
149
supports nesting, a configuration when traffic of one
150
.Nm
151
interface flows through the other.
152
The default maximum allowed nesting level is 2.
153
It can be changed at runtime setting
154
.Xr sysctl 8
155
variable
156
.Va net.graph.iface.max_nesting
157
to the desired level of nesting.
147
.Sh SEE ALSO
158
.Sh SEE ALSO
148
.Xr altq 4 ,
159
.Xr altq 4 ,
149
.Xr bpf 4 ,
160
.Xr bpf 4 ,
Lines 151-156 is the right place to turn ALTQ on. Link Here
151
.Xr ng_cisco 4 ,
162
.Xr ng_cisco 4 ,
152
.Xr ifconfig 8 ,
163
.Xr ifconfig 8 ,
153
.Xr ngctl 8
164
.Xr ngctl 8
165
.Xr sysctl
154
.Sh HISTORY
166
.Sh HISTORY
155
The
167
The
156
.Nm iface
168
.Nm iface

Return to bug 235500