26 Oct, 2007

1 commit


11 Oct, 2007

2 commits

  • Background: RFC 4293 deprecates existing individual, named ICMP
    type counters to be replaced with the ICMPMsgStatsTable. This table
    includes entries for both IPv4 and IPv6, and requires counting of all
    ICMP types, whether or not the machine implements the type.

    These patches "remove" (but not really) the existing counters, and
    replace them with the ICMPMsgStats tables for v4 and v6.
    It includes the named counters in the /proc places they were, but gets the
    values for them from the new tables. It also counts packets generated
    from raw socket output (e.g., OutEchoes, MLD queries, RA's from
    radvd, etc).

    Changes:
    1) create icmpmsg_statistics mib
    2) create icmpv6msg_statistics mib
    3) modify existing counters to use these
    4) modify /proc/net/snmp to add "IcmpMsg" with all ICMP types
    listed by number for easy SNMP parsing
    5) modify /proc/net/snmp printing for "Icmp" to get the named data
    from new counters.

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

    David L Stevens
     
  • This patch makes most of the generic device layer network
    namespace safe. This patch makes dev_base_head a
    network namespace variable, and then it picks up
    a few associated variables. The functions:
    dev_getbyhwaddr
    dev_getfirsthwbytype
    dev_get_by_flags
    dev_get_by_name
    __dev_get_by_name
    dev_get_by_index
    __dev_get_by_index
    dev_ioctl
    dev_ethtool
    dev_load
    wireless_process_ioctl

    were modified to take a network namespace argument, and
    deal with it.

    vlan_ioctl_set and brioctl_set were modified so their
    hooks will receive a network namespace argument.

    So basically anthing in the core of the network stack that was
    affected to by the change of dev_base was modified to handle
    multiple network namespaces. The rest of the network stack was
    simply modified to explicitly use &init_net the initial network
    namespace. This can be fixed when those components of the network
    stack are modified to handle multiple network namespaces.

    For now the ifindex generator is left global.

    Fundametally ifindex numbers are per namespace, or else
    we will have corner case problems with migration when
    we get that far.

    At the same time there are assumptions in the network stack
    that the ifindex of a network device won't change. Making
    the ifindex number global seems a good compromise until
    the network stack can cope with ifindex changes when
    you change namespaces, and the like.

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

    Eric W. Biederman
     

04 Jun, 2007

1 commit

  • Currently when icmp_errors_use_inbound_ifaddr is set and an ICMP error is
    sent after the packet passed through ip_output(), an address from the
    outgoing interface is chosen as ICMP source address since skb->dev doesn't
    point to the incoming interface anymore.

    Fix this by doing an interface lookup on rt->dst.iif and using that device.

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

    Patrick McHardy
     

20 May, 2007

1 commit

  • When icmp_send is called on the local output path before the
    packet hits ip_output, skb->dev is not set, causing a crash
    when sysctl_icmp_errors_use_inbound_ifaddr is set. This can
    happen with the netfilter REJECT target or IPsec tunnels.

    Let routing decide the ICMP source address in that case, since the
    packet is locally generated there is no inbound interface and
    the sysctl should not apply.

    The option actually seems to be unfixable broken, on the path
    after ip_output() skb->dev points to the outgoing device and
    we don't know the incoming device anymore, so its going to do
    the absolute wrong thing and pick the address of the outgoing
    interface. Add a comment about this.

    Reported by Curtis Doty .

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

    Patrick McHardy
     

26 Apr, 2007

4 commits


11 Feb, 2007

1 commit


03 Dec, 2006

2 commits


29 Sep, 2006

5 commits


23 Sep, 2006

3 commits

  • Change net/core, ipv4 and ipv6 sysctl variables to __read_mostly.

    Couldn't actually measure any performance increase while testing (.3%
    I consider noise), but seems like the right thing to do.

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

    Brian Haley
     
  • Replace CHECKSUM_HW by CHECKSUM_PARTIAL (for outgoing packets, whose
    checksum still needs to be completed) and CHECKSUM_COMPLETE (for
    incoming packets, device supplied full checksum).

    Patch originally from Herbert Xu, updated by myself for 2.6.18-rc3.

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

    Patrick McHardy
     
  • This labels the flows that could utilize IPSec xfrms at the points the
    flows are defined so that IPSec policy and SAs at the right label can
    be used.

    The following protos are currently not handled, but they should
    continue to be able to use single-labeled IPSec like they currently
    do.

    ipmr
    ip_gre
    ipip
    igmp
    sit
    sctp
    ip6_tunnel (IPv6 over IPv6 tunnel device)
    decnet

    Signed-off-by: Venkat Yekkirala
    Signed-off-by: David S. Miller

    Venkat Yekkirala
     

