diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2019-04-13 22:41:08 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2019-04-13 22:41:08 +0200 |
commit | fc9ea50c4b2d0644ec89ea99e8d1b94bd17f1468 (patch) | |
tree | c1544df73ed907c80cd1e9a1f01c2aa6c752c241 | |
parent | 7a14e98a9778765037b1e2c69c504535c65aacc7 (diff) |
android fixesandroid-old
-rw-r--r-- | proto/wireguard/wireguard.c | 10 | ||||
-rw-r--r-- | sysdep/unix/main.c | 3 |
2 files changed, 8 insertions, 5 deletions
diff --git a/proto/wireguard/wireguard.c b/proto/wireguard/wireguard.c index a998f014..ddb3e061 100644 --- a/proto/wireguard/wireguard.c +++ b/proto/wireguard/wireguard.c @@ -15,13 +15,13 @@ #include "wireguard.h" #include "proto/bgp/bgp.h" -#define SOCKET_PATH PATH_RUNSTATEDIR "/wireguard/" +#define SOCKET_PATH PATH_RUNSTATEDIR //"/wireguard/" static char *get_socket_path(struct wg_proto *p, char *buf, uint size) { struct wg_config *c = (struct wg_config *) p->p.cf; - bsnprintf(buf, size, SOCKET_PATH "%s.sock", c->ifname); + bsnprintf(buf, size, SOCKET_PATH "/%s.sock", c->ifname); return buf; } @@ -222,7 +222,7 @@ user_set_device(struct wg_proto *p) struct wg_config *c = (struct wg_config *) p->p.cf; char path[sizeof(struct sockaddr_un)]; - bsnprintf(path, sizeof(path), SOCKET_PATH "%s.sock", c->ifname); + bsnprintf(path, sizeof(path), SOCKET_PATH "/%s.sock", c->ifname); struct birdsock *sock = sk_new(p->p.pool); sock->rx_hook = user_rx_hook; @@ -376,8 +376,8 @@ wg_if_notify(struct proto *P, unsigned flags, struct iface *i) { debug("WG: IF_CHANGE_UP %s\n", i->name); - int res = set_device(p); - log(L_TRACE "WG: wg_set_device %d", res); + /* int res = set_device(p); */ + /* log(L_TRACE "WG: wg_set_device %d", res); */ } } diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 921115b1..6c2f7678 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -539,6 +539,7 @@ unlink_pid_file(void) void cmd_shutdown(void) { + log_msg(L_INFO "cmd_shutdown"); if (cli_access_restricted()) return; @@ -549,6 +550,7 @@ cmd_shutdown(void) void async_shutdown(void) { + log_msg(L_INFO "async_shutdown"); DBG("Shutting down...\n"); order_shutdown(); } @@ -556,6 +558,7 @@ async_shutdown(void) void sysdep_shutdown_done(void) { + log_msg(L_INFO "sysdep_shutdown_done"); unlink_pid_file(); unlink(path_control_socket); log_msg(L_FATAL "Shutdown completed"); |