12 Jun, 2009

1 commit

  • This patch changes FDB entry check for ATM LANE bridge integration.
    There's no point in holding a FDB entry around SKB building.

    br_fdb_get()/br_fdb_put() pair are changed into single br_fdb_test_addr()
    hook that checks if the addr has FDB entry pointing to other port
    to the one the request arrived on.

    FDB entry refcounting is removed as it's not used anywhere else.

    Signed-off-by: Michał Mirosław
    Acked-by: Stephen Hemminger
    Signed-off-by: David S. Miller

    Michał Mirosław
     

11 Jun, 2009

1 commit


04 Jun, 2009

1 commit


03 Jun, 2009

2 commits

  • Define three accessors to get/set dst attached to a skb

    struct dst_entry *skb_dst(const struct sk_buff *skb)

    void skb_dst_set(struct sk_buff *skb, struct dst_entry *dst)

    void skb_dst_drop(struct sk_buff *skb)
    This one should replace occurrences of :
    dst_release(skb->dst)
    skb->dst = NULL;

    Delete skb->dst field

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

    Eric Dumazet
     
  • Define skb_rtable(const struct sk_buff *skb) accessor to get rtable from skb

    Delete skb->rtable field

    Setting rtable is not allowed, just set dst instead as rtable is an alias.

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

    Eric Dumazet
     

02 Jun, 2009

1 commit


28 May, 2009

1 commit


19 May, 2009

1 commit


18 May, 2009

2 commits

  • If bridge is configured with no STP and forwarding delay of 0 (which
    is typical for virtualization) then when link starts it will flood all
    packets for the first 20 seconds.

    This bug was introduced by a combination of earlier changes:
    * forwarding database uses hold time of zero to indicate
    user wants to always flood packets
    * optimzation of the case of forwarding delay of 0 avoids the initial
    timer tick

    The fix is to just skip all the topology change detection code if
    kernel STP is not being used.

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

    Stephen Hemminger
     
  • Currently the bridge catches all STP packets; even if STP is turned
    off. This prevents other systems (which do have STP turned on)
    from being able to detect loops in the network.

    With this patch, if STP is off, then any packet sent to the STP
    multicast group address is forwarded to all ports.

    Based on earlier patch by Joakim Tjernlund with changes
    to go through forwarding (not local chain), and optimization
    that only last octet needs to be checked.

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

    Stephen Hemminger
     

08 May, 2009

1 commit


20 Apr, 2009

1 commit

  • br_nf_dev_queue_xmit only checks for ETH_P_IP packets for fragmenting but not
    VLAN packets. This results in dropping of large VLAN packets. This can be
    observed when connection tracking is enabled. Connection tracking re-assembles
    fragmented packets, and these have to re-fragmented when transmitting out. Also,
    make sure only refragmented packets are defragmented as per suggestion from
    Patrick McHardy.

    Signed-off-by: Saikiran Madugula
    Signed-off-by: Patrick McHardy

    hummerbliss@gmail.com
     

26 Mar, 2009

5 commits

  • David S. Miller
     
  • This patch renames the ebt_ulog nf_logger from "ulog" to "ebt_ulog" to
    be in sync with other modules naming. As this name was currently only
    used for informational purpose, the renaming should be harmless.

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

    Eric Leblond
     
  • The ebt_ulog module does not follow the fixed convention about function
    return. Loading the module is triggering the following message:

    sys_init_module: 'ebt_ulog'->init suspiciously returned 1, it should follow 0/-E convention
    sys_init_module: loading module anyway...
    Pid: 2334, comm: modprobe Not tainted 2.6.29-rc5edenwall0-00883-g199e57b #146
    Call Trace:
    [] ? printk+0xf/0x16
    [] sys_init_module+0x107/0x186
    [] syscall_call+0x7/0xb

    The following patch fixes the return treatment in ebt_ulog_init()
    function.

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

    Eric Leblond
     
  • This patch fixes the declaration of the logger structure in ebt_log
    and ebt_ulog: I forgot to remove the const option from their declaration
    in the commit ca735b3aaa945626ba65a3e51145bfe4ecd9e222 ("netfilter:
    use a linked list of loggers").

    Pointed-out-by: Stephen Rothwell
    Signed-off-by: Eric Leblond
    Signed-off-by: David S. Miller

    Eric Leblond
     
  • This fixes an crash when empty bond device is added to a bridge.
    If an interface with invalid ethernet address (all zero) is added
    to a bridge, then bridge code detects it when setting up the forward
    databas entry. But the error unwind is broken, the bridge port object
    can get freed twice: once when ref count went to zeo, and once by kfree.
    Since object is never really accessible, just free it.

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

    Stephen Hemminger
     

25 Mar, 2009

1 commit


25 Feb, 2009

1 commit

  • This patch changes the return value of nlmsg_notify() as follows:

    If NETLINK_BROADCAST_ERROR is set by any of the listeners and
    an error in the delivery happened, return the broadcast error;
    else if there are no listeners apart from the socket that
    requested a change with the echo flag, return the result of the
    unicast notification. Thus, with this patch, the unicast
    notification is handled in the same way of a broadcast listener
    that has set the NETLINK_BROADCAST_ERROR socket flag.

    This patch is useful in case that the caller of nlmsg_notify()
    wants to know the result of the delivery of a netlink notification
    (including the broadcast delivery) and take any action in case
    that the delivery failed. For example, ctnetlink can drop packets
    if the event delivery failed to provide reliable logging and
    state-synchronization at the cost of dropping packets.

    This patch also modifies the rtnetlink code to ignore the return
    value of rtnl_notify() in all callers. The function rtnl_notify()
    (before this patch) returned the error of the unicast notification
    which makes rtnl_set_sk_err() reports errors to all listeners. This
    is not of any help since the origin of the change (the socket that
    requested the echoing) notices the ENOBUFS error if the notification
    fails and should resync itself.

    Signed-off-by: Pablo Neira Ayuso
    Acked-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Pablo Neira Ayuso
     

18 Feb, 2009

1 commit


10 Feb, 2009

2 commits

  • Conflicts:
    drivers/net/gianfar.c

    David S. Miller
     
  • > 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
     

01 Feb, 2009

1 commit


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

7 commits