01 Jul, 2006

1 commit


18 Jun, 2006

1 commit


11 Apr, 2006

1 commit

  • for_each_cpu() actually iterates across all possible CPUs. We've had mistakes
    in the past where people were using for_each_cpu() where they should have been
    iterating across only online or present CPUs. This is inefficient and
    possibly buggy.

    We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the
    future.

    This patch replaces for_each_cpu with for_each_possible_cpu under /net

    Signed-off-by: KAMEZAWA Hiroyuki
    Acked-by: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     

25 Mar, 2006

1 commit

  • When we get an ICMP need-to-frag message, the original TOS value in the
    ICMP payload cannot be used as a key to look up the routes to update.
    This is because the TOS field may have been modified by routers on the
    way. Similarly, ip_rt_redirect should also ignore the TOS as the router
    that gave us the message may have modified the TOS value.

    The patch achieves this objective by aggregating entries with different
    TOS values (but are otherwise identical) into the same bucket. This
    makes it easy to update them at the same time when an ICMP message is
    received.

    In future we should use a twin-hashing scheme where teh aggregation
    occurs at the entry level. That is, the TOS goes back into the hash
    for normal lookups while ICMP lookups will end up with a node that
    gives us a list that contains all other route entries that differ
    only by TOS.

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

    Ilia Sotnikov
     

14 Feb, 2006

1 commit


05 Feb, 2006

1 commit


03 Feb, 2006

1 commit

  • This seems to be an artifact of the follwoing commit in February '02.

    e7e173af42dbf37b1d946f9ee00219cb3b2bea6a

    In a nutshell, goto out and return actually do the same thing,
    and both are called in this function. This patch removes out.

    Signed-Off-By: Horms
    Signed-off-by: David S. Miller

    Horms
     

10 Jan, 2006

1 commit


04 Jan, 2006

1 commit


30 Nov, 2005

1 commit

  • the patch below marks various variables const in net/; the goal is to
    move them to the .rodata section so that they can't false-share
    cachelines with things that get written to, as well as potentially
    helping gcc a bit with optimisations. (these were found using a gcc
    patch to warn about such variables)

    Signed-off-by: Arjan van de Ven
    Signed-off-by: David S. Miller

    Arjan van de Ven
     

11 Nov, 2005

1 commit

  • Here is the patch that introduces the generic skb_checksum_complete
    which also checks for hardware RX checksum faults. If that happens,
    it'll call netdev_rx_csum_fault which currently prints out a stack
    trace with the device name. In future it can turn off RX checksum.

    I've converted every spot under net/ that does RX checksum checks to
    use skb_checksum_complete or __skb_checksum_complete with the
    exceptions of:

    * Those places where checksums are done bit by bit. These will call
    netdev_rx_csum_fault directly.

    * The following have not been completely checked/converted:

    ipmr
    ip_vs
    netfilter
    dccp

    This patch is based on patches and suggestions from Stephen Hemminger
    and David S. Miller.

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

    Herbert Xu
     

26 Oct, 2005

1 commit

  • In 'net' change the explicit use of for-loops and NR_CPUS into the
    general for_each_cpu() or for_each_online_cpu() constructs, as
    appropriate. This widens the scope of potential future optimizations
    of the general constructs, as well as takes advantage of the existing
    optimizations of first_cpu() and next_cpu(), which is advantageous
    when the true CPU count is much smaller than NR_CPUS.

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

    John Hawkes
     

04 Oct, 2005

1 commit


30 Aug, 2005

2 commits


19 Aug, 2005

1 commit


09 Aug, 2005

1 commit

  • Here's a small patch to cleanup NETDEBUG() use in net/ipv4/ for Linux
    kernel 2.6.13-rc5. Also weird use of indentation is changed in some
    places.

    Signed-off-by: Heikki Orsila
    Signed-off-by: David S. Miller

    Heikki Orsila
     

09 Jul, 2005

1 commit


14 Jun, 2005

1 commit

  • This patch alows you to change the source address of icmp error
    messages. It applies cleanly to 2.6.11.11 and retains the default
    behaviour.

    In the old (default) behaviour icmp error messages are sent with the ip
    of the exiting interface.

    The new behaviour (when the sysctl variable is toggled on), it will send
    the message with the ip of the interface that received the packet that
    caused the icmp error. This is the behaviour network administrators will
    expect from a router. It makes debugging complicated network layouts
    much easier. Also, all 'vendor routers' I know of have the later
    behaviour.

    Signed-off-by: David S. Miller

    J. Simonetti
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds