10 Feb, 2009

1 commit

  • > Kernel BUG at drivers/net/tun.c:444
    > invalid opcode: 0000 [1] SMP
    > last sysfs file: /class/net/lo/ifindex
    > CPU 0
    > Modules linked in: tun ipt_MASQUERADE iptable_nat ip_nat xt_state ip_conntrack
    > nfnetlink ipt_REJECT xt_tcpudp iptable_filter d
    > Pid: 6912, comm: qemu-kvm Tainted: G 2.6.18-128.el5 #1
    > RIP: 0010:[] []
    > :tun:tun_chr_readv+0x2b1/0x3a6
    > RSP: 0018:ffff8102202c5e48 EFLAGS: 00010246
    > RAX: 0000000000000000 RBX: ffff8102202c5e98 RCX: 0000000004010000
    > RDX: ffff810227063680 RSI: ffff8102202c5e9e RDI: ffff8102202c5e92
    > RBP: 0000000000010ff6 R08: 0000000000000000 R09: 0000000000000001
    > R10: ffff8102202c5e94 R11: 0000000000000202 R12: ffff8102275357c0
    > R13: ffff81022755e500 R14: 0000000000000000 R15: ffff8102202c5ef8
    > FS: 00002ae4398db980(0000) GS:ffffffff803ac000(0000) knlGS:0000000000000000
    > CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    > CR2: 00002ae4ab514000 CR3: 0000000221344000 CR4: 00000000000026e0
    > Process qemu-kvm (pid: 6912, threadinfo ffff8102202c4000, task
    > ffff81022e58d820)
    > Stack: 00000000498735cb ffff810229d1a3c0 0000000000000000 ffff81022e58d820
    > ffffffff8008a461 ffff81022755e528 ffff81022755e528 ffffffff8009f925
    > 000005ea05ea0000 ffff8102209d0000 00001051143e1600 ffffffff8003c00e
    > Call Trace:
    > [] default_wake_function+0x0/0xe
    > [] enqueue_hrtimer+0x55/0x70
    > [] hrtimer_start+0xbc/0xce
    > [] :tun:tun_chr_read+0x1a/0x1f
    > [] vfs_read+0xcb/0x171
    > [] sys_read+0x45/0x6e
    > [] system_call+0x7e/0x83
    >
    >
    > Code: 0f 0b 68 40 62 6f 88 c2 bc 01 f6 42 0a 08 74 0c 80 4c 24 41
    > RIP [] :tun:tun_chr_readv+0x2b1/0x3a6
    > RSP
    > Kernel panic - not syncing: Fatal exception

    This crashed when an LRO packet generated by bnx2x reached a
    tun device through the bridge. We're supposed to drop it at
    the bridge. However, because the check was placed in br_forward
    instead of __br_forward, it's only effective if we are sending
    the packet through a single port.

    This patch fixes it by moving the check into __br_forward.

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

    Herbert Xu
     

13 Jan, 2009

3 commits

  • Commit 8cc784ee (netfilter: change return types of match functions
    for ebtables extensions) broke ebtables matches by inverting the
    sense of match/nomatch.

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

    Jan Engelhardt
     
  • The PPPOE/VLAN processing code in the bridge netfilter is broken
    by design. The VLAN tag and the PPPOE session ID are an integral
    part of the packet flow information, yet they're completely
    ignored by the bridge netfilter. This is potentially a security
    hole as it treats all VLANs and PPPOE sessions as the same.

    What's more, it's actually broken for PPPOE as the bridge netfilter
    tries to trim the packets to the IP length without adjusting the
    PPPOE header (and adjusting the PPPOE header isn't much better
    since the PPPOE peer may require the padding to be present).

    Therefore we should disable this by default.

    It does mean that people relying on this feature may lose networking
    depending on how their bridge netfilter rules are configured.
    However, IMHO the problems this code causes are serious enough to
    warrant this.

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

    Herbert Xu
     
  • Currently the bridge FORWARD/POST_ROUTING chains treats all
    non-IPv4 packets as IPv6. This packet fixes that by returning
    NF_ACCEPT on non-IP packets instead, just as is done in PRE_ROUTING.

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

    Herbert Xu
     

11 Jan, 2009

