https://github.com/torvalds/linux
Revision 05335c2220c4911b69cb1bdd79e603ab08088372 authored by Yang Hongyang on 28 May 2008, 08:23:47 UTC, committed by YOSHIFUJI Hideaki on 04 June 2008, 19:02:34 UTC
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: Yang Hongyang <yanghy@cn.fujitsu.com>
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
1 parent 4bed72e
History
Tip revision: 05335c2220c4911b69cb1bdd79e603ab08088372 authored by Yang Hongyang on 28 May 2008, 08:23:47 UTC
[IPV6]: Fix the return value of get destination options with NULL data pointer
Tip revision: 05335c2
File Mode Size
Documentation
arch
block
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
usr
virt
.gitignore -rw-r--r-- 686 bytes
.mailmap -rw-r--r-- 3.6 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 90.5 KB
Kbuild -rw-r--r-- 2.4 KB
MAINTAINERS -rw-r--r-- 98.3 KB
Makefile -rw-r--r-- 53.8 KB
README -rw-r--r-- 16.5 KB
REPORTING-BUGS -rw-r--r-- 3.1 KB

README

back to top