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); |