From 224a6dda02a2fcf11f70ac25abe9c780167649bf Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Tue, 17 Oct 2017 15:23:53 +0200 Subject: gb: optionally allow nsip packets only from a specific host When listening for nsip connections is enabled, then every remote host may send packets. This is useful for an SGSN that serves multiple PCUs, but contraproductive for a PCU that awaits packets from a single SGSN. Add struct members remote_ip, and remote_port to struct gprs_ns_inst, when set, then the listening end uses connect() to ensure that only the expected host may send packets. Related: OS#2401 Change-Id: Ifeb201d9006eec275a46708007ff342cdfc14e45 --- include/osmocom/gprs/gprs_ns.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/osmocom') diff --git a/include/osmocom/gprs/gprs_ns.h b/include/osmocom/gprs/gprs_ns.h index 5aee755f..d4aef824 100644 --- a/include/osmocom/gprs/gprs_ns.h +++ b/include/osmocom/gprs/gprs_ns.h @@ -88,6 +88,8 @@ struct gprs_ns_inst { struct osmo_fd fd; uint32_t local_ip; uint16_t local_port; + uint32_t remote_ip; + uint16_t remote_port; int dscp; } nsip; /*! NS-over-FR-over-GRE-over-IP specific bits */ -- cgit v1.2.3