summaryrefslogtreecommitdiffstats
path: root/sys/net/if_gif.h
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2004-04-05 16:55:15 +0000
committerru <ru@FreeBSD.org>2004-04-05 16:55:15 +0000
commitb728623bce9c201d0ee385e411494d6f60a266da (patch)
tree8e4e6abe7d10a4f6e7ed80ad13b3e1ffbc3408a5 /sys/net/if_gif.h
parentea768cc3c26894afa3749739a91476398c797f60 (diff)
downloadFreeBSD-src-b728623bce9c201d0ee385e411494d6f60a266da.zip
FreeBSD-src-b728623bce9c201d0ee385e411494d6f60a266da.tar.gz
Properly detect loops by recording the interface pointer in an mtag.
For now, preserve the gif_called functionality to limit the nesting level because uncontrolled nesting can easily cause the kernel stack exhaustion. Rumors are it should be shot to allow people to easily shoot themselves in the foot, but I have ran out of cartridges. ;)
Diffstat (limited to 'sys/net/if_gif.h')
-rw-r--r--sys/net/if_gif.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/net/if_gif.h b/sys/net/if_gif.h
index 8a0ac56..c3a9df2 100644
--- a/sys/net/if_gif.h
+++ b/sys/net/if_gif.h
@@ -81,6 +81,9 @@ struct gif_softc {
#define GIF_MTU_MIN (1280) /* Minimum MTU */
#define GIF_MTU_MAX (8192) /* Maximum MTU */
+#define MTAG_GIF 1080679712
+#define MTAG_GIF_CALLED 0
+
/* Prototypes */
void gifattach0(struct gif_softc *);
void gif_input(struct mbuf *, int, struct ifnet *);
OpenPOWER on IntegriCloud