summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>1999-12-09 09:10:06 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>1999-12-09 09:10:06 +0000
commit246772fde2ba8fc0d37f2a31d4bddafd239d4997 (patch)
treef709fcef8a9069948f77ecd323606754b42d9a7f /sys
parentbd67160d2b8d0e39bf87325ac544b934d67f8089 (diff)
Couple of paranoid ifdefs...
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_ip4.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/netinet/ip_ip4.c b/sys/netinet/ip_ip4.c
index 1af4a6419f2..f5d9ed22fc3 100644
--- a/sys/netinet/ip_ip4.c
+++ b/sys/netinet/ip_ip4.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ip4.c,v 1.38 1999/12/09 09:07:54 angelos Exp $ */
+/* $OpenBSD: ip_ip4.c,v 1.39 1999/12/09 09:10:05 angelos Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
@@ -340,7 +340,9 @@ ipe4_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
sizeof(u_int16_t), (caddr_t) &ipo->ip_off);
ipo->ip_off &= ~(IP_DF | IP_MF | IP_OFFMASK);
}
- else
+
+#ifdef INET6
+ if (tp == IPPROTO_IPV6)
{
/* Save ECN notification */
m_copydata(m, sizeof(struct ip) +
@@ -351,6 +353,7 @@ ipe4_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
ipo->ip_p = IPPROTO_IPV6;
ipo->ip_off = 0;
}
+#endif /* INET6 */
ip_ecn_ingress(ECN_ALLOWED, &ipo->ip_tos, &itos);
break;
@@ -384,6 +387,7 @@ ipe4_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
ip6o->ip6_dst = tdb->tdb_dst.sin6.sin6_addr;
ip6o->ip6_src = tdb->tdb_src.sin6.sin6_addr;
+#ifdef INET
if (tp == IPVERSION)
{
/* Save ECN notification */
@@ -393,7 +397,9 @@ ipe4_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
ip6o->ip6_nxt = IPPROTO_IPIP; /* This is really IPVERSION */
}
- else
+#endif /* INET */
+
+ if (tp == IPPROTO_IPV6)
{
/* Save ECN notification */
m_copydata(m, sizeof(struct ip6_hdr) +