]> err.no Git - linux-2.6/commit
[INET]: Fix incorrect "inet_sock->is_icsk" assignment.
authorPaul Moore <paul.moore@hp.com>
Fri, 5 Jan 2007 00:56:46 +0000 (16:56 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Tue, 9 Jan 2007 08:29:51 +0000 (00:29 -0800)
commitcbbd7d4f36a61631f8c0d73be43df985d1e7d6a6
tree53bc30da9db871484d137e69aebfcfd29dfda4ed
parentefa06708fe77190f31bed5c3cb5da49e211240f5
[INET]: Fix incorrect "inet_sock->is_icsk" assignment.

The inet_create() and inet6_create() functions incorrectly set the
inet_sock->is_icsk field.  Both functions assume that the is_icsk field is
large enough to hold at least a INET_PROTOSW_ICSK value when it is actually
only a single bit.  This patch corrects the assignment by doing a boolean
comparison whose result will safely fit into a single bit field.

Signed-off-by: Paul Moore <paul.moore@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/af_inet.c
net/ipv6/af_inet6.c