diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-02-01 21:11:34 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-02-01 21:11:34 +0000 |
commit | cd27a87b337bf98a92c327538d63793d4d32ddce (patch) | |
tree | 2ea3f93e8677a68c546a46491ea26ed0f8618ab1 /sys/netinet6/ip6_var.h | |
parent | ea535cb97f3a7fafc0d7bd950aee42618c3f5c6e (diff) |
The function ip6_get_prevhdr() did return a pointer into a mbuf.
It was not guaranteed that the mbuf data was not somewhere else in
the chain. So return an offset and do a proper mbuf pulldown.
found by Maxime Villard; from NetBSD; with markus@; OK deraadt@
Diffstat (limited to 'sys/netinet6/ip6_var.h')
-rw-r--r-- | sys/netinet6/ip6_var.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index 370f23f804b..2e62ac01540 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ip6_var.h,v 1.81 2017/11/05 13:19:59 florian Exp $ */ +/* $OpenBSD: ip6_var.h,v 1.82 2018/02/01 21:11:33 bluhm Exp $ */ /* $KAME: ip6_var.h,v 1.33 2000/06/11 14:59:20 jinmei Exp $ */ /* @@ -303,7 +303,7 @@ int ip6_input_if(struct mbuf **, int *, int, int, struct ifnet *); void ip6_freepcbopts(struct ip6_pktopts *); void ip6_freemoptions(struct ip6_moptions *); int ip6_unknown_opt(u_int8_t *, struct mbuf *, int); -u_int8_t *ip6_get_prevhdr(struct mbuf *, int); +int ip6_get_prevhdr(struct mbuf *, int); int ip6_nexthdr(struct mbuf *, int, int, int *); int ip6_lasthdr(struct mbuf *, int, int, int *); int ip6_mforward(struct ip6_hdr *, struct ifnet *, struct mbuf *); |