summaryrefslogtreecommitdiff
path: root/sbin/iked
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2012-10-23 14:40:15 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2012-10-23 14:40:15 +0000
commitcdcc59cd939ca1265aea7c8af38ef9e0a9f6c99d (patch)
tree34b4d10f6a025a925522cade6ef32f2457423fd5 /sbin/iked
parent0393d6fe1cb61827036e7990aa57a9a6a37287ff (diff)
Change the order of variables just to shrink the diff to the (not yet
released) portable version a bit. No functional changes.
Diffstat (limited to 'sbin/iked')
-rw-r--r--sbin/iked/pfkey.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sbin/iked/pfkey.c b/sbin/iked/pfkey.c
index 56f0867b93b..dac1bcd237f 100644
--- a/sbin/iked/pfkey.c
+++ b/sbin/iked/pfkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfkey.c,v 1.19 2012/09/18 12:07:59 reyk Exp $ */
+/* $OpenBSD: pfkey.c,v 1.20 2012/10/23 14:40:14 reyk Exp $ */
/* $vantronix: pfkey.c,v 1.11 2010/06/03 07:57:33 reyk Exp $ */
/*
@@ -429,6 +429,7 @@ pfkey_sa(int sd, u_int8_t satype, u_int8_t action, struct iked_childsa *sa)
struct sadb_lifetime sa_ltime_hard, sa_ltime_soft;
struct sadb_x_udpencap udpencap;
struct sadb_x_tag sa_tag;
+ char *tag = NULL;
struct sadb_x_tap sa_tap;
struct sockaddr_storage ssrc, sdst;
struct sadb_ident *sa_srcid, *sa_dstid;
@@ -437,7 +438,6 @@ pfkey_sa(int sd, u_int8_t satype, u_int8_t action, struct iked_childsa *sa)
struct iovec iov[IOV_CNT];
u_int32_t jitter;
int iov_cnt;
- char *tag = NULL;
sa_srcid = sa_dstid = NULL;
@@ -1332,21 +1332,24 @@ pfkey_timer_cb(int unused, short event, void *arg)
void
pfkey_process(struct iked *env, struct pfkey_message *pm)
{
- struct iked_addr peer;
- struct iked_flow flow;
struct iked_spi spi;
- struct sadb_address *sa_addr;
- struct sadb_msg *hdr, smsg;
struct sadb_sa *sa;
struct sadb_lifetime *sa_ltime;
+ struct sadb_msg *hdr;
+ struct sadb_msg smsg;
+ struct iked_addr peer;
+ struct iked_flow flow;
+ struct sadb_address *sa_addr;
struct sadb_protocol *sa_proto;
struct sadb_x_policy sa_pol;
struct sockaddr_storage *ssrc, *sdst, *smask, *dmask, *speer;
struct iovec iov[IOV_CNT];
int iov_cnt, sd = env->sc_pfkey;
- u_int8_t *reply, *data = pm->pm_data;
- ssize_t rlen, len = pm->pm_lenght;
+ u_int8_t *reply;
+ ssize_t rlen;
const char *errmsg = NULL;
+ u_int8_t *data = pm->pm_data;
+ ssize_t len = pm->pm_lenght;
if (!env || !data || !len)
return;