kernel-ark/net/ipv4
David L Stevens ca9b907d14 [IPV4]: multicast API "join" issues
This patch corrects a few problems with the IP_ADD_MEMBERSHIP
socket option:

1) The existing code makes an attempt at reference counting joins when
   using the ip_mreqn/imr_ifindex interface. Joining the same group
   on the same socket is an error, whatever the API. This leads to
   unexpected results when mixing ip_mreqn by index with ip_mreqn by
   address, ip_mreq, or other API's. For example, ip_mreq followed by
   ip_mreqn of the same group will "work" while the same two reversed
   will not.
           Fixed to always return EADDRINUSE on a duplicate join and
   removed the (now unused) reference count in ip_mc_socklist.

2) The group-search list in ip_mc_join_group() is comparing a full 
   ip_mreqn structure and all of it must match for it to find the
   group. This doesn't correctly match a group that was joined with
   ip_mreq or ip_mreqn with an address (with or without an index). It
   also doesn't match groups that are joined by different addresses on
   the same interface. All of these are the same multicast group,
   which is identified by group address and interface index.
           Fixed the check to correctly match groups so we don't get
   duplicate group entries on the ip_mc_socklist.

3) The old code allocates a multicast address before searching for
   duplicates requiring it to free in various error cases. This
   patch moves the allocate until after the search and
   igmp_max_memberships check, so never a need to allocate, then free
   an entry.

Signed-off-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-08 17:38:07 -07:00
..
ipvs [IPVS]: Close race conditions on ip_vs_conn_tab list modification 2005-06-28 15:40:02 -07:00
netfilter [NETFILTER]: ipt_CLUSTERIP: fix ARP mangling 2005-06-28 12:49:30 -07:00
af_inet.c [IPV4]: Fix crash in ip_rcv while booting related to netconsole 2005-07-05 14:40:10 -07:00
ah4.c
arp.c
datagram.c
devinet.c
esp4.c
fib_frontend.c
fib_hash.c
fib_lookup.h
fib_rules.c
fib_semantics.c
fib_trie.c [IPV4]: More broken memory allocation fixes for fib_trie 2005-07-05 15:02:40 -07:00
icmp.c [IPV4]: Apply sysctl_icmp_echo_ignore_broadcasts to ICMP_TIMESTAMP as well. 2005-07-08 17:34:46 -07:00
igmp.c [IPV4]: multicast API "join" issues 2005-07-08 17:38:07 -07:00
inetpeer.c
ip_forward.c
ip_fragment.c
ip_gre.c
ip_input.c [IPV4]: Snmpv2 Mib IP counter ipInAddrErrors support 2005-06-28 13:06:23 -07:00
ip_options.c
ip_output.c [IPV4]: Fix crash in ip_rcv while booting related to netconsole 2005-07-05 14:40:10 -07:00
ip_sockglue.c
ipcomp.c
ipconfig.c [IPV4]: ipconfig.c: fix dhcp timeout behaviour 2005-06-28 13:21:12 -07:00
ipip.c
ipmr.c [NETLINK]: Missing initializations in dumped data 2005-06-28 12:55:30 -07:00
Kconfig [TCP]: Let TCP_CONG_ADVANCED default to n 2005-06-26 15:21:15 -07:00
Makefile [TCP]: Add Scalable TCP congestion control module. 2005-06-23 12:29:07 -07:00
multipath_drr.c
multipath_random.c
multipath_rr.c
multipath_wrandom.c
multipath.c
proc.c
protocol.c
raw.c
route.c [IPV4]: Bug fix in rt_check_expire() 2005-07-05 15:00:32 -07:00
syncookies.c
sysctl_net_ipv4.c
tcp_bic.c [TCP]: Add TCP BIC congestion control module. 2005-06-23 12:23:25 -07:00
tcp_cong.c [TCP]: Allow choosing TCP congestion control via sockopt. 2005-06-23 20:37:36 -07:00
tcp_diag.c [TCP]: Report congestion control algorithm in tcp_diag. 2005-06-23 12:21:28 -07:00
tcp_highspeed.c [TCP]: Add High Speed TCP congestion control module. 2005-06-23 12:24:58 -07:00
tcp_htcp.c [TCP]: Add H-TCP congestion control module. 2005-06-23 12:28:11 -07:00
tcp_hybla.c [TCP]: Add TCP Hybla congestion control module. 2005-06-23 12:26:34 -07:00
tcp_input.c [NET]: Transform skb_queue_len() binary tests into skb_queue_empty() 2005-07-08 14:57:23 -07:00
tcp_ipv4.c [TCP]: Move to new TSO segmenting scheme. 2005-07-05 15:24:38 -07:00
tcp_minisocks.c
tcp_output.c [NET]: Fix sparse warnings 2005-07-08 14:57:47 -07:00
tcp_scalable.c [TCP]: Add Scalable TCP congestion control module. 2005-06-23 12:29:07 -07:00
tcp_timer.c [NET]: Transform skb_queue_len() binary tests into skb_queue_empty() 2005-07-08 14:57:23 -07:00
tcp_vegas.c [TCP]: Add TCP Vegas congestion control module. 2005-06-23 12:27:19 -07:00
tcp_westwood.c [TCP]: Add TCP Westwood congestion control module. 2005-06-23 12:24:09 -07:00
tcp.c [NET]: Transform skb_queue_len() binary tests into skb_queue_empty() 2005-07-08 14:57:23 -07:00
udp.c
utils.c
xfrm4_input.c
xfrm4_output.c
xfrm4_policy.c
xfrm4_state.c
xfrm4_tunnel.c