From 78af6ba54bb94147556cbe36f7c2d859ad4efcb9 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 26 Jun 2020 16:17:56 +0200 Subject: 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 --- src/gb/gprs_ns_vty.c | 1 + 1 file changed, 1 insertion(+) 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; -- cgit v1.2.3