11 Dec, 2008

1 commit


27 Nov, 2008

1 commit


26 Nov, 2008

1 commit

  • Pass netns to xfrm_lookup()/__xfrm_lookup(). For that pass netns
    to flow_cache_lookup() and resolver callback.

    Take it from socket or netdevice. Stub DECnet to init_net.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     

22 Nov, 2008

1 commit


12 Nov, 2008

1 commit


04 Nov, 2008

1 commit

  • I want to compile out proc_* and sysctl_* handlers totally and
    stub them to NULL depending on config options, however usage of &
    will prevent this, since taking adress of NULL pointer will break
    compilation.

    So, drop & in front of every ->proc_handler and every ->strategy
    handler, it was never needed in fact.

    Signed-off-by: Alexey Dobriyan
    Signed-off-by: David S. Miller

    Alexey Dobriyan
     

17 Oct, 2008

4 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
    net: Remove CONFIG_KMOD from net/ (towards removing CONFIG_KMOD entirely)
    ipv4: Add a missing rcu_assign_pointer() in routing cache.
    [netdrvr] ibmtr: PCMCIA IBMTR is ok on 64bit
    xen-netfront: Avoid unaligned accesses to IP header
    lmc: copy_*_user under spinlock
    [netdrvr] myri10ge, ixgbe: remove broken select INTEL_IOATDMA

    Linus Torvalds
     
  • Some code here depends on CONFIG_KMOD to not try to load
    protocol modules or similar, replace by CONFIG_MODULES
    where more than just request_module depends on CONFIG_KMOD
    and and also use try_then_request_module in ebtables.

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

    Johannes Berg
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (26 commits)
    decnet: Fix compiler warning in dn_dev.c
    IPV6: Fix default gateway criteria wrt. HIGH/LOW preference radv option
    net/802/fc.c: Fix compilation warnings
    netns: correct mib stats in ip6_route_me_harder()
    netns: fix net_generic array leak
    rt2x00: fix regression introduced by "mac80211: free up 2 bytes in skb->cb"
    rtl8187: Add USB ID for Belkin F5D7050 with RTL8187B chip
    p54usb: Device ID updates
    mac80211: fixme for kernel-doc
    ath9k/mac80211: disallow fragmentation in ath9k, report to userspace
    libertas : Remove unused variable warning for "old_channel" from cmd.c
    mac80211: Fix scan RX processing oops
    orinoco: fix unsafe locking in spectrum_cs_suspend
    orinoco: fix unsafe locking in orinoco_cs_resume
    cfg80211: fix debugfs error handling
    mac80211: fix debugfs netdev rename
    iwlwifi: fix ct kill configuration for 5350
    mac80211: fix HT information element parsing
    p54: Fix compilation problem on PPC
    mac80211: fix debugfs lockup
    ...

    Linus Torvalds
     
  • name and nlen parameters passed to ->strategy hook are unused, remove
    them. In general ->strategy hook should know what it's doing, and don't
    do something tricky for which, say, pointer to original userspace array
    may be needed (name).

    Signed-off-by: Alexey Dobriyan
    Acked-by: David S. Miller [ networking bits ]
    Cc: Ralf Baechle
    Cc: David Howells
    Cc: Matt Mackall
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     

16 Oct, 2008

1 commit


20 Jul, 2008

1 commit


17 Jul, 2008

1 commit

  • The tcp_enter_memory_pressure calls NET_INC_STATS, but doesn't
    have where to get the net from.

    I decided to add a sk argument, not the net itself, only to factor
    all the required sock_net(sk) calls inside the enter_memory_pressure
    callback itself.

    Signed-off-by: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     

06 Jul, 2008

1 commit


17 Jun, 2008

1 commit


05 May, 2008

1 commit


26 Mar, 2008

2 commits


01 Mar, 2008

1 commit


08 Feb, 2008

1 commit

  • Same alignment requirement was removed on IP route cache in the past.

    This alignment actually has bad effect on 32 bit arches, uniprocessor,
    since sizeof(dn_rt_hash_bucket) is forced to 8 bytes instead of 4.

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

