- labels: 513556 -->
Quick summary of this bug:
To get a simple UDP server work, we need to add an
expected RECEIVE rule, even before any message gets sent.
I'm simply using the UDP server and client programs. I
assign ScID 10 to the UDP socket on port 9000, and just
basically want it to get working.
I use the following DSP:
- assign ScID 10 to the socket
- allow the socket to be created, and to receive
messages from UDP client (which will be assigned
default ScID=2).
<class_SOCKET_INIT_rule>
<protocol>UDP</protocol>
<port>9000</port>
<SnID>1</SnID>
<ScID>10</ScID>
</class_SOCKET_INIT_rule>
<class_SOCKET_rule>
<sScID>2</sScID>
<sSnID>1</sSnID>
<tScID>10</tScID>
<tSnID>1</tSnID>
<allow>CREATE RECEIVE</allow>
</class_SOCKET_rule>
But this isn't enough to make it work. Quite strangely,
the rule 10 1 10 1 is being checked for the RECEIVE
option... With the correct debug level we see the
following when launching the UDP server (client is not
launched yet):
Jun 30 13:39:01 glacier kernel: DSI-LSM MODULE -
dsi_socket_post_create(d4f8fbc4
): inode = d4f8faa0 scid=2
Jun 30 13:39:01 glacier kernel: DSI-LSM MODULE -
dsi_socket_bind(): check transi
tion called : rc=0 sock->type=2, saddr->sin_port=9000,
DSI_CLASS_SOCKET_INIT=4,
isec->sid=10 from dsi_socket_bind
Jun 30 13:39:01 glacier kernel: DSI-LSM MODULE -
dsi_socket_recvmsg(): check per
mission returned: rc=-2 SScID=10 SSnID=1 TScID=10
TSnID=1 Class=2 looking for RE
CEIVE
Jun 30 13:39:01 glacier kernel: DSI-LSM MODULE Error -
dsi_socket_recvmsg - no p
ermission
If I add this rule, it works :
<class_SOCKET_rule>
<sScID>10</sScID>
<sSnID>1</sSnID>
<tScID>10</tScID>
<tSnID>1</tSnID>
<allow>RECEIVE</allow>
</class_SOCKET_rule>
Conclusion:
* To solve this bug, we need to understand WHY there's
a check being done on dsi_socket_recvmsg before any
message is sent ! (the UDP client isn't launched)