Change in libosmocore[master]: gprs_ns: Set sockaddr_in.sin_family for persistent NSVCs

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Fri Jun 26 16:07:16 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/19026 )

Change subject: gprs_ns: Set sockaddr_in.sin_family for persistent NSVCs
......................................................................

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
---
M src/gb/gprs_ns_vty.c
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/gb/gprs_ns_vty.c b/src/gb/gprs_ns_vty.c
index 38d4393..a39e139 100644
--- a/src/gb/gprs_ns_vty.c
+++ b/src/gb/gprs_ns_vty.c
@@ -318,6 +318,7 @@
 		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;

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/19026
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6cefc2cd5516c7a4c01a2cc040afca454e59dd57
Gerrit-Change-Number: 19026
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200626/083c918b/attachment.htm>


More information about the gerrit-log mailing list