|
Home About Us A-Z Index Search * Contact Us Register Login Press ShopThe Open Brand -- Problem Reporting and Interpretations System |
Problem Report 1161 Details
Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges
This page provides all information on Problem Report 1161.
Report 1161 Actions
Problem Report Number 1161 Submitter's Classification Test Suite problem State Resolved Resolution Rejected (REJ) Problem Resolution ID REJ.X.0363 Raised 1970-01-01 08:00 Updated 2003-03-13 08:00 Published null Product Standard Sockets (UNIX 95) Certification Program The Open Brand certification program Test Suite VSU version 4.1.0 Test Identification Sockets/bind 6 Problem Summary PG4U.00107 The IR claims that a protocol by default may bind to a new local address when a socket is already bound to an local address. Problem Text
The test source is inconsistent with the test assertion.
The X/Open CAE specification, Networking Services, Issue 4 contains the
following statement with respect to the EINVAL errno for the bind()
interface:
EINVAL The socket is already bound to an address, and the protocol
does not support binding to a new address; or the socket
has been shut down.
As also noted in the test assertion for bind #6, this test case is testing
for the EINVAL errno in the case where the protocol DOES NOT support
binding to a new address. The problem is that the test itself makes the
assumption that the implementation does not support binding to the new
address, when in fact the implementation may support this behavior.
In the case under test, our implementation of AF_INET and AF_UNIX sockets
DOES support binding to a new address in the case where the socket is
already bound to an address. The test does not appear to take into
consideration that this support may exist and as a result expects a
return value of -1 with errno set to EINVAL. There is no VSU
configuration variable to specify which protocols support binding already
bound sockets to a new address. We suggest that such a configuration
variable be added or the test be rewritten to except as a valid result
a return value of 0 and the value of errno unchanged.Test Output
TEST CASE: bind
TEST PURPOSE #6
If the implementation supports a communications
domain and a socket type:
EINVAL in errno and return -1 on a call to int
bind(int socket, const struct sockaddr *address,
size_t address_len) when the socket is already bound
to an address and the protocol does not support binding to a new address.
TEST: AF_INET SOCK_STREAM
PREP: Create test sockaddr_in: address = 129.146.85.212, port = 4913
PREP: Create socket
TEST: Bind socket
TEST: Bind again
TEST: Return value
ERROR: bind call succeeded unexpectedly, returned 0
6 FAILReview Information
Review Type TSMA Review Start Date null Completed null Status Complete Review Recommendation No Resolution Given Review Response
We recommend this request be refused.
The standard does permit a protocol to reuse local addresses, but not
as a default.
The underlying issue here is the setting of SO_REUSEADDR. X/Open standards
defer to POSIX in cases where the standard is vague or unclear.
POSIX.12 states in section 5.3,
SO_REUSEADDR indicates that the rules used in validating
addresses supplied in a bind() should allow reuse of local
addresses. Operation of theis option is protocol-specific.
the defult value for SO_REUSEADDR is off, that is, reuse of
local addresses is not permitted.
Even if the protocol supports local address reuse, the default is to
not permit local address reuse.
Consequently, the second bind should not succeed in the test.
Review Type SA Review Start Date null Completed null Status Complete Review Resolution Rejected (REJ) Review Conclusion
This request is refused.
Problem Reporting System Options:
- View Report 1161
- List All PRs
- Search Reports
- Email the System Administrator
- View the The Open Brand Interpretations Database User Manual
Contact the Certification Authority