diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2010-06-14 11:33:56 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2010-06-14 11:33:56 +0000 |
commit | c85961103b5258cf63dabc3cc217afc966353660 (patch) | |
tree | ae5090f701eaac3ab381db288be7d4216ac43c16 /sbin/iked/util.c | |
parent | 825ac1c1726f39a4efe4221044ae718b0b17d399 (diff) |
restructure code a bit to move closer to initiator mode:
- split responder/initiator- specific code into different functions and use
shared functions for common stuff.
- first parse the received message and store information in the temporary
message struct instead of modifying the ike sa in the parsing code directly.
Diffstat (limited to 'sbin/iked/util.c')
-rw-r--r-- | sbin/iked/util.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/iked/util.c b/sbin/iked/util.c index cd54fea4abc..b5bf82ab79b 100644 --- a/sbin/iked/util.c +++ b/sbin/iked/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.3 2010/06/14 08:55:59 reyk Exp $ */ +/* $OpenBSD: util.c,v 1.4 2010/06/14 11:33:55 reyk Exp $ */ /* $vantronix: util.c,v 1.39 2010/06/02 12:22:58 reyk Exp $ */ /* @@ -891,6 +891,8 @@ ibuf_copy(struct ibuf *buf, size_t len) struct ibuf * ibuf_dup(struct ibuf *buf) { + if (buf == NULL) + return (NULL); return (ibuf_new(ibuf_data(buf), ibuf_size(buf))); } |