<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/ipv4/igmp.c, branch linux-2.6.32.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.32.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-2.6.32.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-01-29T21:12:47Z</updated>
<entry>
<title>ipv4: igmp: Allow removing groups from a removed interface</title>
<updated>2016-01-29T21:12:47Z</updated>
<author>
<name>Andrew Lunn</name>
</author>
<published>2015-12-01T15:31:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5f4876761cb8a57db5cb8dc856961b6a24944c67'/>
<id>urn:sha1:5f4876761cb8a57db5cb8dc856961b6a24944c67</id>
<content type='text'>
commit 4eba7bb1d72d9bde67d810d09bf62dc207b63c5c upstream.

When a multicast group is joined on a socket, a struct ip_mc_socklist
is appended to the sockets mc_list containing information about the
joined group.

If the interface is hot unplugged, this entry becomes stale. Prior to
commit 52ad353a5344f ("igmp: fix the problem when mc leave group") it
was possible to remove the stale entry by performing a
IP_DROP_MEMBERSHIP, passing either the old ifindex or ip address on
the interface. However, this fix enforces that the interface must
still exist. Thus with time, the number of stale entries grows, until
sysctl_igmp_max_memberships is reached and then it is not possible to
join and more groups.

The previous patch fixes an issue where a IP_DROP_MEMBERSHIP is
performed without specifying the interface, either by ifindex or ip
address. However here we do supply one of these. So loosen the
restriction on device existence to only apply when the interface has
not been specified. This then restores the ability to clean up the
stale entries.

Signed-off-by: Andrew Lunn &lt;andrew@lunn.ch&gt;
Fixes: 52ad353a5344f "(igmp: fix the problem when mc leave group")
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
[bwh: Backported to 3.2: adjust context]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
(cherry picked from commit b1fa852672fb1ea4b0e34bfa1136bb65dba66151)
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>igmp: fix the problem when mc leave group</title>
<updated>2014-11-23T09:55:38Z</updated>
<author>
<name>dingtianhong</name>
</author>
<published>2014-07-02T05:50:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=540e9ab0a30cd3954352d3c80ff7d404b17ec0e1'/>
<id>urn:sha1:540e9ab0a30cd3954352d3c80ff7d404b17ec0e1</id>
<content type='text'>
[ Upstream commit 52ad353a5344f1f700c5b777175bdfa41d3cd65a ]

The problem was triggered by these steps:

1) create socket, bind and then setsockopt for add mc group.
   mreq.imr_multiaddr.s_addr = inet_addr("255.0.0.37");
   mreq.imr_interface.s_addr = inet_addr("192.168.1.2");
   setsockopt(sockfd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &amp;mreq, sizeof(mreq));

2) drop the mc group for this socket.
   mreq.imr_multiaddr.s_addr = inet_addr("255.0.0.37");
   mreq.imr_interface.s_addr = inet_addr("0.0.0.0");
   setsockopt(sockfd, IPPROTO_IP, IP_DROP_MEMBERSHIP, &amp;mreq, sizeof(mreq));

3) and then drop the socket, I found the mc group was still used by the dev:

   netstat -g

   Interface       RefCnt Group
   --------------- ------ ---------------------
   eth2		   1	  255.0.0.37

Normally even though the IP_DROP_MEMBERSHIP return error, the mc group still need
to be released for the netdev when drop the socket, but this process was broken when
route default is NULL, the reason is that:

The ip_mc_leave_group() will choose the in_dev by the imr_interface.s_addr, if input addr
is NULL, the default route dev will be chosen, then the ifindex is got from the dev,
then polling the inet-&gt;mc_list and return -ENODEV, but if the default route dev is NULL,
the in_dev and ifIndex is both NULL, when polling the inet-&gt;mc_list, the mc group will be
released from the mc_list, but the dev didn't dec the refcnt for this mc group, so
when dropping the socket, the mc_list is NULL and the dev still keep this group.

v1-&gt;v2: According Hideaki's suggestion, we should align with IPv6 (RFC3493) and BSDs,
	so I add the checking for the in_dev before polling the mc_list, make sure when
	we remove the mc group, dec the refcnt to the real dev which was using the mc address.
	The problem would never happened again.

Signed-off-by: Ding Tianhong &lt;dingtianhong@huawei.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>ipv4 igmp: use in_dev_put in timer handlers instead of __in_dev_put</title>
<updated>2014-05-19T05:53:39Z</updated>
<author>
<name>Salam Noureddine</name>
</author>
<published>2013-09-29T20:39:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5d71a2b371009a57b90b325012e0150b2c65076d'/>
<id>urn:sha1:5d71a2b371009a57b90b325012e0150b2c65076d</id>
<content type='text'>
[ Upstream commit e2401654dd0f5f3fb7a8d80dad9554d73d7ca394 ]

It is possible for the timer handlers to run after the call to
ip_mc_down so use in_dev_put instead of __in_dev_put in the handler
function in order to do proper cleanup when the refcnt reaches 0.
Otherwise, the refcnt can reach zero without the in_device being
destroyed and we end up leaking a reference to the net_device and
see messages like the following,

unregister_netdevice: waiting for eth0 to become free. Usage count = 1

Tested on linux-3.4.43.

Signed-off-by: Salam Noureddine &lt;noureddine@aristanetworks.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
</entry>
<entry>
<title>inet: Remove bogus IGMPv3 report handling</title>
<updated>2010-03-15T15:49:39Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2010-02-07T17:26:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=90a362e9ee4a793cff24c7c77db10a7bf4ccabdd'/>
<id>urn:sha1:90a362e9ee4a793cff24c7c77db10a7bf4ccabdd</id>
<content type='text'>
[ Upstream commit c6b471e6454c0e1c6d756672841cbaeae7c949f8 ]

