Bug #1166

fix random setsockopt failure (EINVAL)

Added by sepherosa almost 6 years ago. Updated over 5 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

Description

Hi all,

Following patch should fix random setsockopt failure (EINVAL) in HEAD:
http://leaf.dragonflybsd.org/~sephe/sockopt.diff

In addition to that:
- Don't do copyout in setsockopt; the user arg is const
- Always setup sopt (i.e. set sopt.sopt_val to NULL early)
- In sys_getsocktopt(), centralize valsize check

Please review/test it.

Best Regard,
sephe

History

#1 Updated by aoiko almost 6 years ago

Looks good. Feeling a bit embarrassed btw :)

Aggelos

#2 Updated by aoiko over 5 years ago

committed by sephe

Also available in: Atom PDF