13 Jun, 2008

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    tcp: Revert 'process defer accept as established' changes.
    ipv6: Fix duplicate initialization of rawv6_prot.destroy
    bnx2x: Updating the Maintainer
    net: Eliminate flush_scheduled_work() calls while RTNL is held.
    drivers/net/r6040.c: correct bad use of round_jiffies()
    fec_mpc52xx: MPC52xx_MESSAGES_DEFAULT: 2nd NETIF_MSG_IFDOWN => IFUP
    ipg: fix receivemode IPG_RM_RECEIVEMULTICAST{,HASH} in ipg_nic_set_multicast_list()
    netfilter: nf_conntrack: fix ctnetlink related crash in nf_nat_setup_info()
    netfilter: Make nflog quiet when no one listen in userspace.
    ipv6: Fail with appropriate error code when setting not-applicable sockopt.
    ipv6: Check IPV6_MULTICAST_LOOP option value.
    ipv6: Check the hop limit setting in ancillary data.
    ipv6 route: Fix route lifetime in netlink message.
    ipv6 mcast: Check address family of gf_group in getsockopt(MS_FILTER).
    dccp: Bug in initial acknowledgment number assignment
    dccp ccid-3: X truncated due to type conversion
    dccp ccid-3: TFRC reverse-lookup Bug-Fix
    dccp ccid-2: Bug-Fix - Ack Vectors need to be ignored on request sockets
    dccp: Fix sparse warnings
    dccp ccid-3: Bug-Fix - Zero RTT is possible

    Linus Torvalds
     
  • In changeset 22dd485022f3d0b162ceb5e67d85de7c3806aa20
    ("raw: Raw socket leak.") code was added so that we
    flush pending frames on raw sockets to avoid leaks.

    The ipv4 part was fine, but the ipv6 part was not
    done correctly. Unlike the ipv4 side, the ipv6 code
    already has a .destroy method for rawv6_prot.

    So now there were two assignments to this member, and
    what the compiler does is use the last one, effectively
    making the ipv6 parts of that changeset a NOP.

    Fix this by removing the:

    .destroy = inet6_destroy_sock,

    line, and adding an inet6_destroy_sock() call to the
    end of raw6_destroy().

    Noticed by Al Viro.

    Signed-off-by: David S. Miller
    Acked-by: YOSHIFUJI Hideaki

    David S. Miller
     

12 Jun, 2008

5 commits


11 Jun, 2008

2 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits)
    net: Fix routing tables with id > 255 for legacy software
    sky2: Hold RTNL while calling dev_close()
    s2io iomem annotations
    atl1: fix suspend regression
    qeth: start dev queue after tx drop error
    qeth: Prepare-function to call s390dbf was wrong
    qeth: reduce number of kernel messages
    qeth: Use ccw_device_get_id().
    qeth: layer 3 Oops in ip event handler
    virtio: use callback on empty in virtio_net
    virtio: virtio_net free transmit skbs in a timer
    virtio: Fix typo in virtio_net_hdr comments
    virtio_net: Fix skb->csum_start computation
    ehea: set mac address fix
    sfc: Recover from RX queue flush failure
    add missing lance_* exports
    ixgbe: fix typo
    forcedeth: msi interrupts
    ipsec: pfkey should ignore events when no listeners
    pppoe: Unshare skb before anything else
    ...

    Linus Torvalds
     
  • Wei Yongjun noticed that we may call reqsk_free on request sock objects where
    the opt fields may not be initialized, fix it by introducing inet_reqsk_alloc
    where we initialize ->opt to NULL and set ->pktopts to NULL in
    inet6_reqsk_alloc.

    Signed-off-by: Arnaldo Carvalho de Melo
    Signed-off-by: David S. Miller

    Arnaldo Carvalho de Melo
     

10 Jun, 2008

1 commit


05 Jun, 2008

