linux-user: add some IPV6 commands in setsockop()
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>
This commit is contained in:
parent
bd00c74c7f
commit
0d78b3b5b1
@ -1315,6 +1315,26 @@ static abi_long do_setsockopt(int sockfd, int level, int optname,
|
|||||||
goto unimplemented;
|
goto unimplemented;
|
||||||
}
|
}
|
||||||
break;
|
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:
|
case SOL_RAW:
|
||||||
switch (optname) {
|
switch (optname) {
|
||||||
case ICMP_FILTER:
|
case ICMP_FILTER:
|
||||||
|
Loading…
Reference in New Issue
Block a user