diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-08-24 21:30:14 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-08-24 21:30:14 +0200 |
commit | 727abf64e76efce9867f8906c233e08a28ac0fb2 (patch) | |
tree | d93d151c34aaaf757be9981e1f6bf1473f6dc81e | |
parent | 7d95e8ba16596b5e10a7f5bf68bf7a1bf846d670 (diff) |
WIP: commit changed filescurrent-busch
-rw-r--r-- | nest/proto.c | 2 | ||||
-rw-r--r-- | proto/wireguard/wireguard.c | 6 | ||||
-rw-r--r-- | sysdep/unix/io.c | 2 | ||||
-rw-r--r-- | sysdep/unix/log.c | 3 | ||||
-rw-r--r-- | sysdep/unix/wg_user.c | 2 |
5 files changed, 11 insertions, 4 deletions
diff --git a/nest/proto.c b/nest/proto.c index 5082922c..ffc16617 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -626,7 +626,7 @@ channel_copy_config(struct channel_config *src, struct proto_config *proto) struct channel_config *dst = cfg_alloc(src->channel->config_size); memcpy(dst, src, src->channel->config_size); - //memset(&dst->n, 0, sizeof(dst->n)); + memset(&dst->n, 0, sizeof(dst->n)); add_tail(&proto->channels, &dst->n); CALL(src->channel->copy_config, dst, src); diff --git a/proto/wireguard/wireguard.c b/proto/wireguard/wireguard.c index 10c71222..3cb84418 100644 --- a/proto/wireguard/wireguard.c +++ b/proto/wireguard/wireguard.c @@ -49,8 +49,10 @@ int get_device(struct wg_proto *p, wg_device **pdev, const char *device_name) wg_generate_public_key(dev->public_key, dev->private_key); } if (c->listen_port) - dev->flags |= WGDEVICE_HAS_LISTEN_PORT; - dev->listen_port = c->listen_port; + { + dev->flags |= WGDEVICE_HAS_LISTEN_PORT; + dev->listen_port = c->listen_port; + } DBG("listen port %d\n", c->listen_port); struct peer_config *pc = NULL; diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index a31546ee..67e0f50a 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -1526,7 +1526,7 @@ static void hexdump(const char *data, socklen_t size) { char buf[1024]=""; - for (int i = 0; i < size; i++) + for (unsigned int i = 0; i < size; i++) { sprintf(buf + i*3, "%02x ", data[i]); } diff --git a/sysdep/unix/log.c b/sysdep/unix/log.c index e24322c6..68350141 100644 --- a/sysdep/unix/log.c +++ b/sysdep/unix/log.c @@ -342,6 +342,7 @@ default_log_list(int initial, const char **syslog_name) if (!dbgf) { static struct log_config lc_syslog = { .mask = ~0 }; + memset(&lc_syslog.n, 0, sizeof(lc_syslog.n)); add_tail(&log_list, &lc_syslog.n); *syslog_name = bird_name; } @@ -351,6 +352,7 @@ default_log_list(int initial, const char **syslog_name) { static struct log_config lc_debug = { .mask = ~0 }; lc_debug.fh = dbgf; + memset(&lc_debug.n, 0, sizeof(lc_debug.n)); add_tail(&log_list, &lc_debug.n); } @@ -358,6 +360,7 @@ default_log_list(int initial, const char **syslog_name) { static struct log_config lc_stderr = { .mask = ~0, .terminal_flag = 1}; lc_stderr.fh = stderr; + memset(&lc_stderr.n, 0, sizeof(lc_stderr.n)); add_tail(&log_list, &lc_stderr.n); } diff --git a/sysdep/unix/wg_user.c b/sysdep/unix/wg_user.c index 4f0dba24..447e4ecd 100644 --- a/sysdep/unix/wg_user.c +++ b/sysdep/unix/wg_user.c @@ -1,3 +1,5 @@ +#define LOCAL_DEBUG + #include <stdio.h> #include <stdbool.h> #include <sys/stat.h> |