summaryrefslogtreecommitdiffstats
path: root/sys/netinet/tcp_syncache.c
diff options
context:
space:
mode:
authordwmalone <dwmalone@FreeBSD.org>2004-07-17 21:40:14 +0000
committerdwmalone <dwmalone@FreeBSD.org>2004-07-17 21:40:14 +0000
commitccfd16b40a882ec2b27ae7985db2791ee887133c (patch)
tree388b66fc84f4ccff02228acb008456147634527b /sys/netinet/tcp_syncache.c
parentc8c1b8f415a3f8e57219cf3587707d7d24b8d582 (diff)
downloadFreeBSD-src-ccfd16b40a882ec2b27ae7985db2791ee887133c.zip
FreeBSD-src-ccfd16b40a882ec2b27ae7985db2791ee887133c.tar.gz
Fix the !INET6 build.
Reported by: alc
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r--sys/netinet/tcp_syncache.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index 9947d53..6ceff8f 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -946,12 +946,15 @@ syncache_add(inc, to, th, sop, m)
sc->sc_flowlabel = 0;
if (tcp_syncookies) {
sc->sc_iss = syncookie_generate(sc, &flowtmp);
+#ifdef INET6
if (inc->inc_isipv6 &&
(sc->sc_tp->t_inpcb->in6p_flags & IN6P_AUTOFLOWLABEL)) {
sc->sc_flowlabel = flowtmp & IPV6_FLOWLABEL_MASK;
}
+#endif
} else {
sc->sc_iss = arc4random();
+#ifdef INET6
if (inc->inc_isipv6 &&
(sc->sc_tp->t_inpcb->in6p_flags & IN6P_AUTOFLOWLABEL)) {
sc->sc_flowlabel =
@@ -961,6 +964,7 @@ syncache_add(inc, to, th, sop, m)
(htonl(ip6_flow_seq++) & IPV6_FLOWLABEL_MASK);
#endif
}
+#endif
}
/* Initial receive window: clip sbspace to [0 .. TCP_MAXWIN] */
OpenPOWER on IntegriCloud