Bug 7254 - leaving IP multicast group with incorrect imr_address unexpectedly succeeded
Summary: leaving IP multicast group with incorrect imr_address unexpectedly succeeded
Status: REJECTED INVALID
Alias: None
Product: Networking
Classification: Unclassified
Component: IPV4 (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Stephen Hemminger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-03 07:29 UTC by Konstantin Petrov
Modified: 2006-10-03 22:29 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.18
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Konstantin Petrov 2006-10-03 07:29:00 UTC
Most recent kernel where this bug did not occur:
Distribution:
Hardware Environment: P4 PC
Software Environment:
Problem Description:

When trying to leave IP multicast group with
incorrect imr_address we expect function
setsockopt(s, SOL_IP, IP_DROP_MEMBERSHIP, ip_mreq)
to fail with ERRNO EADDRNOTAVAIL, but it succeeds.

Steps to reproduce:
1) Join socket to IP multicast group
2) Using incorrerct imr_address try to leave 
   IP multicast group

Note:
Probably function ip_mc_leave_group(...) in the
file /net/ipv4/igmp.c "forgets" to check imr_address when
imr_ifindex is OK.
Comment 1 Andrew Morton 2006-10-03 09:57:04 UTC
On Tue, 3 Oct 2006 07:40:04 -0700
bugme-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=7254
> 
>            Summary: leaving IP multicast group with incorrect imr_address
>                     unexpectedly succeeded
>     Kernel Version: 2.6.18
>             Status: NEW
>           Severity: normal
>              Owner: shemminger@osdl.org
>          Submitter: Konstantin.Petrov@oktetlabs.ru
>                 CC: Alexandra.Kossovsky@oktetlabs.ru
> 
> 
> Most recent kernel where this bug did not occur:
> Distribution:
> Hardware Environment: P4 PC
> Software Environment:
> Problem Description:
> 
> When trying to leave IP multicast group with
> incorrect imr_address we expect function
> setsockopt(s, SOL_IP, IP_DROP_MEMBERSHIP, ip_mreq)
> to fail with ERRNO EADDRNOTAVAIL, but it succeeds.
> 
> Steps to reproduce:
> 1) Join socket to IP multicast group
> 2) Using incorrerct imr_address try to leave 
>    IP multicast group
> 
> Note:
> Probably function ip_mc_leave_group(...) in the
> file /net/ipv4/igmp.c "forgets" to check imr_address when
> imr_ifindex is OK.
> 
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.

Comment 2 Anonymous Emailer 2006-10-03 11:22:39 UTC
Reply-To: dlstevens@us.ibm.com

If the index is set, it doesn't look up the address (which may be 
expensive).
If you want to look up by address, the index must be 0.

I wouldn't  call that a bug.

                                        +-DLS

Comment 3 Anonymous Emailer 2006-10-03 13:37:07 UTC
Reply-To: davem@davemloft.net

From: David Stevens <dlstevens@us.ibm.com>
Date: Tue, 3 Oct 2006 11:33:07 -0700

> If the index is set, it doesn't look up the address (which may be 
> expensive).
> If you want to look up by address, the index must be 0.
> 
> I wouldn't  call that a bug.

Me neither, Andrew please close this. :)

Comment 4 Konstantin Petrov 2006-10-03 22:29:53 UTC
I see, vielen dank :)

Note You need to log in before you can comment on or make changes to this bug.