linux-user emulation of setsockopt ignores optlen
Bug #1075339 reported by
Bugdal
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
setsockopt always treats the argument as a 4-byte int. This breaks timeout options (for which it's an 8- or 16-byte timeval structure, depending on word size) and possibly other socket options. int is probably a safe default, but options whose values are other types need special-case conversion code.
To post a comment you must log in.
Agreed; we would ideally be more careful to return ENOTSUP for options we don't know we handle correctly. It would be useful if you said which particular options you were interested in and provided a test case...