Skip to content

Commit

Permalink
linux-user: add some IPV6 commands in setsockop()
Browse files Browse the repository at this point in the history
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
  • Loading branch information
vivier authored and Riku Voipio committed Sep 24, 2013
1 parent bd00c74 commit 0d78b3b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions linux-user/syscall.c
Original file line number Diff line number Diff line change
Expand Up @@ -1315,6 +1315,26 @@ static abi_long do_setsockopt(int sockfd, int level, int optname,
goto unimplemented;
}
break;
case SOL_IPV6:
switch (optname) {
case IPV6_MTU_DISCOVER:
case IPV6_MTU:
case IPV6_V6ONLY:
case IPV6_RECVPKTINFO:
val = 0;
if (optlen < sizeof(uint32_t)) {
return -TARGET_EINVAL;
}
if (get_user_u32(val, optval_addr)) {
return -TARGET_EFAULT;
}
ret = get_errno(setsockopt(sockfd, level, optname,
&val, sizeof(val)));
break;
default:
goto unimplemented;
}
break;
case SOL_RAW:
switch (optname) {
case ICMP_FILTER:
Expand Down

0 comments on commit 0d78b3b

Please sign in to comment.