linux/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 [IPSEC]: Add xfrm_init_state 2005-06-20 13:18:08 -07:00
arp.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
datagram.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
devinet.c [PATCH] create a kstrdup library function 2005-06-23 09:45:18 -07:00
esp4.c [IPSEC]: Add xfrm_init_state 2005-06-20 13:18:08 -07:00
fib_frontend.c [NETLINK]: fib_lookup() via netlink 2005-06-20 13:36:39 -07:00
fib_hash.c [NETLINK]: Correctly set NLM_F_MULTI without checking the pid 2005-06-18 22:54:12 -07:00
fib_lookup.h [NETLINK]: Correctly set NLM_F_MULTI without checking the pid 2005-06-18 22:54:12 -07:00
fib_rules.c [NETLINK]: Correctly set NLM_F_MULTI without checking the pid 2005-06-18 22:54:12 -07:00
fib_semantics.c [NETLINK]: Set correct pid for ioctl originating netlink events 2005-06-18 22:55:51 -07:00
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 Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_forward.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_fragment.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_gre.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ip_input.c [IPV4]: Snmpv2 Mib IP counter ipInAddrErrors support 2005-06-28 13:06:23 -07:00
ip_options.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
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 [IPV4/IPV6]: Replace spin_lock_irq with spin_lock_bh 2005-06-18 22:56:18 -07:00
ipcomp.c [IPSEC]: Add xfrm_init_state 2005-06-20 13:18:08 -07:00
ipconfig.c [IPV4]: ipconfig.c: fix dhcp timeout behaviour 2005-06-28 13:21:12 -07:00
ipip.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
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 [IPV4]: Multipath modules need a license to prevent kernel tainting. 2005-06-13 14:29:06 -07:00
multipath_random.c [IPV4]: Multipath modules need a license to prevent kernel tainting. 2005-06-13 14:29:06 -07:00
multipath_rr.c [IPV4]: Multipath modules need a license to prevent kernel tainting. 2005-06-13 14:29:06 -07:00
multipath_wrandom.c [IPV4]: Multipath modules need a license to prevent kernel tainting. 2005-06-13 14:29:06 -07:00
multipath.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
proc.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
protocol.c [PATCH] update Ross Biro bouncing email address 2005-05-05 16:36:49 -07:00
raw.c [IPV4]: [4/4] signed vs unsigned cleanup in net/ipv4/raw.c 2005-06-18 23:00:34 -07:00
route.c [IPV4]: Bug fix in rt_check_expire() 2005-07-05 15:00:32 -07:00
syncookies.c [NET] Rename open_request to request_sock 2005-06-18 22:47:21 -07:00
sysctl_net_ipv4.c [TCP]: Add pluggable congestion control algorithm infrastructure. 2005-06-23 12:19:55 -07:00
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]: Add pluggable congestion control algorithm infrastructure. 2005-06-23 12:19:55 -07:00
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 [IPV4]: Fix BUG() in 2.6.x, udp_poll(), fragments + CONFIG_HIGHMEM 2005-05-30 15:50:15 -07:00
utils.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
xfrm4_input.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
xfrm4_output.c [IPSEC]: Add XFRM_STATE_NOPMTUDISC flag 2005-06-20 13:21:43 -07:00
xfrm4_policy.c [IPSEC]: Store idev entries 2005-05-03 16:27:10 -07:00
xfrm4_state.c [IPSEC]: Add XFRM_STATE_NOPMTUDISC flag 2005-06-20 13:21:43 -07:00
xfrm4_tunnel.c [IPSEC]: Add xfrm_init_state 2005-06-20 13:18:08 -07:00