09 Jul, 2005

10 commits

  • Signed-off-by: David S. Miller

    David S. Miller
     
  • Signed-off-by: David S. Miller

    David S. Miller
     
  • This patch fixes the multicast group matching for
    IP_DROP_MEMBERSHIP, similar to the IP_ADD_MEMBERSHIP fix in a prior
    patch. Groups are identifiedby and including
    the interface address in the match will fail if a leave-group is done
    by address when the join was done by index, or if different addresses
    on the same interface are used in the join and leave.

    Signed-off-by: David L Stevens
    Signed-off-by: David S. Miller

    David L Stevens
     
  • 1) Adds (INCLUDE, empty)/leave-group equivalence to the full-state
    multicast source filter APIs (IPv4 and IPv6)

    2) Fixes an incorrect errno in the IPv6 leave-group (ENOENT should be
    EADDRNOTAVAIL)

    Signed-off-by: David L Stevens
    Signed-off-by: David S. Miller

    David L Stevens
     
  • 1) In the full-state API when imsf_numsrc == 0
    errno should be "0", but returns EADDRNOTAVAIL

    2) An illegal filter mode change
    errno should be EINVAL, but returns EADDRNOTAVAIL

    3) Trying to do an any-source option without IP_ADD_MEMBERSHIP
    errno should be EINVAL, but returns EADDRNOTAVAIL

    4) Adds comments for the less obvious error return values

    Signed-off-by: David L Stevens
    Signed-off-by: David S. Miller

    David L Stevens
     
  • 1) Changes IP_ADD_SOURCE_MEMBERSHIP and MCAST_JOIN_SOURCE_GROUP to ignore
    EADDRINUSE errors on a "courtesy join" -- prior membership or not
    is ok for these.

    2) Adds "leave group" equivalence of (INCLUDE, empty) filters in the
    delta-based API. Without this, mixing delta-based API calls that
    end in an (INCLUDE, empty) filter would not allow a subsequent
    regular IP_ADD_MEMBERSHIP. It also frees socket buffer memory that
    isn't needed for both the multicast group record and source filter.

    Signed-off-by: David L Stevens
    Signed-off-by: David S. Miller

    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: David L Stevens
    Signed-off-by: David S. Miller

    David L Stevens
     
  • This was the full intention of the original code.

    Signed-off-by: David S. Miller

    Alexey Kuznetsov
     
  • From: Victor Fusco

    Fix the sparse warning "implicit cast to nocast type"

    Signed-off-by: Victor Fusco
    Signed-off-by: Domen Puncer
    Signed-off-by: David S. Miller

    Victor Fusco
     
  • 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: David S. Miller

    David S. Miller
     

08 Jul, 2005

1 commit

  • In __xprt_lock_write() we check to see if `task' is NULL, but in other places
    we just go and dereference it.

    `task' shouldn't be NULL anyway, so remove this test.

    This defect was found automatically by Coverity Prevent, a static analysis
    tool.

    Signed-off-by: Zaur Kambarov
    Acked-by: Trond Myklebust
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMBAROV, ZAUR
     

06 Jul, 2005

29 commits