CTCaer-ICS-Xperia2011/net
CTCaer b7c5750375 Merged from Lupus: ipv4: force_igmp_version ignored when a IGMPv3 query received
After all these years, it turns out that the
    /proc/sys/net/ipv4/conf/*/force_igmp_version
parameter isn't fully implemented.

*Symptom*:
When set force_igmp_version to a value of 2, the kernel should only perform
multicast IGMPv2 operations (IETF rfc2236).  An host-initiated Join message
will be sent as a IGMPv2 Join message.  But if a IGMPv3 query message is
received, the host responds with a IGMPv3 join message.  Per rfc3376 and
rfc2236, a IGMPv2 host should treat a IGMPv3 query as a IGMPv2 query and
respond with an IGMPv2 Join message.

*Consequences*:
This is an issue when a IGMPv3 capable switch is the querier and will only
issue IGMPv3 queries (which double as IGMPv2 querys) and there's an
intermediate switch that is only IGMPv2 capable.  The intermediate switch
processes the initial v2 Join, but fails to recognize the IGMPv3 Join responses
to the Query, resulting in a dropped connection when the intermediate v2-only
switch times it out.

*Identifying issue in the kernel source*:
The issue is in this section of code (in net/ipv4/igmp.c), which is called when
an IGMP query is received  (from mainline 2.6.36-rc3 gitweb):
 ...
A IGMPv3 query has a length >= 12 and no sources.  This routine will exit after
line 880, setting the general query timer (random timeout between 0 and query
response time).  This calls igmp_gq_timer_expire():
...
.. which only sends a v3 response.  So if a v3 query is received, the kernel
always sends a v3 response.

IGMP queries happen once every 60 sec (per vlan), so the traffic is low.  A
IGMPv3 query *is* a strict superset of a IGMPv2 query, so this patch properly
short circuit's the v3 behaviour.

One issue is that this does not address force_igmp_version=1.  Then again, I've
never seen any IGMPv1 multicast equipment in the wild.  However there is a lot
of v2-only equipment. If it's necessary to support the IGMPv1 case as well:

837         if (len == 8 || IGMP_V2_SEEN(in_dev) || IGMP_V1_SEEN(in_dev)) {

Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-05 10:17:09 +02:00
..
9p Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
802 Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
8021q Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
appletalk Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
atm Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
ax25 Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
bluetooth Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
bridge Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
can Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
core Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
dcb Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
dccp Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
decnet Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
dsa Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
econet Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
ethernet Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
ieee802154 Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
ipv4 Merged from Lupus: ipv4: force_igmp_version ignored when a IGMPv3 query received 2013-03-05 10:17:09 +02:00
ipv6 Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
ipx Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
irda Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
iucv Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
key Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
lapb Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
llc Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
mac80211 Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
netfilter Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
netlabel Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
netlink Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
netrom Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
packet Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
phonet Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
rds Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
rfkill Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
rose Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
rxrpc Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
sched Merged from Lupus: net sched: fix some kernel memory leaks 2013-03-05 10:13:19 +02:00
sctp Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
sunrpc Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
tipc Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
unix Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
wanrouter Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
wimax Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
wireless Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
x25 Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
xfrm Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
compat.c Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
Kconfig Revert-Remove built in wifi: "Added built in Wifi" 2012-12-21 22:15:05 +00:00
Makefile Revert-Remove built in wifi: "Added built in Wifi" 2012-12-21 22:15:05 +00:00
nonet.c Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
socket.c Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
sysctl_net.c Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00
TUNABLE Initial commit of 4.1.B.0.587 source from SONY 2012-11-13 10:32:52 +00:00