diff options
Diffstat (limited to 'src/stroke')
-rw-r--r-- | src/stroke/Makefile.in | 1 | ||||
-rw-r--r-- | src/stroke/stroke.c | 9 | ||||
-rw-r--r-- | src/stroke/stroke_msg.h | 1 |
3 files changed, 10 insertions, 1 deletions
diff --git a/src/stroke/Makefile.in b/src/stroke/Makefile.in index 82f2be13d..4353928b5 100644 --- a/src/stroke/Makefile.in +++ b/src/stroke/Makefile.in @@ -197,6 +197,7 @@ ipsecuid = @ipsecuid@ ipsecuser = @ipsecuser@ libdir = @libdir@ libexecdir = @libexecdir@ +libhydra_plugins = @libhydra_plugins@ libstrongswan_plugins = @libstrongswan_plugins@ linux_headers = @linux_headers@ localedir = @localedir@ diff --git a/src/stroke/stroke.c b/src/stroke/stroke.c index 955e49535..4fa0f76a8 100644 --- a/src/stroke/stroke.c +++ b/src/stroke/stroke.c @@ -27,6 +27,8 @@ #include <stddef.h> #include <string.h> +#include <library.h> + #include "stroke_msg.h" #include "stroke_keywords.h" @@ -96,7 +98,7 @@ static int send_stroke_msg (stroke_msg_t *msg) { if (fgets(buffer, sizeof(buffer), stdin)) { - if (write(sock, buffer, strlen(buffer))); + ignore_result(write(sock, buffer, strlen(buffer))); } } } @@ -129,11 +131,13 @@ static int add_connection(char *name, msg.add_conn.me.id = push_string(&msg, my_id); msg.add_conn.me.address = push_string(&msg, my_addr); + msg.add_conn.me.ikeport = 500; msg.add_conn.me.subnets = push_string(&msg, my_nets); msg.add_conn.me.sendcert = 1; msg.add_conn.other.id = push_string(&msg, other_id); msg.add_conn.other.address = push_string(&msg, other_addr); + msg.add_conn.other.ikeport = 500; msg.add_conn.other.subnets = push_string(&msg, other_nets); msg.add_conn.other.sendcert = 1; @@ -355,6 +359,9 @@ int main(int argc, char *argv[]) const stroke_token_t *token; int res = 0; + library_init(NULL); + atexit(library_deinit); + if (argc < 2) { exit_usage(NULL); diff --git a/src/stroke/stroke_msg.h b/src/stroke/stroke_msg.h index 56a7a158f..ffc67039e 100644 --- a/src/stroke/stroke_msg.h +++ b/src/stroke/stroke_msg.h @@ -137,6 +137,7 @@ struct stroke_end_t { char *groups; char *updown; char *address; + u_int16_t ikeport; char *sourceip; int sourceip_mask; char *subnets; |