https://projects.osmocom.org/https://projects.osmocom.org/favicon.ico?16647414092017-07-25T17:54:44ZOpen Source Mobile CommunicationsOsmoPCU - Bug #2401: OsmoPCU accepts UDP packets from any sourcehttps://projects.osmocom.org/issues/2401?journal_id=47292017-07-25T17:54:44Zlaforge
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-1 priority-lowest closed" href="/issues/2384">Bug #2384</a>: NSVCI=0 seems to cause problems</i> added</li></ul> OsmoPCU - Bug #2401: OsmoPCU accepts UDP packets from any sourcehttps://projects.osmocom.org/issues/2401?journal_id=50552017-08-17T06:45:34Zlaforge
<ul><li><strong>Priority</strong> changed from <i>Normal</i> to <i>High</i></li></ul> OsmoPCU - Bug #2401: OsmoPCU accepts UDP packets from any sourcehttps://projects.osmocom.org/issues/2401?journal_id=55562017-10-05T06:32:39Zlaforge
<ul><li><strong>Assignee</strong> set to <i>dexter</i></li></ul> OsmoPCU - Bug #2401: OsmoPCU accepts UDP packets from any sourcehttps://projects.osmocom.org/issues/2401?journal_id=58392017-10-16T16:17:28Zdexter
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li></ul><p>I had a look at it:</p>
<p>Its probably the simplest to fix this by adding remote_ip and remote port<br />member to gprs_ns_inst. And then check in gprs_ns_rcvmsg(). If<br />remote_ip/remote_port is set to 0, all packets are accepted.</p>
<p>/*! An instance of the NS protocol stack */<br />struct gprs_ns_inst {</p>
<p>/*! NS-over-IP specific bits */<br /> struct {<br /> struct osmo_fd fd;<br /> uint32_t local_ip;<br /> uint16_t local_port;<br /> uint32_t remote_ip;<br /> uint16_t remote_port;<br /> int dscp;<br /> } nsip;</p>
<p>};</p>
<p>In gprs_bssgp_pcu.cpp:gprs_bssgp_create_and_connect() where we also instantiate<br />bssgp_nsi we could populate remote_ip/remote_port.</p> OsmoPCU - Bug #2401: OsmoPCU accepts UDP packets from any sourcehttps://projects.osmocom.org/issues/2401?journal_id=58402017-10-16T17:00:07Zlaforge
<ul></ul><p>Please double-check that any related proposal would work for all<br />users of the gprs_ns code, i.e. SGSN, PCU and gb_proxy.</p>
<p>I'm not implying that your proposal would not work. I'm just mentioning<br />that we have to make sure it works in all related use cases.</p>
<p>I guess it could be implemented in a way that if remote_ip/remote_port<br />are zero, then no connect() is made on the socket, and the current<br />behavior is preserved.</p> OsmoPCU - Bug #2401: OsmoPCU accepts UDP packets from any sourcehttps://projects.osmocom.org/issues/2401?journal_id=58682017-10-17T13:43:37Zdexter
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>I have now implemented it using connect(). If the struct members remote_ip, and remote_port are set then connect() is used, otherwise everything works like it always did. I also added some log and verified that the SGSN accepts from packets from anyone and the BTS only from its assigned SGSN.</p>
<p>Patches are in Gerrit:<br /><a class="external" href="https://gerrit.osmocom.org/4317">https://gerrit.osmocom.org/4317</a><br /><a class="external" href="https://gerrit.osmocom.org/4319">https://gerrit.osmocom.org/4319</a></p> OsmoPCU - Bug #2401: OsmoPCU accepts UDP packets from any sourcehttps://projects.osmocom.org/issues/2401?journal_id=59322017-10-24T12:45:16Zdexter
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Resolved</i></li></ul> OsmoPCU - Bug #2401: OsmoPCU accepts UDP packets from any sourcehttps://projects.osmocom.org/issues/2401?journal_id=74442018-02-06T08:25:37Zlaforge
<ul><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li></ul> OsmoPCU - Bug #2401: OsmoPCU accepts UDP packets from any sourcehttps://projects.osmocom.org/issues/2401?journal_id=134412019-02-23T14:03:22Zlaforge
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-3 priority-3 priority-high3 closed" href="/issues/3372">Feature #3372</a>: Support for SNS auto-configuration (SIZE / SNS-CONFIG procedure)</i> added</li></ul> OsmoPCU - Bug #2401: OsmoPCU accepts UDP packets from any sourcehttps://projects.osmocom.org/issues/2401?journal_id=134432019-02-23T14:04:39Zlaforge
<ul></ul><p>FYI: With the changes required for OS#3372, this "connect()" behavior had to be made conditional to using the classic Gb/NS flavor. As soon as the IP-SNS with dynamic configuration is used, we have to communicate with multiple NS endpoints on the SGSN side.</p>