Skip to content
Commit 05335c22 authored by Yang Hongyang's avatar Yang Hongyang Committed by YOSHIFUJI Hideaki
Browse files

[IPV6]: Fix the return value of get destination options with NULL data pointer



If we pass NULL data buffer to getsockopt(), it will return 0,
and the option length is set to -EFAULT:
    getsockopt(sk, IPPROTO_IPV6, IPV6_DSTOPTS, NULL, &len);

This is because ipv6_getsockopt_sticky() will return -EFAULT or
-EINVAL if some error occur.

This patch fix this problem.

Signed-off-by: default avatarYang Hongyang <yanghy@cn.fujitsu.com>
Signed-off-by: default avatarYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
parent 4bed72e4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment