linux/net
Shan Wei 0915921bde ipv4: check optlen for IP_MULTICAST_IF option
Due to man page of setsockopt, if optlen is not valid, kernel should return
-EINVAL. But a simple testcase as following, errno is 0, which means setsockopt
is successful.
	addr.s_addr = inet_addr("192.1.2.3");
	setsockopt(s, IPPROTO_IP, IP_MULTICAST_IF, &addr, 1);
	printf("errno is %d\n", errno);

Xiaotian Feng(dfeng@redhat.com) caught the bug. We fix it firstly checking
the availability of optlen and then dealing with the logic like other options.

Reported-by: Xiaotian Feng <dfeng@redhat.com>
Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Acked-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-09-24 15:38:44 -07:00
..
9p virtio: add virtio IDs file 2009-09-23 22:26:32 +09:30
802
8021q vlan: adds drops accounting 2009-09-03 20:02:17 -07:00
appletalk Have atalk_route_packet() return NET_RX_SUCCESS not NET_XMIT_SUCCESS 2009-09-14 17:02:47 -07:00
atm atm/br2684: netif_stop_queue() when atm device busy and netif_wake_queue() when we can send packets again. 2009-09-02 23:46:10 -07:00
ax25 ax25: Fix SIOCAX25GETINFO ioctl 2009-09-22 14:00:14 -07:00
bluetooth Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2009-09-22 07:51:28 -07:00
bridge sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
can can: fix NOHZ local_softirq_pending 08 warning 2009-09-15 01:31:34 -07:00
core mm: replace various uses of num_physpages by totalram_pages 2009-09-22 07:17:38 -07:00
dcb dcbnl: Add implementations of dcbnl setapp/getapp commands 2009-09-01 01:24:36 -07:00
dccp mm: replace various uses of num_physpages by totalram_pages 2009-09-22 07:17:38 -07:00
decnet sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
dsa netdev: convert pseudo-devices to netdev_tx_t 2009-09-01 01:13:07 -07:00
econet Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-08-12 17:44:53 -07:00
ethernet
ieee802154 ieee802154: add locking for seq numbers 2009-09-15 18:25:16 +04:00
ipv4 ipv4: check optlen for IP_MULTICAST_IF option 2009-09-24 15:38:44 -07:00
ipv6 sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
ipx
irda sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
iucv af_iucv: fix race when queueing skbs on the backlog queue 2009-09-16 20:57:39 -07:00
key net: file_operations should be const 2009-09-02 01:03:53 -07:00
lapb
llc Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
mac80211 mac80211: fix DTIM setting 2009-09-23 11:35:53 -04:00
netfilter sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
netlabel
netlink mm: replace various uses of num_physpages by totalram_pages 2009-09-22 07:17:38 -07:00
netrom Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-02 00:32:56 -07:00
packet
phonet sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
rds Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6 2009-09-17 20:53:52 -07:00
rfkill
rose net: constify remaining proto_ops 2009-09-14 17:03:09 -07:00
rxrpc trivial: fix typo "to to" in multiple files 2009-09-21 15:14:55 +02:00
sched trivial: fix typo "to to" in multiple files 2009-09-21 15:14:55 +02:00
sctp mm: replace various uses of num_physpages by totalram_pages 2009-09-22 07:17:38 -07:00
sunrpc sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
tipc tipc: fix test of bearer_priority range in tipc_register_media() 2009-08-29 00:19:42 -07:00
unix net: unix: fix sending fds in multiple buffers 2009-09-11 11:31:45 -07:00
wanrouter
wimax
wireless Merge branch 'master' of /home/davem/src/GIT/linux-2.6/ 2009-09-24 15:13:11 -07:00
x25
xfrm net: file_operations should be const 2009-09-02 01:03:53 -07:00
compat.c
Kconfig
Makefile net: remove redundant sched/ in net/Makefile 2009-07-12 20:11:14 -07:00
nonet.c
socket.c Move magic numbers into magic.h 2009-09-23 07:39:28 -07:00
sysctl_net.c
TUNABLE Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00