Currently we treat IGMPv3 reports as if it were an IGMPv2/v1 report.
This is broken as IGMPv3 reports are formatted differently.  So we
end up suppressing a bogus multicast group (which should be harmless
as long as the leading reserved field is zero).

In fact, IGMPv3 does not allow membership report suppression so
we should simply ignore IGMPv3 membership reports as a host.

This patch does exactly that.  I kept the case statement for it
so people won't accidentally add it back thinking that we overlooked
this case.

Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>bonding: remap muticast addresses without using dev_close() and dev_open()</title>
<updated>2009-09-15T09:37:40Z</updated>
<author>
<name>Moni Shoua</name>
</author>
<published>2009-09-15T09:37:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=75c78500ddad74b229cd0691496b8549490496a2'/>
<id>urn:sha1:75c78500ddad74b229cd0691496b8549490496a2</id>
<content type='text'>
This patch fixes commit e36b9d16c6a6d0f59803b3ef04ff3c22c3844c10. The approach
there is to call dev_close()/dev_open() whenever the device type is changed in
order to remap the device IP multicast addresses to HW multicast addresses.
This approach suffers from 2 drawbacks:

*. It assumes tha the device is UP when calling dev_close(), or otherwise
   dev_close() has no affect. It is worth to mention that initscripts (Redhat)
   and sysconfig (Suse) doesn't act the same in this matter. 
*. dev_close() has other side affects, like deleting entries from the routing
   table, which might be unnecessary.

The fix here is to directly remap the IP multicast addresses to HW multicast
addresses for a bonding device that changes its type, and nothing else.
   
Reported-by:   Jason Gunthorpe &lt;jgunthorpe@obsidianresearch.com&gt;
Signed-off-by: Moni Shoua &lt;monis@voltaire.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: skb-&gt;dst accessors</title>
<updated>2009-06-03T09:51:04Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2009-06-02T05:19:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=adf30907d63893e4208dfe3f5c88ae12bc2f25d5'/>
<id>urn:sha1:adf30907d63893e4208dfe3f5c88ae12bc2f25d5</id>
<content type='text'>
Define three accessors to get/set dst attached to a skb

struct dst_entry *skb_dst(const struct sk_buff *skb)

void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)

void skb_dst_drop(struct sk_buff *skb)
This one should replace occurrences of :
dst_release(skb-&gt;dst)
skb-&gt;dst = NULL;

Delete skb-&gt;dst field

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: skb-&gt;rtable accessor</title>
<updated>2009-06-03T09:51:02Z</updated>
<author>
<name>Eric Dumazet</name>
</author>
<published>2009-06-02T05:14:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=511c3f92ad5b6d9f8f6464be1b4f85f0422be91a'/>
<id>urn:sha1:511c3f92ad5b6d9f8f6464be1b4f85f0422be91a</id>
<content type='text'>
Define skb_rtable(const struct sk_buff *skb) accessor to get rtable from skb

Delete skb-&gt;rtable field

Setting rtable is not allowed, just set dst instead as rtable is an alias.

Signed-off-by: Eric Dumazet &lt;eric.dumazet@gmail.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>ipv4: New multicast-all socket option</title>
<updated>2009-06-02T07:45:24Z</updated>
<author>
<name>Nivedita Singhvi</name>
</author>
<published>2009-05-28T07:00:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f771bef98004d9d141b085d987a77d06669d4f4f'/>
<id>urn:sha1:f771bef98004d9d141b085d987a77d06669d4f4f</id>
<content type='text'>
After some discussion offline with Christoph Lameter and David Stevens
regarding multicast behaviour in Linux, I'm submitting a slightly
modified patch from the one Christoph submitted earlier.

This patch provides a new socket option IP_MULTICAST_ALL.

In this case, default behaviour is _unchanged_ from the current
Linux standard. The socket option is set by default to provide
original behaviour. Sockets wishing to receive data only from
multicast groups they join explicitly will need to clear this
socket option.

Signed-off-by: Nivedita Singhvi &lt;niv@us.ibm.com&gt;
Signed-off-by: Christoph Lameter&lt;cl@linux.com&gt;
Acked-by: David Stevens &lt;dlstevens@us.ibm.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netns: igmp: make /proc/net/{igmp,mcfilter} per netns</title>
<updated>2008-12-26T00:42:51Z</updated>
<author>
<name>Alexey Dobriyan</name>
</author>
<published>2008-12-26T00:42:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7091e728c570157496e52296d2dbe816a6916836'/>
<id>urn:sha1:7091e728c570157496e52296d2dbe816a6916836</id>
<content type='text'>
This patch makes the followinf proc entries per-netns:
/proc/net/igmp
/proc/net/mcfilter

Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Acked-by: Daniel Lezcano &lt;dlezcano@fr.ibm.com&gt;
Acked-by: Benjamin Thery &lt;benjamin.thery@bull.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: clean up net/ipv4/igmp.c</title>
<updated>2008-11-03T08:26:09Z</updated>
<author>
<name>Jianjun Kong</name>
</author>
<published>2008-11-03T08:26:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7e9ff735bd5e3437a8e5ecbbc2db3865974a523'/>
<id>urn:sha1:a7e9ff735bd5e3437a8e5ecbbc2db3865974a523</id>
<content type='text'>
Signed-off-by: Jianjun Kong &lt;jianjun@zeuux.org&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
</feed>