1 commit

  • In each case, if the NULL test is necessary, then the dereference should be
    moved below the NULL test.

    The semantic patch that makes this change is as follows:
    (http://www.emn.fr/x-info/coccinelle/)

    //
    @@
    type T;
    expression E;
    identifier i,fld;
    statement S;
    @@

    - T i = E->fld;
    + T i;
    ... when != E
    when != i
    if (E == NULL) S
    + i = E->fld;
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Andrew Morton
    Signed-off-by: David S. Miller

    Julia Lawall
     

28 Nov, 2008

1 commit


27 Nov, 2008

1 commit


25 Nov, 2008

1 commit

  • As GRE tries to call the update_pmtu function on skb->dst and
    bridge supplies an skb->dst that has a NULL ops field, all is
    not well.

    This patch fixes this by giving the bridge device an ops field
    with an update_pmtu function. For the moment I've left all
    other fields blank but we can fill them in later should the
    need arise.

    Based on report and patch by Philip Craig.

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

    Herbert Xu
     

21 Nov, 2008

1 commit

  • This patch moves neigh_setup and hard_start_xmit into the network device ops
    structure. For bisection, fix all the previously converted drivers as well.
    Bonding driver took the biggest hit on this.

    Added a prefetch of the hard_start_xmit in the fast path to try and reduce
    any impact this would have.

    Signed-off-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Stephen Hemminger
     

20 Nov, 2008

1 commit


13 Nov, 2008

1 commit

  • We have some reasons to kill netdev->priv:
    1. netdev->priv is equal to netdev_priv().
    2. netdev_priv() wraps the calculation of netdev->priv's offset, obviously
    netdev_priv() is more flexible than netdev->priv.
    But we cann't kill netdev->priv, because so many drivers reference to it
    directly.

    This patch is a safe convert for netdev->priv to netdev_priv(netdev).
    Since all of the netdev->priv is only for read.
    But it is too big to be sent in one mail.
    I split it to 4 parts and make every part smaller than 100,000 bytes,
    which is max size allowed by vger.

    Signed-off-by: Wang Chen
    Signed-off-by: David S. Miller

    Wang Chen
     

04 Nov, 2008

8 commits


31 Oct, 2008

1 commit


30 Oct, 2008

1 commit


29 Oct, 2008

1 commit


23 Oct, 2008

1 commit

  • My change

    commit e2a6b85247aacc52d6ba0d9b37a99b8d1a3e0d83
    net: Enable TSO if supported by at least one device

    didn't do what was intended because the netdev_compute_features
    function was designed for conjunctions. So what happened was that
    it would simply take the TSO status of the last constituent device.

    This patch extends it to support both conjunctions and disjunctions
    under the new name of netdev_increment_features.

    It also adds a new function netdev_fix_features which does the
    sanity checking that usually occurs upon registration. This ensures
    that the computation doesn't result in an illegal combination
    since this checking is absent when the change is initiated via
    ethtool.

    The two users of netdev_compute_features have been converted.

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

    Herbert Xu
     

20 Oct, 2008

1 commit

  • (Supplements: ee999d8b9573df1b547aacdc6d79f86eb79c25cd)

    NFPROTO_ARP actually has a different value from NF_ARP, so ensure all
    callers use the new value so that packets _do_ get delivered to the
    registered hooks.

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

    Jan Engelhardt
     

17 Oct, 2008

1 commit


15 Oct, 2008

1 commit

  • Ingo Molnar reported a build error with ebtables:

    ERROR: "ebt_register_table" [net/bridge/netfilter/ebtable_filter.ko] undefined!
    ERROR: "ebt_do_table" [net/bridge/netfilter/ebtable_filter.ko] undefined!
    ERROR: "ebt_unregister_table" [net/bridge/netfilter/ebtable_filter.ko] undefined!
    ERROR: "ebt_register_table" [net/bridge/netfilter/ebtable_broute.ko] undefined!
    ERROR: "ebt_do_table" [net/bridge/netfilter/ebtable_broute.ko] undefined!
    ERROR: "ebt_unregister_table" [net/bridge/netfilter/ebtable_broute.ko] undefined!
    make[1]: *** [__modpost] Error 1
    make: *** [modules] Error 2

    This reason is a missing dependencies that got lost during Kconfig cleanups.
    Restore it.

    Tested-by: Ingo Molnar

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

    Patrick McHardy
     

08 Oct, 2008

14 commits