diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2014-03-10 17:22:28 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2014-03-10 17:22:28 +0000 |
commit | df65223c2942b763306fa4cc7e466c02cc065734 (patch) | |
tree | c4ba9be631df1b95ba5917e56b6a10cb941ed1bb /sys/net/pf.c | |
parent | 0c2795b2cd05fc562928d327b09541d00410e736 (diff) |
When setting up the packet description, also retrieve the Traffic Class
field of IPv6 packets. Issue reported by Christophe Heurtaux on frnog.
ok mikeb@
Diffstat (limited to 'sys/net/pf.c')
-rw-r--r-- | sys/net/pf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index 8725f98d108..4703feb6c26 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.868 2014/01/25 03:39:00 lteo Exp $ */ +/* $OpenBSD: pf.c,v 1.869 2014/03/10 17:22:27 jca Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -6228,7 +6228,7 @@ pf_setup_pdesc(struct pf_pdesc *pd, void *pdhdrs, sa_family_t af, int dir, pd->dst = (struct pf_addr *)&h->ip6_dst; pd->virtual_proto = pd->proto; pd->tot_len = ntohs(h->ip6_plen) + sizeof(struct ip6_hdr); - pd->tos = 0; + pd->tos = (ntohl(h->ip6_flow) & 0x0fc00000) >> 20; pd->ttl = h->ip6_hlim; if (pd->fragoff != 0) |