diff options
author | Harald Welte <laforge@osmocom.org> | 2020-06-26 16:17:56 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-06-26 16:07:15 +0000 |
commit | 78af6ba54bb94147556cbe36f7c2d859ad4efcb9 (patch) | |
tree | 4d919cf97671693ee57bf32b649816b69d2451b2 /src/gb/gprs_ns_vty.c | |
parent | 2d3465fd1c0c2d59a852d2203b87d575e8cf9b0c (diff) |
gprs_ns: Set sockaddr_in.sin_family for persistent NSVCs
We cannot just set sockaddr_in.sin_addr + sin_port, we also must
initializa sin_family. The reason this has worked so far is
because we probably always first received a NS packet from the
peer, rather than being the first one to send.
Change-Id: I6cefc2cd5516c7a4c01a2cc040afca454e59dd57
Related: OS#4629
Diffstat (limited to 'src/gb/gprs_ns_vty.c')
-rw-r--r-- | src/gb/gprs_ns_vty.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gb/gprs_ns_vty.c b/src/gb/gprs_ns_vty.c index 38d43930..a39e1395 100644 --- a/src/gb/gprs_ns_vty.c +++ b/src/gb/gprs_ns_vty.c @@ -318,6 +318,7 @@ DEFUN(cfg_nse_remoteip, cfg_nse_remoteip_cmd, vty_out(vty, "No such NSE (%u)%s", nsei, VTY_NEWLINE); return CMD_WARNING; } + nsvc->ip.bts_addr.sin_family = AF_INET; inet_aton(argv[1], &nsvc->ip.bts_addr.sin_addr); return CMD_SUCCESS; |