[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(usagi-users 00367) IPV6_JOIN_GROUP in 2.2.x



In kernel22
/net/ipv6/ipv6_sockglue.c:ipv6_setsockopt()

| case IPV6_JOIN_GROUP:
| case IPV6_LEAVE_GROUP:
| {
|         struct ipv6_mreq mreq;
| 
|         if (optlen != sizeof(int))
|                 return -EINVAL;

Variable "optlen" must be compared with "sizeof(struct ipv6_mreq)"
instead of "sizeof(int)". Now, if application call setsockopt() with
IPV6_JOIN_GROUP and correct optlen (not int), it will return error.

In kernel24, "optlen" is compared with "sizeof(struct ipv6_mreq)"
correctly.