1. 01 6月, 2016 1 次提交
  2. 30 5月, 2016 4 次提交
    • S
      net: l2tp: Make l2tp_ip6 namespace aware · 0e6b5259
      Shmulik Ladkani 提交于
      l2tp_ip6 tunnel and session lookups were still using init_net, although
      the l2tp core infrastructure already supports lookups keyed by 'net'.
      
      As a result, l2tp_ip6_recv discarded packets for tunnels/sessions
      created in namespaces other than the init_net.
      
      Fix, by using dev_net(skb->dev) or sock_net(sk) where appropriate.
      Signed-off-by: NShmulik Ladkani <shmulik.ladkani@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0e6b5259
    • B
      ieee802154: fix logic error in ieee802154_llsec_parse_dev_addr · 421eeea1
      Baozeng Ding 提交于
      Fix a logic error to avoid potential null pointer dereference.
      Signed-off-by: NBaozeng Ding <sploving1@gmail.com>
      Reviewed-by: Stefan Schmidt<stefan@osg.samsung.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      421eeea1
    • A
      net/lapb: tuse %*ph to dump buffers · 0d08df6c
      Andy Shevchenko 提交于
      Use %*ph specifier to dump small buffers in hex format instead doing this
      byte-by-byte.
      Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      0d08df6c
    • A
      fou: add Kconfig options for IPv6 support · fabb13db
      Arnd Bergmann 提交于
      A previous patch added the fou6.ko module, but that failed to link
      in a couple of configurations:
      
      net/built-in.o: In function `ip6_tnl_encap_add_fou_ops':
      net/ipv6/fou6.c:88: undefined reference to `ip6_tnl_encap_add_ops'
      net/ipv6/fou6.c:94: undefined reference to `ip6_tnl_encap_add_ops'
      net/ipv6/fou6.c:97: undefined reference to `ip6_tnl_encap_del_ops'
      net/built-in.o: In function `ip6_tnl_encap_del_fou_ops':
      net/ipv6/fou6.c:106: undefined reference to `ip6_tnl_encap_del_ops'
      net/ipv6/fou6.c:107: undefined reference to `ip6_tnl_encap_del_ops'
      
      If CONFIG_IPV6=m, ip6_tnl_encap_add_ops/ip6_tnl_encap_del_ops
      are in a module, but fou6.c can still be built-in, and that
      obviously fails to link.
      
      Also, if CONFIG_IPV6=y, but CONFIG_IPV6_TUNNEL=m or
      CONFIG_IPV6_TUNNEL=n, the same problem happens for a different
      reason.
      
      This adds two new silent Kconfig symbols to work around both
      problems:
      
      - CONFIG_IPV6_FOU is now always set to 'm' if either CONFIG_NET_FOU=m
        or CONFIG_IPV6=m
      - CONFIG_IPV6_FOU_TUNNEL is set implicitly when IPV6_FOU is enabled
        and NET_FOU_IP_TUNNELS is also turned out, and it will ensure
        that CONFIG_IPV6_TUNNEL is also available.
      
      The options could be made user-visible as well, to give additional
      room for configuration, but it seems easier not to bother users
      with more choice here.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Fixes: aa3463d6 ("fou: Add encap ops for IPv6 tunnels")
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fabb13db
  3. 26 5月, 2016 3 次提交
  4. 25 5月, 2016 4 次提交
  5. 24 5月, 2016 2 次提交
    • E
      ipv4: Fix non-initialized TTL when CONFIG_SYSCTL=n · 049bbf58
      Ezequiel Garcia 提交于
      Commit fa50d974 ("ipv4: Namespaceify ip_default_ttl sysctl knob")
      moves the default TTL assignment, and as side-effect IPv4 TTL now
      has a default value only if sysctl support is enabled (CONFIG_SYSCTL=y).
      
      The sysctl_ip_default_ttl is fundamental for IP to work properly,
      as it provides the TTL to be used as default. The defautl TTL may be
      used in ip_selected_ttl, through the following flow:
      
        ip_select_ttl
          ip4_dst_hoplimit
            net->ipv4.sysctl_ip_default_ttl
      
      This commit fixes the issue by assigning net->ipv4.sysctl_ip_default_ttl
      in net_init_net, called during ipv4's initialization.
      
      Without this commit, a kernel built without sysctl support will send
      all IP packets with zero TTL (unless a TTL is explicitly set, e.g.
      with setsockopt).
      
      Given a similar issue might appear on the other knobs that were
      namespaceify, this commit also moves them.
      
      Fixes: fa50d974 ("ipv4: Namespaceify ip_default_ttl sysctl knob")
      Signed-off-by: NEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      049bbf58
    • S
      net/atm: sk_err_soft must be positive · c685293a
      Stefan Hajnoczi 提交于
      The sk_err and sk_err_soft fields are positive errno values and
      userspace applications rely on this when using getsockopt(SO_ERROR).
      
      ATM code places an -errno into sk_err_soft in sigd_send() and returns it
      from svc_addparty()/svc_dropparty().
      
      Although I am not familiar with ATM code I came to this conclusion
      because:
      
      1. sigd_send() msg->type cases as_okay and as_error both have:
      
         sk->sk_err = -msg->reply;
      
         while the as_addparty and as_dropparty cases have:
      
         sk->sk_err_soft = msg->reply;
      
         This is the source of the inconsistency.
      
      2. svc_addparty() returns an -errno and assumes sk_err_soft is also an
         -errno:
      
             if (flags & O_NONBLOCK) {
                 error = -EINPROGRESS;
                 goto out;
             }
             ...
             error = xchg(&sk->sk_err_soft, 0);
         out:
             release_sock(sk);
             return error;
      
         This shows that sk_err_soft is indeed being treated as an -errno.
      
      This patch ensures that sk_err_soft is always a positive errno.
      Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c685293a
  6. 21 5月, 2016 20 次提交
  7. 20 5月, 2016 5 次提交
  8. 18 5月, 2016 1 次提交