19 Oct, 2007

2 commits

  • * 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (51 commits)
    [IPV6]: Fix again the fl6_sock_lookup() fixed locking
    [NETFILTER]: nf_conntrack_tcp: fix connection reopening fix
    [IPV6]: Fix race in ipv6_flowlabel_opt() when inserting two labels
    [IPV6]: Lost locking in fl6_sock_lookup
    [IPV6]: Lost locking when inserting a flowlabel in ipv6_fl_list
    [NETFILTER]: xt_sctp: fix mistake to pass a pointer where array is required
    [NET]: Fix OOPS due to missing check in dev_parse_header().
    [TCP]: Remove lost_retrans zero seqno special cases
    [NET]: fix carrier-on bug?
    [NET]: Fix uninitialised variable in ip_frag_reasm()
    [IPSEC]: Rename mode to outer_mode and add inner_mode
    [IPSEC]: Disallow combinations of RO and AH/ESP/IPCOMP
    [IPSEC]: Use the top IPv4 route's peer instead of the bottom
    [IPSEC]: Store afinfo pointer in xfrm_mode
    [IPSEC]: Add missing BEET checks
    [IPSEC]: Move type and mode map into xfrm_state.c
    [IPSEC]: Fix length check in xfrm_parse_spi
    [IPSEC]: Move ip_summed zapping out of xfrm6_rcv_spi
    [IPSEC]: Get nexthdr from caller in xfrm6_rcv_spi
    [IPSEC]: Move tunnel parsing for IPv4 out of xfrm4_input
    ...

    Linus Torvalds
     
  • No one has bothered to set strategy routine for the the netfilter sysctls that
    return jiffies to be sysctl_jiffies.

    So it appears the sys_sysctl path is unused and untested, so this patch
    removes the binary sysctl numbers.

    Which fixes the netfilter oops in 2.6.23-rc2-mm2 for me.

    Signed-off-by: Eric W. Biederman
    Cc: Patrick McHardy
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     

18 Oct, 2007

2 commits


16 Oct, 2007

3 commits


12 Oct, 2007

2 commits

  • The patch will add MODULE_ALIAS("ip6t_") where missing,
    otherwise you will get

    ip6tables: No chain/target/match by that name

    when xt_ is not already loaded.

    Signed-off-by: Jan Engelhardt
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Jan Engelhardt
     
  • With your description I could reproduce the bug and actually you were
    completely right: the code above is incorrect. Somehow I was able to
    misread RFC1122 and mixed the roles :-(:

    When a connection is >>closed actively<>accept<< a new SYN from the remote TCP to
    reopen the connection directly from TIME-WAIT state, if it:
    [...]

    The fix is as follows: if the receiver initiated an active close, then the
    sender may reopen the connection - otherwise try to figure out if we hold
    a dead connection.

    Signed-off-by: Jozsef Kadlecsik
    Tested-by: Krzysztof Piotr Oledzki
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Jozsef Kadlecsik
     

11 Oct, 2007

26 commits


21 Sep, 2007

1 commit

  • The following patch fixes the handling of netlink packets containing
    multiple messages.

    As exposed during netfilter workshop, nfnetlink_log was overwritten the
    message type of the last message (setting it to MSG_DONE) in a multipart
    packet. The consequence was libnfnetlink to ignore the last message in the
    packet.

    The following patch adds a supplementary message (with type MSG_DONE) af
    the end of the netlink skb.

    Signed-off-by: Eric Leblond
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Eric Leblond
     

11 Sep, 2007

1 commit

  • So I've had a deadlock reported to me. I've found that the sequence of
    events goes like this:

    1) process A (modprobe) runs to remove ip_tables.ko

    2) process B (iptables-restore) runs and calls setsockopt on a netfilter socket,
    increasing the ip_tables socket_ops use count

    3) process A acquires a file lock on the file ip_tables.ko, calls remove_module
    in the kernel, which in turn executes the ip_tables module cleanup routine,
    which calls nf_unregister_sockopt

    4) nf_unregister_sockopt, seeing that the use count is non-zero, puts the
    calling process into uninterruptible sleep, expecting the process using the
    socket option code to wake it up when it exits the kernel

    4) the user of the socket option code (process B) in do_ipt_get_ctl, calls
    ipt_find_table_lock, which in this case calls request_module to load
    ip_tables_nat.ko

    5) request_module forks a copy of modprobe (process C) to load the module and
    blocks until modprobe exits.

    6) Process C. forked by request_module process the dependencies of
    ip_tables_nat.ko, of which ip_tables.ko is one.

    7) Process C attempts to lock the request module and all its dependencies, it
    blocks when it attempts to lock ip_tables.ko (which was previously locked in
    step 3)

    Theres not really any great permanent solution to this that I can see, but I've
    developed a two part solution that corrects the problem

    Part 1) Modifies the nf_sockopt registration code so that, instead of using a
    use counter internal to the nf_sockopt_ops structure, we instead use a pointer
    to the registering modules owner to do module reference counting when nf_sockopt
    calls a modules set/get routine. This prevents the deadlock by preventing set 4
    from happening.

    Part 2) Enhances the modprobe utilty so that by default it preforms non-blocking
    remove operations (the same way rmmod does), and add an option to explicity
    request blocking operation. So if you select blocking operation in modprobe you
    can still cause the above deadlock, but only if you explicity try (and since
    root can do any old stupid thing it would like.... :) ).

    Signed-off-by: Neil Horman
    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Neil Horman
     

31 Aug, 2007

1 commit


15 Aug, 2007

2 commits