15 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (56 commits)
    l2tp: Fix possible oops if transmitting or receiving when tunnel goes down
    tcp: Fix for race due to temporary drop of the socket lock in skb_splice_bits.
    tcp: Increment OUTRSTS in tcp_send_active_reset()
    raw: Raw socket leak.
    lt2p: Fix possible WARN_ON from socket code when UDP socket is closed
    USB ID for Philips CPWUA054/00 Wireless USB Adapter 11g
    ssb: Fix context assertion in ssb_pcicore_dev_irqvecs_enable
    libertas: fix command size for CMD_802_11_SUBSCRIBE_EVENT
    ipw2200: expire and use oldest BSS on adhoc create
    airo warning fix
    b43legacy: Fix controller restart crash
    sctp: Fix ECN markings for IPv6
    sctp: Flush the queue only once during fast retransmit.
    sctp: Start T3-RTX timer when fast retransmitting lowest TSN
    sctp: Correctly implement Fast Recovery cwnd manipulations.
    sctp: Move sctp_v4_dst_saddr out of loop
    sctp: retran_path update bug fix
    tcp: fix skb vs fack_count out-of-sync condition
    sunhme: Cleanup use of deprecated calls to save_and_cli and restore_flags.
    xfrm: xfrm_algo: correct usage of RIPEMD-160
    ...

    Linus Torvalds
     
  • The program below just leaks the raw kernel socket

    int main() {
    int fd = socket(PF_INET, SOCK_RAW, IPPROTO_UDP);
    struct sockaddr_in addr;

    memset(&addr, 0, sizeof(addr));
    inet_aton("127.0.0.1", &addr.sin_addr);
    addr.sin_family = AF_INET;
    addr.sin_port = htons(2048);
    sendto(fd, "a", 1, MSG_MORE, &addr, sizeof(addr));
    return 0;
    }

    Corked packet is allocated via sock_wmalloc which holds the owner socket,
    so one should uncork it and flush all pending data on close. Do this in the
    same way as in UDP.

    Signed-off-by: Denis V. Lunev
    Acked-by: Alexey Kuznetsov
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • David S. Miller
     
  • Signed-off-by: Denis V. Lunev
    Signed-off-by: YOSHIFUJI Hideaki

    Denis V. Lunev
     
  • IPv6 UDP sockets wth IPv4 mapped address use udp_sendmsg to send the data
    actually. In this case ip_flush_pending_frames should be called instead
    of ip6_flush_pending_frames.

    Signed-off-by: Denis V. Lunev
    Signed-off-by: YOSHIFUJI Hideaki

    Denis V. Lunev
     
  • It is not allowed to change underlying protocol for
    int fd = socket(PF_INET6, SOCK_RAW, IPPROTO_UDP);

    Signed-off-by: Denis V. Lunev
    Signed-off-by: YOSHIFUJI Hideaki

    Denis V. Lunev
     
  • Signed-off-by: YOSHIFUJI Hideaki

    YOSHIFUJI Hideaki
     
  • The outgoing interface index (ipi6_ifindex) in IPV6_PKTINFO
    ancillary data, is not checked if the source address (ipi6_addr)
    is unspecified. If the ipi6_ifindex is the not-exist interface,
    it should be fail.

    Based on patch from Shan Wei and
    Brian Haley .

    Signed-off-by: Shan Wei
    Signed-off-by: Brian Haley
    Signed-off-by: YOSHIFUJI Hideaki

    YOSHIFUJI Hideaki
     
  • If get destination options with length which is not enough for that
    option,getsockopt() will still return the real length of the option,
    which is larger then the buffer space.
    This is because ipv6_getsockopt_sticky() returns the real length of
    the option.

    This patch fix this problem.

    Signed-off-by: Yang Hongyang
    Signed-off-by: YOSHIFUJI Hideaki

    Yang Hongyang
     
  • If we pass NULL data buffer to getsockopt(), it will return 0,
    and the option length is set to -EFAULT:
    getsockopt(sk, IPPROTO_IPV6, IPV6_DSTOPTS, NULL, &len);

    This is because ipv6_getsockopt_sticky() will return -EFAULT or
    -EINVAL if some error occur.

    This patch fix this problem.

    Signed-off-by: Yang Hongyang
    Signed-off-by: YOSHIFUJI Hideaki

    Yang Hongyang
     
  • - Allow longer lifetimes (>= 0x7fffffff/HZ) on 64bit archs
    by using unsigned long.
    - Shadow this arithmetic overflow workaround by introducing
    helper functions: addrconf_timeout_fixup() and
    addrconf_finite_timeout().

    Signed-off-by: YOSHIFUJI Hideaki

    YOSHIFUJI Hideaki
     
  • I discover a strange behavior in [ipv4 in ipv6] tunnel. When IPv6 tunnel
    payload is less than 40(0x28), packet can be sent to network, received in
    physical interface, but not seen in IP tunnel interface. No counter increase
    in tunnel interface.

    Signed-off-by: YOSHIFUJI Hideaki

    Colin
     
  • As of now, the prefix length is not vaildated when adding or deleting
    addresses. The value is passed directly into the inet6_ifaddr structure
    and later passed on to memcmp() as length indicator which relies on
    the value never to exceed 128 (bits).

    Due to the missing check, the currently code allows for any 8 bit
    value to be passed on as prefix length while using the netlink
    interface, and any 32 bit value while using the ioctl interface.

    [Use unsigned int instead to generate better code - yoshfuji]

    Signed-off-by: Thomas Graf
    Signed-off-by: YOSHIFUJI Hideaki

    Thomas Graf
     
  • ip6_sk_dst_lookup returns held dst entry. It should be released
    on all paths beyond this point. Add missed release when up->pending
    is set.

    Bug report and initial patch by Denis V. Lunev .

    Signed-off-by: YOSHIFUJI Hideaki
    Acked-by: Denis V. Lunev

    YOSHIFUJI Hideaki
     
  • [ 63.531438] =================================
    [ 63.531520] [ INFO: inconsistent lock state ]
    [ 63.531520] 2.6.26-rc4 #7
    [ 63.531520] ---------------------------------
    [ 63.531520] inconsistent {softirq-on-W} -> {in-softirq-W} usage.
    [ 63.531520] tcpsic6/3864 [HC0[0]:SC1[1]:HE1:SE0] takes:
    [ 63.531520] (&q->lock#2){-+..}, at: [] ipv6_frag_rcv+0xd0/0xbd0
    [ 63.531520] {softirq-on-W} state was registered at:
    [ 63.531520] [] __lock_acquire+0x3aa/0x1080
    [ 63.531520] [] lock_acquire+0x76/0xa0
    [ 63.531520] [] _spin_lock+0x2b/0x40
    [ 63.531520] [] nf_ct_frag6_gather+0x3f6/0x910
    ...

    According to this and another similar lockdep report inet_fragment
    locks are taken from nf_ct_frag6_gather() with softirqs enabled, but
    these locks are mainly used in softirq context, so disabling BHs is
    necessary.

    Reported-and-tested-by: Eric Sesterhenn
    Signed-off-by: Jarek Poplawski
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Jarek Poplawski
     

04 Jun, 2008

1 commit


22 May, 2008

1 commit

  • Unless there will be any objection here, I suggest consider the
    following patch which simply removes the code for the
    -DI_WISH_WORLD_WERE_PERFECT in the three methods which use it.

    The compilation errors we get when using -DI_WISH_WORLD_WERE_PERFECT
    show that this code was not built and not used for really a long time.

    Signed-off-by: Rami Rosen
    Signed-off-by: David S. Miller

    Rami Rosen
     

21 May, 2008

1 commit

  • Because the IPsec output function xfrm_output_resume does its
    own dst_output call it should always call __ip_local_output
    instead of ip_local_output as the latter may invoke dst_output
    directly. Otherwise the return values from nf_hook and dst_output
    may clash as they both use the value 1 but for different purposes.

    When that clash occurs this can cause a packet to be used after
    it has been freed which usually leads to a crash. Because the
    offending value is only returned from dst_output with qdiscs
    such as HTB, this bug is normally not visible.

    Thanks to Marco Berizzi for his perseverance in tracking this
    down.

    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

20 May, 2008

4 commits


13 May, 2008

1 commit

  • This patch adds needed_headroom/needed_tailroom members to struct
    net_device and updates many places that allocate sbks to use them. Not
    all of them can be converted though, and I'm sure I missed some (I
    mostly grepped for LL_RESERVED_SPACE)

    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     

