diff options
author | 2013-06-05 02:03:15 +0000 | |
---|---|---|
committer | 2013-06-05 02:03:15 +0000 | |
commit | d161f164912cb7949e41273acc4330b97bd07f1f (patch) | |
tree | 935933940de080328b39d2c60f8ff3928a554a66 | |
parent | Some places used PATH_MAX from <limits.h>, some MAXPATHLEN from <sys/param.h>. (diff) | |
download | wireguard-openbsd-d161f164912cb7949e41273acc4330b97bd07f1f.tar.xz wireguard-openbsd-d161f164912cb7949e41273acc4330b97bd07f1f.zip |
Unbreak the kernel to userspace SADB_X_EXT_TAG message.
ok deraadt@
-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 15c047f1946..056e4c741ad 100644 --- a/sys/net/pfkeyv2_convert.c +++ b/sys/net/pfkeyv2_convert.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfkeyv2_convert.c,v 1.39 2013/03/28 23:10:05 tedu Exp $ */ +/* $OpenBSD: pfkeyv2_convert.c,v 1.40 2013/06/05 02:03:15 reyk Exp $ */ /* * The author of this code is Angelos D. Keromytis (angelos@keromytis.org) * @@ -1005,10 +1005,11 @@ export_tag(void **p, struct tdb *tdb) struct sadb_x_tag *stag = (struct sadb_x_tag *)*p; char *s = (char *)(stag + 1); + pf_tag2tagname(tdb->tdb_tag, s); + stag->sadb_x_tag_taglen = strlen(s) + 1; stag->sadb_x_tag_len = (sizeof(struct sadb_x_tag) + PADUP(stag->sadb_x_tag_taglen)) / sizeof(uint64_t); - pf_tag2tagname(tdb->tdb_tag, s); *p += sizeof(struct sadb_x_tag) + PADUP(stag->sadb_x_tag_taglen); } |