diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-01-11 16:02:32 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-01-11 16:02:32 +0000 |
commit | cc2b632121319f9fd38437e23988100b2fe18d73 (patch) | |
tree | 1cc618d18bd8f489a4e9aeb700194395f29338a5 /sys/net | |
parent | 02d7e6045f2a185a4090f36cf0f8ca274e154154 (diff) |
Advance data pointer after exporting SA type to userland. Otherwise
ipsecctl(8) may display bundled SA incorrectly.
from markus@
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/pfkeyv2_convert.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/pfkeyv2_convert.c b/sys/net/pfkeyv2_convert.c index 8b129e461b1..3656994ff19 100644 --- a/sys/net/pfkeyv2_convert.c +++ b/sys/net/pfkeyv2_convert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2_convert.c,v 1.62 2017/09/08 05:36:53 deraadt Exp $ */ +/* $OpenBSD: pfkeyv2_convert.c,v 1.63 2018/01/11 16:02:31 bluhm Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@keromytis.org) * @@ -543,7 +543,7 @@ export_encap(void **p, struct sockaddr_encap *encap, int type) } *p += PADUP(sizeof(struct sockaddr_in)); break; - case SENT_IP6: + case SENT_IP6: saddr->sadb_address_len = (sizeof(struct sadb_address) + PADUP(sizeof(struct sockaddr_in6))) / sizeof(uint64_t); sunion->sa.sa_len = sizeof(struct sockaddr_in6); @@ -896,4 +896,5 @@ export_satype(void **p, struct tdb *tdb) sab->sadb_protocol_len = sizeof(struct sadb_protocol) / sizeof(uint64_t); sab->sadb_protocol_proto = tdb->tdb_satype; + *p += sizeof(struct sadb_protocol); } |