1. 02 Jul, 2013 11 commits
    • Cong Wang's avatar
      vti: remove duplicated code to fix a memory leak · ab6c7a0a
      Cong Wang authored
      vti module allocates dev->tstats twice: in vti_fb_tunnel_init()
      and in vti_tunnel_init(), this lead to a memory leak of
      dev->tstats.
      
      Just remove the duplicated operations in vti_fb_tunnel_init().
      
      (candidate for -stable)
      
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Cc: Saurabh Mohan <saurabh.mohan@vyatta.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarCong Wang <amwang@redhat.com>
      Acked-by: default avatarStephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ab6c7a0a
    • Cong Wang's avatar
      gre: fix a regression in ioctl · 6c734fb8
      Cong Wang authored
      When testing GRE tunnel, I got:
      
       # ip tunnel show
       get tunnel gre0 failed: Invalid argument
       get tunnel gre1 failed: Invalid argument
      
      This is a regression introduced by commit c5441932
      ("GRE: Refactor GRE tunneling code.") because previously we
      only check the parameters for SIOCADDTUNNEL and SIOCCHGTUNNEL,
      after that commit, the check is moved for all commands.
      
      So, just check for SIOCADDTUNNEL and SIOCCHGTUNNEL.
      
      After this patch I got:
      
       # ip tunnel show
       gre0: gre/ip  remote any  local any  ttl inherit  nopmtudisc
       gre1: gre/ip  remote 192.168.122.101  local 192.168.122.45  ttl inherit
      
      Cc: Pravin B Shelar <pshelar@nicira.com>
      Cc: "David S. Miller" <davem@davemloft.net>
      Signed-off-by: default avatarCong Wang <amwang@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6c734fb8
    • Daniel Borkmann's avatar
      net: sctp: rework debugging framework to use pr_debug and friends · bb33381d
      Daniel Borkmann authored
      We should get rid of all own SCTP debug printk macros and use the ones
      that the kernel offers anyway instead. This makes the code more readable
      and conform to the kernel code, and offers all the features of dynamic
      debbuging that pr_debug() et al has, such as only turning on/off portions
      of debug messages at runtime through debugfs. The runtime cost of having
      CONFIG_DYNAMIC_DEBUG enabled, but none of the debug statements printing,
      is negligible [1]. If kernel debugging is completly turned off, then these
      statements will also compile into "empty" functions.
      
      While we're at it, we also need to change the Kconfig option as it /now/
      only refers to the ifdef'ed code portions in outqueue.c that enable further
      debugging/tracing of SCTP transaction fields. Also, since SCTP_ASSERT code
      was enabled with this Kconfig option and has now been removed, we
      transform those code parts into WARNs resp. where appropriate BUG_ONs so
      that those bugs can be more easily detected as probably not many people
      have SCTP debugging permanently turned on.
      
      To turn on all SCTP debugging, the following steps are needed:
      
       # mount -t debugfs none /sys/kernel/debug
       # echo -n 'module sctp +p' > /sys/kernel/debug/dynamic_debug/control
      
      This can be done more fine-grained on a per file, per line basis and others
      as described in [2].
      
       [1] https://www.kernel.org/doc/ols/2009/ols2009-pages-39-46.pdf
       [2] Documentation/dynamic-debug-howto.txt
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bb33381d
    • Daniel Borkmann's avatar
      lib: vsprintf: add IPv4/v6 generic %p[Ii]S[pfs] format specifier · 10679643
      Daniel Borkmann authored
      In order to avoid making code that deals with printing both, IPv4 and
      IPv6 addresses, unnecessary complicated as for example ...
      
        if (sa.sa_family == AF_INET6)
          printk("... %pI6 ...", ..sin6_addr);
        else
          printk("... %pI4 ...", ..sin_addr.s_addr);
      
      ... it would be better to introduce a format specifier that can deal
      with those kind of situations internally; just as we have a "struct
      sockaddr" for generic mapping into "struct sockaddr_in" or "struct
      sockaddr_in6" as e.g. done in "union sctp_addr". Then, we could
      reduce the above statement into something like:
      
        printk("... %pIS ..", &sockaddr);
      
      In case our pointer is NULL, pointer() then deals with that already at
      an earlier point in time internally. While we're at it, support for both
      %piS/%pIS, where 'S' stands for sockaddr, comes (almost) for free.
      
      Additionally to that, postfix specifiers 'p', 'f' and 's' are supported
      as suggested and initially implemented in 2009 by Joe Perches [1].
      Handling of those additional specifiers orientate on the initial RFC that
      was proposed. Also we support IPv6 compressed format specified by 'c' and
      various other IPv4 extensions as stated in the documentation part.
      
      Likely, there are many other areas than just SCTP in the kernel to make
      use of this extension as well.
      
       [1] http://patchwork.ozlabs.org/patch/31480/Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      CC: Joe Perches <joe@perches.com>
      CC: linux-kernel@vger.kernel.org
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      10679643
    • David S. Miller's avatar
      Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/vxlan-next · 936faf6c
      David S. Miller authored
      Stephen Hemminger says:
      
      ====================
      Here is current updates for vxlan in net-next.  It includes Mike's changes
      to handle multiple destinations and lots of little cosmetic stuff.
      
      This is a fresh vxlan-next repository which was forked from net-next.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      936faf6c
    • Changli Gao's avatar
      net: Swap ver and type in pppoe_hdr · b1a5a34b
      Changli Gao authored
      Ver and type in pppoe_hdr should be swapped as defined by RFC2516
      section-4.
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b1a5a34b
    • Dave Jones's avatar
      x25: Fix broken locking in ioctl error paths. · 4ccb93ce
      Dave Jones authored
      Two of the x25 ioctl cases have error paths that break out of the function without
      unlocking the socket, leading to this warning:
      
      ================================================
      [ BUG: lock held when returning to user space! ]
      3.10.0-rc7+ #36 Not tainted
      ------------------------------------------------
      trinity-child2/31407 is leaving the kernel with locks still held!
      1 lock held by trinity-child2/31407:
       #0:  (sk_lock-AF_X25){+.+.+.}, at: [<ffffffffa024b6da>] x25_ioctl+0x8a/0x740 [x25]
      Signed-off-by: default avatarDave Jones <davej@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4ccb93ce
    • Eric Dumazet's avatar
      netem: use rb tree to implement the time queue · aec0a40a
      Eric Dumazet authored
      Following typical setup to implement a ~100 ms RTT and big
      amount of reorders has very poor performance because netem
      implements the time queue using a linked list.
      -----------------------------------------------------------
      ETH=eth0
      IFB=ifb0
      modprobe ifb
      ip link set dev $IFB up
      tc qdisc add dev $ETH ingress 2>/dev/null
      tc filter add dev $ETH parent ffff: \
         protocol ip u32 match u32 0 0 flowid 1:1 action mirred egress \
         redirect dev $IFB
      ethtool -K $ETH gro off tso off gso off
      tc qdisc add dev $IFB root netem delay 50ms 10ms limit 100000
      tc qd add dev $ETH root netem delay 50ms limit 100000
      ---------------------------------------------------------
      
      Switch netem time queue to a rb tree, so this kind of setup can work at
      high speed.
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aec0a40a
    • Bjørn Mork's avatar
      net: qmi_wwan: add TP-LINK MA260 · d0b5e516
      Bjørn Mork authored
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0b5e516
    • Bjørn Mork's avatar
      net: qmi_wwan: add Option GTM681W · aa3aba1c
      Bjørn Mork authored
      A standard Gobi 3000 reference design module.
      Reported-by: default avatarRichard Weinberger <richard@nod.at>
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      aa3aba1c
    • Bjørn Mork's avatar
      net: qmi_wwan: fixup Sierra Wireless MC8305 entry · 5a008ffa
      Bjørn Mork authored
      The MC8305 module got an additional entry added based solely on
      information from a Windows driver *.inf file. We now have the
      actual descriptor layout from one of these modules, and it
      consists of two alternate configurations where cfg #1 is a
      normal Gobi 2k layout and cfg #2 is MBIM only, using interface
      numbers 5 and 6 for MBIM control and data. The extra Windows
      driver entry for interface number 5 was most likely a bug.
      
      Deleting the bogus entry to avoid unnecessary qmi_wwan probe
      failures when using the MBIM configuration.
      Reported-by: default avatarLana Black <sickmind@lavabit.com>
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5a008ffa
  2. 01 Jul, 2013 21 commits
  3. 30 Jun, 2013 1 commit
    • Florian Westphal's avatar
      netfilter: nf_queue: add NFQA_SKB_CSUM_NOTVERIFIED info flag · 496e4ae7
      Florian Westphal authored
      The common case is that TCP/IP checksums have already been
      verified, e.g. by hardware (rx checksum offload), or conntrack.
      
      Userspace can use this flag to determine when the checksum
      has not been validated yet.
      
      If the flag is set, this doesn't necessarily mean that the packet has
      an invalid checksum, e.g. if NIC doesn't support rx checksum.
      
      Userspace that sucessfully enabled NFQA_CFG_F_GSO queue feature flag can
      infer that IP/TCP checksum has already been validated if either the
      SKB_INFO attribute is not present or the NFQA_SKB_CSUM_NOTVERIFIED
      flag is unset.
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      496e4ae7
  4. 29 Jun, 2013 7 commits