Some of the uses of setsockopt have the comment /* Ignore the return value, if it fails it fails */, but others do not, so its not clear if it was intentional.
Solution:
Either check the return value, or add a comment
Does this change what S2N sends over the wire? No
Does this change any public APIs? No
Requirements / Acceptance Criteria:
Uses of setsockopt either check the return value or have a comment explaining why it is not checked
Problem:
The return value of
setsockopt
is not checked in several places ins2n_socket.c
, for example: https://github.com/aws/s2n-tls/blob/main/utils/s2n_socket.c#L123Some of the uses of
setsockopt
have the comment/* Ignore the return value, if it fails it fails */
, but others do not, so its not clear if it was intentional.Solution:
Either check the return value, or add a comment
Requirements / Acceptance Criteria:
Uses of
setsockopt
either check the return value or have a comment explaining why it is not checked