29 Jan, 2008

18 commits

  • Remove struct net from fib_rules_register(unregister)/notify_change
    paths and diet code size a bit.

    add/remove: 0/0 grow/shrink: 10/12 up/down: 35/-100 (-65)
    function old new delta
    notify_rule_change 273 280 +7
    trie_show_stats 471 475 +4
    fn_trie_delete 473 477 +4
    fib_rules_unregister 144 148 +4
    fib4_rule_compare 119 123 +4
    resize 2842 2845 +3
    fn_trie_select_default 515 518 +3
    inet_sk_rebuild_header 836 838 +2
    fib_trie_seq_show 764 766 +2
    __devinet_sysctl_register 276 278 +2
    fn_trie_lookup 1124 1123 -1
    ip_fib_check_default 133 131 -2
    devinet_conf_sysctl 223 221 -2
    snmp_fold_field 126 123 -3
    fn_trie_insert 2091 2086 -5
    inet_create 876 870 -6
    fib4_rules_init 197 191 -6
    fib_sync_down 452 444 -8
    inet_gso_send_check 334 325 -9
    fib_create_info 3003 2991 -12
    fib_nl_delrule 568 553 -15
    fib_nl_newrule 883 852 -31

    Signed-off-by: Denis V. Lunev
    Acked-by: Daniel Lezcano
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • The backward link from FIB rules operations to the network namespace
    will allow to simplify the API a bit.

    Signed-off-by: Denis V. Lunev
    Acked-by: Daniel Lezcano
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • Create a specific helper for netlink kernel socket disposal. This just
    let the code look better and provides a ground for proper disposal
    inside a namespace.

    Signed-off-by: Denis V. Lunev
    Tested-by: Alexey Dobriyan
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • The garbage collection function receive the dst_ops structure as
    parameter. This is useful for the next incoming patchset because it
    will need the dst_ops (there will be several instances) and the
    network namespace pointer (contained in the dst_ops).

    The protocols which do not take care of the namespaces will not be
    impacted by this change (expect for the function signature), they do
    just ignore the parameter.

    Signed-off-by: Daniel Lezcano
    Signed-off-by: David S. Miller

    Daniel Lezcano
     
  • fib_rules_ops contains operations and the list of configured rules. ops will
    become per/namespace soon, so we need them to be known in the default_pref
    callback.

    Acked-by: Benjamin Thery
    Acked-by: Daniel Lezcano
    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • The patch extends the different fib rules API in order to pass the
    network namespace pointer. That will allow to access the different
    tables from a namespace relative object. As usual, the pointer to the
    init_net variable is passed as parameter so we don't break the
    network.

    Acked-by: Benjamin Thery
    Acked-by: Daniel Lezcano
    Signed-off-by: Denis V. Lunev
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • The decnet includes two places to patch. The first one is
    the net/decnet table itself, and it is patched just like
    other subsystems in the first patch in this series.

    The second place is a bit more complex - it is the
    net/decnet/conf/xxx entries,. similar to those in
    ipv4/devinet.c and ipv6/addrconf.c. This code is made similar
    to those in ipv[46].

    Signed-off-by: Pavel Emelyanov
    Signed-off-by: David S. Miller

    Pavel Emelyanov
     
  • I'm actually surprised at how much was involved. At first glance it
    appears that the neighbour table data structures are already split by
    network device so all that should be needed is to modify the user
    interface commands to filter the set of neighbours by the network
    namespace of their devices.

    However a couple things turned up while I was reading through the
    code. The proxy neighbour table allows entries with no network
    device, and the neighbour parms are per network device (except for the
    defaults) so they now need a per network namespace default.

    So I updated the two structures (which surprised me) with their very
    own network namespace parameter. Updated the relevant lookup and
    destroy routines with a network namespace parameter and modified the
    code that interacts with users to filter out neighbour table entries
    for devices of other namespaces.

    I'm a little concerned that we can modify and display the global table
    configuration and from all network namespaces. But this appears good
    enough for now.

    I keep thinking modifying the neighbour table to have per network
    namespace instances of each table type would should be cleaner. The
    hash table is already dynamically sized so there are it is not a
    limiter. The default parameter would be straight forward to take care
    of. However when I look at the how the network table is built and
    used I still find some assumptions that there is only a single
    neighbour table for each type of table in the kernel. The netlink
    operations, neigh_seq_start, the non-core network users that call
    neigh_lookup. So while it might be doable it would require more
    refactoring than my current approach of just doing a little extra
    filtering in the code.

    Signed-off-by: Eric W. Biederman
    Signed-off-by: Daniel Lezcano
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • The NETFILTER_ADVANCED option hides lots of the rather obscure netfilter
    options when disabled and provides defaults (M) that should allow to
    run a distribution firewall without further thinking.

    Defaults to 'y' to avoid breaking current configurations.

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

    Patrick McHardy
     
  • Signed-off-by: YOSHIFUJI Hideaki
    Signed-off-by: David S. Miller

    YOSHIFUJI Hideaki
     
  • My previous patch made the wait flag take the opposite value to what
    it should be. This patch fixes that.

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

    Herbert Xu
     
  • This patch converts all callers of xfrm_lookup that used an
    explicit value of 1 to indiciate blocking to use the new flag
    XFRM_LOOKUP_WAIT.

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

    Herbert Xu
     
  • Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • Signed-off-by: Denis V. Lunev
    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • After this patch none of the netlink callback support anything
    except the initial network namespace but the rtnetlink infrastructure
    now handles multiple network namespaces.

    Changes from v2:
    - IPv6 addrlabel processing

    Changes from v1:
    - no need for special rtnl_unlock handling
    - fixed IPv6 ndisc

    Signed-off-by: Denis V. Lunev
    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller

    Denis V. Lunev
     
  • Before I can enable rtnetlink to work in all network namespaces I need
    to be certain that something won't break. So this patch deliberately
    disables all of the rtnletlink methods in everything except the
    initial network namespace. After the methods have been audited this
    extra check can be disabled.

    Changes from v1:
    - added IPv6 addrlabel protection

    Signed-off-by: Denis V. Lunev
    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller
    Signed-off-by: Herbert Xu

    Denis V. Lunev
     
  • We have a number of copies of dst_discard scattered around the place
    which all do the same thing, namely free a packet on the input or
    output paths.

    This patch deletes all of them except dst_discard and points all the
    users to it.

    The only non-trivial bit is decnet where it returns an error.
    However, conceptually this is identical to the blackhole functions
    used in IPv4 and IPv6 which do not return errors. So they should
    either all return errors or all return zero. For now I've stuck with
    the majority and picked zero as the return value.

    It doesn't really matter in practice since few if any driver would
    react differently depending on a zero return value or NET_RX_DROP.

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

    Herbert Xu
     
  • Many-many code in the kernel initialized the timer->function
    and timer->data together with calling init_timer(timer). There
    is already a helper for this. Use it for networking code.

    The patch is HUGE, but makes the code 130 lines shorter
    (98 insertions(+), 228 deletions(-)).

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

    Pavel Emelyanov
     

11 Jan, 2008

1 commit

  • In dn_rt_cache_get_next(), no need to guard seq->private by a
    rcu_dereference() since seq is private to the thread running this
    function. Reading seq.private once (as guaranted bu rcu_dereference())
    or several time if compiler really is dumb enough wont change the
    result.

    But we miss real spots where rcu_dereference() are needed, both in
    dn_rt_cache_get_first() and dn_rt_cache_get_next()

    Signed-off-by: Eric Dumazet
    Signed-off-by: David S. Miller

    Eric Dumazet
     

30 Nov, 2007

1 commit

  • As far as I see from the err variable initialization
    the dn_nl_deladdr() routine was designed to report errors
    like "EADDRNOTAVAIL" and probaby "ENODEV".

    But the code sets this err to 0 after the first nlmsg_parse
    and goes on, returning this 0 in any case.

    Signed-off-by: Pavel Emelyanov
    Acked-by: Steven Whitehouse
    Signed-off-by: Herbert Xu

    Pavel Emelyanov