aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-10-12 04:11:51 +0200
committerlaforge <laforge@osmocom.org>2020-10-12 10:54:39 +0000
commitc068d860a54d159c42281db3eab98a38f0f16952 (patch)
treefda9cd6f94dba6c08d2ab0737b937e86d6ea1dd6
parent3531504d526af1af2338f02a2aabf3503e14b256 (diff)
gprs_ns2: fix SNS_ADD for IPv4
The remote must be initialized because the osmo_sockaddr_cmp is using a memcmp() and might fail on spare bytes in the struct. The same was already done for IPv6. Related: OS#4792 Change-Id: Iefeef969bb2b5ae4d5db6a6358293ef9eeda858a
-rw-r--r--src/gb/gprs_ns2_sns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c
index ec6f31f9..fabc134a 100644
--- a/src/gb/gprs_ns2_sns.c
+++ b/src/gb/gprs_ns2_sns.c
@@ -230,7 +230,7 @@ static void ns2_nsvc_create_ip4(struct osmo_fsm_inst *fi,
struct gprs_ns2_inst *nsi = nse->nsi;
struct gprs_ns2_vc *nsvc;
struct gprs_ns2_vc_bind *bind;
- struct osmo_sockaddr remote;
+ struct osmo_sockaddr remote = { };
/* copy over. Both data structures use network byte order */
remote.u.sin.sin_family = AF_INET;
remote.u.sin.sin_addr.s_addr = ip4->ip_addr;