diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1999-12-09 20:38:36 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 1999-12-09 20:38:36 +0000 |
commit | efe6b46e1fd7c7ed1a793082313d6ccff519da7b (patch) | |
tree | cfbebd8af606b2e5b7d4104192f33a5ab097feb4 /sys | |
parent | 088b00566b5f5edeb1798b4cbf1e6ef3c4e98933 (diff) |
Use otos rather than writing directly to ip_tos in the IPv4 header
(bitfields can be a pain).
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netinet/ip_ip4.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_ip4.c b/sys/netinet/ip_ip4.c index aa522f7c19f..c9b831e963a 100644 --- a/sys/netinet/ip_ip4.c +++ b/sys/netinet/ip_ip4.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_ip4.c,v 1.40 1999/12/09 17:55:35 downsj Exp $ */ +/* $OpenBSD: ip_ip4.c,v 1.41 1999/12/09 20:38:35 angelos Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), @@ -269,7 +269,7 @@ int ipe4_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, int protoff) { - u_int8_t tp; + u_int8_t tp, otos; #ifdef INET u_int8_t itos; @@ -278,7 +278,6 @@ ipe4_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, #ifdef INET6 struct ip6_hdr *ip6o; - u_int8_t otos; #endif /* INET6 */ /* Deal with empty TDB source/destination addresses */ @@ -356,7 +355,8 @@ ipe4_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip, } #endif /* INET6 */ - ip_ecn_ingress(ECN_ALLOWED, &ipo->ip_tos, &itos); + ip_ecn_ingress(ECN_ALLOWED, &otos, &itos); + ipo->ip_tos = otos; break; #endif /* INET */ |