1. 09 7月, 2005 3 次提交
    • D
      [IPV4]: multicast API "join" issues · ca9b907d
      David L Stevens 提交于
              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: NDavid L Stevens <dlstevens@us.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ca9b907d
    • V
      [NET]: Fix sparse warnings · 86a76caf
      Victor Fusco 提交于
      From: Victor Fusco <victor@cetuc.puc-rio.br>
      
      Fix the sparse warning "implicit cast to nocast type"
      Signed-off-by: NVictor Fusco <victor@cetuc.puc-rio.br>
      Signed-off-by: NDomen Puncer <domen@coderock.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      86a76caf
    • D
      [NET]: Transform skb_queue_len() binary tests into skb_queue_empty() · b03efcfb
      David S. Miller 提交于
      This is part of the grand scheme to eliminate the qlen
      member of skb_queue_head, and subsequently remove the
      'list' member of sk_buff.
      
      Most users of skb_queue_len() want to know if the queue is
      empty or not, and that's trivially done with skb_queue_empty()
      which doesn't use the skb_queue_head->qlen member and instead
      uses the queue list emptyness as the test.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b03efcfb
  2. 08 7月, 2005 33 次提交
  3. 07 7月, 2005 4 次提交