Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong token name used in accept call #969

Closed
excaliburtb opened this issue Apr 23, 2021 · 1 comment · Fixed by #971 or #975
Closed

Wrong token name used in accept call #969

excaliburtb opened this issue Apr 23, 2021 · 1 comment · Fixed by #971 or #975
Assignees
Labels
Milestone

Comments

@excaliburtb
Copy link

conn = OS_OBJECT_TABLE_GET(OS_stream_table, sock_token);

This is a bug. I think it should be conn_token.. not sock_token

@skliper skliper added the bug label Apr 26, 2021
@skliper skliper added this to the 6.0.0 milestone Apr 26, 2021
@jphickey
Copy link
Contributor

Yeah, this definitely looks like some sort of typo/copy+paste/merge issue, what I'm most confused about is why the functional test does not seem to catch this. The memset after this line would clobber the socket record. Maybe the test needs to do multiple connections or something.

jphickey added a commit to jphickey/osal that referenced this issue Apr 27, 2021
The OS_SocketAccept call was using the incorrect token, using
the server/acceptor socket when it should have used the connection
socket.

The bug overwrote data in the acceptor socket, but it would only cause
an issue when the user attempted to use the server socket to accept
a second connection, but the tests only performed a single connection.

This also improves the network-api-test to do multiple connections,
re-using the same acceptor socket between them.
jphickey added a commit to jphickey/osal that referenced this issue Apr 27, 2021
The OS_SocketAccept call was using the incorrect token, using
the server/acceptor socket when it should have used the connection
socket.

The bug overwrote data in the acceptor socket, but it would only cause
an issue when the user attempted to use the server socket to accept
a second connection, but the tests only performed a single connection.

This also improves the network-api-test to do multiple connections,
re-using the same acceptor socket between them.
jphickey added a commit to jphickey/osal that referenced this issue Apr 27, 2021
The stream test was sending an 8-bit count pattern to validate
the connection, but was not using the provided API to do so.

This provides the exact same test but uses the provided API
from UtAssert to implement it, rather than duplicating the logic.

Notably, this also confirms that the tool functions work as
expected, since there were no other OSAL tests using this API.
astrogeco added a commit that referenced this issue Apr 28, 2021
Fix #969, socket accept using incorrect record
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants