04 Mar, 2009

1 commit

  • Add "disable" module parameter support to ipv6.ko by specifying
    "disable=1" on module load. We just do the minimum of initializing
    inetsw6[] so calls from other modules to inet6_register_protosw()
    won't OOPs, then bail out. No IPv6 addresses or sockets can be
    created as a result, and a reboot is required to enable IPv6.

    Signed-off-by: Brian Haley
    Signed-off-by: David S. Miller

    Brian Haley
     

03 Mar, 2009

2 commits

  • When a network namespace is destroyed the network interfaces are
    all unregistered, making addrconf_ifdown called by the netdevice
    notifier.
    In the other hand, the addrconf exit method does a loop on the network
    devices and does addrconf_ifdown on each of them. But the ordering of
    the netns subsystem is not right because it uses the register_pernet_device
    instead of register_pernet_subsys. If we handle the loopback as
    any network device, we can safely use register_pernet_subsys.

    But if we use register_pernet_subsys, the addrconf exit method will do
    exactly what was already done with the unregistering of the network
    devices. So in definitive, this code is pointless.

    I removed the netns addrconf exit method and moved the code to the
    addrconf cleanup function.

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

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

    Stephen Hemminger
     

26 Feb, 2009

1 commit

  • We already have a valid net in that place, but this is not just a
    cleanup - the tw pointer can be NULL there sometimes, thus causing
    an oops in NET_NS=y case.

    The same place in ipv4 code already works correctly using existing
    net, rather than tw's one.

    The bug exists since 2.6.27.

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

    Pavel Emelyanov
     

18 Feb, 2009

1 commit


10 Feb, 2009

3 commits


06 Feb, 2009

2 commits


31 Jan, 2009

1 commit


28 Jan, 2009

3 commits

  • The kernel manages this value internally, as necessary, as
    VIFs are added/removed and as multicast routers are registered
    and deregistered.

    Signed-off-by: David S. Miller

    David S. Miller
     
  • This patch addresses the IPv6 multicast routing issues described
    below. It was tested with XORP 1.4/1.5 as the IPv6 PIM-SM routing
    daemon against FreeBSD peers.

    net/ipv6/ip6_input.c:

    - Don't try to forward link-local multicast packets.

    - Don't reset skb2->dev before calling ip6_mr_input() so packets can
    be identified as coming from the PIM register vif properly.

    net/ipv6/ip6mr.c:

    - Fix incoming PIM register messages processing:

    * The IPv6 pseudo-header should be included when checksumming PIM
    messages (RFC 4601 section 4.9; RFC 3973 section 4.7.1).

    * Packets decapsulated from PIM register messages should have
    skb->protocol ETH_P_IPV6.

    - Enable/disable IPv6 multicast forwarding on the corresponding
    interface when a routing daemon adds/removes a multicast virtual
    interface.

    - Remove incorrect skb_pull() to fix userspace signaling.

    - Enable/disable global IPv6 multicast forwarding when an IPv6
    multicast routing socket is opened/closed.

    net/ipv6/route.c:

    - Don't use strict routing logic for packets decapsulated from PIM
    register messages (similar to disabling rp_filter for the IPv4
    case).

    Signed-off-by: Thomas Goff
    Reviewed-by: Fred Templin
    Signed-off-by: David S. Miller

    Thomas Goff
     
  • This patch fixes the xfrm reverse flow lookup for icmp6 so that icmp6 packets
    don't get lost over ipsec tunnels. Similar patch is in RHEL5 kernel for a quite
    long time and I do not see why it isn't in mainline.

    Signed-off-by: Jiri Pirko
    Acked-by: Herbert Xu
    Signed-off-by: David S. Miller

    Jiri Pirko
     

21 Jan, 2009

1 commit


14 Jan, 2009

1 commit

  • When a fib6 table dump is prematurely ended, we won't unlink
    its walker from the list. This causes all sorts of grief for
    other users of the list later.

    Reported-by: Chris Caputo
    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

13 Jan, 2009

1 commit


10 Jan, 2009

1 commit

  • * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (22 commits)
    ioat: fix self test for multi-channel case
    dmaengine: bump initcall level to arch_initcall
    dmaengine: advertise all channels on a device to dma_filter_fn
    dmaengine: use idr for registering dma device numbers
    dmaengine: add a release for dma class devices and dependent infrastructure
    ioat: do not perform removal actions at shutdown
    iop-adma: enable module removal
    iop-adma: kill debug BUG_ON
    iop-adma: let devm do its job, don't duplicate free
    dmaengine: kill enum dma_state_client
    dmaengine: remove 'bigref' infrastructure
    dmaengine: kill struct dma_client and supporting infrastructure
    dmaengine: replace dma_async_client_register with dmaengine_get
    atmel-mci: convert to dma_request_channel and down-level dma_slave
    dmatest: convert to dma_request_channel
    dmaengine: introduce dma_request_channel and private channels
    net_dma: convert to dma_find_channel
    dmaengine: provide a common 'issue_pending_all' implementation
    dmaengine: centralize channel allocation, introduce dma_find_channel
    dmaengine: up-level reference counting to the module level
    ...

    Linus Torvalds
     

09 Jan, 2009

4 commits

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (84 commits)
    wimax: fix kernel-doc for debufs_dentry member of struct wimax_dev
    net: convert pegasus driver to net_device_ops
    bnx2x: Prevent eeprom set when driver is down
    net: switch kaweth driver to netdevops
    pcnet32: round off carrier watch timer
    i2400m/usb: wrap USB power saving in #ifdef CONFIG_PM
    wimax: testing for rfkill support should also test for CONFIG_RFKILL_MODULE
    wimax: fix kconfig interactions with rfkill and input layers
    wimax: fix '#ifndef CONFIG_BUG' layout to avoid warning
    r6040: bump release number to 0.20
    r6040: warn about MAC address being unset
    r6040: check PHY status when bringing interface up
    r6040: make printks consistent with DRV_NAME
    gianfar: Fixup use of BUS_ID_SIZE
    mlx4_en: Returning real Max in get_ringparam
    mlx4_en: Consider inline packets on completion
    netdev: bfin_mac: enable bfin_mac net dev driver for BF51x
    qeth: convert to net_device_ops
    vlan: add neigh_setup
    dm9601: warn on invalid mac address
    ...

    Linus Torvalds
     
  • This patch adds GRO support for TCP over IPv6. The code is exactly
    the same as the IPv4 version except for the pseudo-header checksum
    computation.

    Note that I've removed the unused tcphdr argument from tcp_v6_check
    rather than invent a bogus value for GRO.

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

    Herbert Xu
     
  • This patch adds GRO support for IPv6. IPv6 GRO supports extension
    headers in the same way as GSO (by using the same infrastructure).
    It's also simpler compared to IPv4 since we no longer have to worry
    about fragmentation attributes or header checksums.

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

    Herbert Xu
     
  • Cc: Ingo Molnar
    Cc: Thomas Gleixner
    Acked-by: Theodore Ts'o
    Acked-by: Mark Fasheh
    Acked-by: David S. Miller
    Cc: James Morris
    Acked-by: Casey Schaufler
    Acked-by: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Fernando Carrijo
     

07 Jan, 2009

1 commit


05 Jan, 2009

2 commits

  • Signed-off-by: Ilpo Järvinen
    Reported-by: Eric Sesterhenn
    Signed-off-by: David S. Miller

    Ilpo Järvinen
     
  • Thanks to excellent diagnosis by Eduard Guzovsky.

    The core problem is that on a network with lots of active
    multicast traffic, the neighbour cache can fill up. If
    we try to allocate a new route and thus neighbour cache
    entry, the bog-standard GC attempt the neighbour layer does
    in ineffective because route entries hold a reference
    to the existing neighbour entries and GC can only liberate
    entries with no references.

    IPV4 already has a way to handle this, by doing a route cache
    GC in such situations (when neigh attach returns -ENOBUFS).

    So simply mimick this on the ipv6 side.

    Tested-by: Eduard Guzovsky
    Signed-off-by: David S. Miller

    David S. Miller
     

30 Dec, 2008

1 commit

  • When we converted the protocol atomic counters such as the orphan
    count and the total socket count deadlocks were introduced due to
    the mismatch in BH status of the spots that used the percpu counter
    operations.

    Based on the diagnosis and patch by Peter Zijlstra, this patch
    fixes these issues by disabling BH where we may be in process
    context.

    Reported-by: Jeff Kirsher
    Tested-by: Ingo Molnar
    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Herbert Xu
     

29 Dec, 2008

1 commit

  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits)
    net: Allow dependancies of FDDI & Tokenring to be modular.
    igb: Fix build warning when DCA is disabled.
    net: Fix warning fallout from recent NAPI interface changes.
    gro: Fix potential use after free
    sfc: If AN is enabled, always read speed/duplex from the AN advertising bits
    sfc: When disabling the NIC, close the device rather than unregistering it
    sfc: SFT9001: Add cable diagnostics
    sfc: Add support for multiple PHY self-tests
    sfc: Merge top-level functions for self-tests
    sfc: Clean up PHY mode management in loopback self-test
    sfc: Fix unreliable link detection in some loopback modes
    sfc: Generate unique names for per-NIC workqueues
    802.3ad: use standard ethhdr instead of ad_header
    802.3ad: generalize out mac address initializer
    802.3ad: initialize ports LACPDU from const initializer
    802.3ad: remove typedef around ad_system
    802.3ad: turn ports is_individual into a bool
    802.3ad: turn ports is_enabled into a bool
    802.3ad: make ntt bool
    ixgbe: Fix set_ringparam in ixgbe to use the same memory pools.
    ...

    Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due
    to the conversion to %pI (in this networking merge) and the addition of
    doing IPv6 addresses (from the earlier merge of CIFS).

    Linus Torvalds
     

25 Dec, 2008

1 commit


16 Dec, 2008

4 commits

  • 1.When no interface is specified in an IPV6_PKTINFO ancillary data
    item, the interface specified in an IPV6_PKTINFO sticky optionis
    is used.

    RFC3542:
    6.7. Summary of Outgoing Interface Selection

    This document and [RFC-3493] specify various methods that affect the
    selection of the packet's outgoing interface. This subsection
    summarizes the ordering among those in order to ensure deterministic
    behavior.

    For a given outgoing packet on a given socket, the outgoing interface
    is determined in the following order:

    1. if an interface is specified in an IPV6_PKTINFO ancillary data
    item, the interface is used.

    2. otherwise, if an interface is specified in an IPV6_PKTINFO sticky
    option, the interface is used.

    Signed-off-by: Yang Hongyang
    Signed-off-by: David S. Miller

    Yang Hongyang
     
  • When get receiving interface index while no message is received,
    the the value seted with setsockopt() should be returned.

    RFC 3542:
    Issuing getsockopt() for the above options will return the sticky
    option value i.e., the value set with setsockopt(). If no sticky
    option value has been set getsockopt() will return the following
    values:

    - For the IPV6_PKTINFO option, it will return an in6_pktinfo
    structure with ipi6_addr being in6addr_any and ipi6_ifindex being
    zero.

    Signed-off-by: Yang Hongyang
    Signed-off-by: David S. Miller

    Yang Hongyang
     
  • There are three reasons for me to add this support:
    1.When no interface is specified in an IPV6_PKTINFO ancillary data
    item, the interface specified in an IPV6_PKTINFO sticky optionis
    is used.

    RFC3542:
    6.7. Summary of Outgoing Interface Selection

    This document and [RFC-3493] specify various methods that affect the
    selection of the packet's outgoing interface. This subsection
    summarizes the ordering among those in order to ensure deterministic
    behavior.

    For a given outgoing packet on a given socket, the outgoing interface
    is determined in the following order:

    1. if an interface is specified in an IPV6_PKTINFO ancillary data
    item, the interface is used.

    2. otherwise, if an interface is specified in an IPV6_PKTINFO sticky
    option, the interface is used.

    2.When no IPV6_PKTINFO ancillary data is received,getsockopt() should
    return the sticky option value which set with setsockopt().

    RFC 3542:
    Issuing getsockopt() for the above options will return the sticky
    option value i.e., the value set with setsockopt(). If no sticky
    option value has been set getsockopt() will return the following
    values:

    3.Make the setsockopt implementation POSIX compliant.

    Signed-off-by: Yang Hongyang
    Signed-off-by: David S. Miller

    Yang Hongyang
     
  • Conflicts:

    drivers/net/e1000e/ich8lan.c

    David S. Miller
     

15 Dec, 2008

3 commits


11 Dec, 2008

5 commits

  • This last patch makes the appropriate changes to use and propagate the
    network namespace where needed in IPv6 multicast forwarding code.

    This consists mainly in replacing all the remaining init_net occurences
    with current netns pointer retrieved from sockets, net devices or
    mfc6_caches depending on the routines' contexts.

    Some routines receive a new 'struct net' parameter to propagate the current
    netns:
    * ip6mr_get_route
    * ip6mr_cache_report
    * ip6mr_cache_find
    * ip6mr_cache_unresolved
    * mif6_add/mif6_delete
    * ip6mr_mfc_add/ip6mr_mfc_delete
    * ip6mr_reg_vif

    All the IPv6 multicast forwarding variables moved to struct netns_ipv6 by
    the previous patches are now referenced in the correct namespace.

    Changelog:
    ==========
    * Take into account the net associated to mfc6_cache when matching entries in
    mfc_unres_queue list.
    * Call mroute_clean_tables() in ip6mr_net_exit() to free memory allocated
    per-namespace.
    * Call dev_net_set() in ip6mr_reg_vif() to initialize dev->nd_net
    correctly.

    Signed-off-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery
     
  • Declare IPv6 multicast forwarding /proc/net entries per-namespace:
    /proc/net/ip6_mr_vif
    /proc/net/ip6_mr_cache

    Changelog
    =========
    V2:
    * In routine ipmr_mfc_seq_idx(), only match entries belonging to current
    netns in mfc_unres_queue list.

    Signed-off-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery
     
  • Preliminary work to make IPv6 multicast forwarding netns-aware.

    Declare variable 'reg_vif_num' per-namespace, moves into struct netns_ipv6.

    At the moment, this variable is only referenced in init_net.

    Signed-off-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery
     
  • Preliminary work to make IPv6 multicast forwarding netns-aware.

    Declare IPv6 multicast forwarding variables 'mroute_do_assert' and
    'mroute_do_pim' per-namespace in struct netns_ipv6.

    At the moment, these variables are only referenced in init_net.

    Signed-off-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery
     
  • Preliminary work to make IPv6 multicast forwarding netns-aware.

    Declare variable cache_resolve_queue_len per-namespace: moves it into
    struct netns_ipv6.

    This variable counts the number of unresolved cache entries queued in the
    list mfc_unres_queue. This list is kept global to all netns as the number
    of entries per namespace is limited to 10 (hardcoded in routine
    ip6mr_cache_unresolved).
    Entries belonging to different namespaces in mfc_unres_queue will be
    identified by matching the mfc_net member introduced previously in
    struct mfc6_cache.

    Keeping this list global to all netns, also allows us to keep a single
    timer (ipmr_expire_timer) to handle their expiration.
    In some places cache_resolve_queue_len value was tested for arming
    or deleting the timer. These tests were equivalent to testing
    mfc_unres_queue value instead and are replaced in this patch.

    At the moment, cache_resolve_queue_len is only referenced in init_net.

    Signed-off-by: Benjamin Thery
    Signed-off-by: David S. Miller

    Benjamin Thery