diff options
| author | Philipp Maier <pmaier@sysmocom.de> | 2017-10-17 15:23:53 +0200 | 
|---|---|---|
| committer | Harald Welte <laforge@gnumonks.org> | 2017-10-24 10:50:07 +0000 | 
| commit | 224a6dda02a2fcf11f70ac25abe9c780167649bf (patch) | |
| tree | 16327523b7671fe50d4820f77da9bb30327e338b /include | |
| parent | f0e392ac2dbb44eb42a242353f392d570b5de8e8 (diff) | |
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
Diffstat (limited to 'include')
| -rw-r--r-- | include/osmocom/gprs/gprs_ns.h | 2 | 
1 files changed, 2 insertions, 0 deletions
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 */  | 