09 May, 2008

1 commit


05 May, 2008

1 commit


03 May, 2008

1 commit


02 May, 2008

1 commit


01 May, 2008

2 commits


30 Apr, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (53 commits)
    tcp: Overflow bug in Vegas
    [IPv4] UFO: prevent generation of chained skb destined to UFO device
    iwlwifi: move the selects to the tristate drivers
    ipv4: annotate a few functions __init in ipconfig.c
    atm: ambassador: vcc_sf semaphore to mutex
    MAINTAINERS: The socketcan-core list is subscribers-only.
    netfilter: nf_conntrack: padding breaks conntrack hash on ARM
    ipv4: Update MTU to all related cache entries in ip_rt_frag_needed()
    sch_sfq: use del_timer_sync() in sfq_destroy()
    net: Add compat support for getsockopt (MCAST_MSFILTER)
    net: Several cleanups for the setsockopt compat support.
    ipvs: fix oops in backup for fwmark conn templates
    bridge: kernel panic when unloading bridge module
    bridge: fix error handling in br_add_if()
    netfilter: {nfnetlink,ip,ip6}_queue: fix skb_over_panic when enlarging packets
    netfilter: x_tables: fix net namespace leak when reading /proc/net/xxx_tables_names
    netfilter: xt_TCPOPTSTRIP: signed tcphoff for ipv6_skip_exthdr() retval
    tcp: Limit cwnd growth when deferring for GSO
    tcp: Allow send-limited cwnd to grow up to max_burst when gso disabled
    [netdrvr] gianfar: Determine TBIPA value dynamically
    ...

    Linus Torvalds