1. 20 12月, 2018 1 次提交
  2. 29 8月, 2018 1 次提交
  3. 27 6月, 2018 1 次提交
  4. 08 1月, 2018 1 次提交
    • H
      xfrm: Return error on unknown encap_type in init_state · bcfd09f7
      Herbert Xu 提交于
      Currently esp will happily create an xfrm state with an unknown
      encap type for IPv4, without setting the necessary state parameters.
      This patch fixes it by returning -EINVAL.
      
      There is a similar problem in IPv6 where if the mode is unknown
      we will skip initialisation while returning zero.  However, this
      is harmless as the mode has already been checked further up the
      stack.  This patch removes this anomaly by aligning the IPv6
      behaviour with IPv4 and treating unknown modes (which cannot
      actually happen) as transport mode.
      
      Fixes: 38320c70 ("[IPSEC]: Use crypto_aead and authenc in ESP")
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
      bcfd09f7
  5. 20 12月, 2017 2 次提交
  6. 03 11月, 2017 1 次提交
  7. 27 10月, 2017 1 次提交
  8. 23 10月, 2017 1 次提交
  9. 31 8月, 2017 1 次提交
  10. 25 8月, 2017 2 次提交
  11. 02 8月, 2017 2 次提交
  12. 13 7月, 2017 1 次提交
  13. 01 7月, 2017 1 次提交
  14. 16 6月, 2017 1 次提交
    • J
      networking: make skb_push & __skb_push return void pointers · d58ff351
      Johannes Berg 提交于
      It seems like a historic accident that these return unsigned char *,
      and in many places that means casts are required, more often than not.
      
      Make these functions return void * and remove all the casts across
      the tree, adding a (u8 *) cast only where the unsigned char pointer
      was used directly, all done with the following spatch:
      
          @@
          expression SKB, LEN;
          typedef u8;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - *(fn(SKB, LEN))
          + *(u8 *)fn(SKB, LEN)
      
          @@
          expression E, SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          type T;
          @@
          - E = ((T *)(fn(SKB, LEN)))
          + E = fn(SKB, LEN)
      
          @@
          expression SKB, LEN;
          identifier fn = { skb_push, __skb_push, skb_push_rcsum };
          @@
          - fn(SKB, LEN)[0]
          + *(u8 *)fn(SKB, LEN)
      
      Note that the last part there converts from push(...)[0] to the
      more idiomatic *(u8 *)push(...).
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d58ff351
  15. 05 6月, 2017 1 次提交
  16. 22 5月, 2017 1 次提交
  17. 24 4月, 2017 1 次提交
  18. 14 4月, 2017 5 次提交
  19. 17 1月, 2017 2 次提交
  20. 30 11月, 2016 1 次提交
  21. 05 11月, 2016 1 次提交
    • L
      net: inet: Support UID-based routing in IP protocols. · e2d118a1
      Lorenzo Colitti 提交于
      - Use the UID in routing lookups made by protocol connect() and
        sendmsg() functions.
      - Make sure that routing lookups triggered by incoming packets
        (e.g., Path MTU discovery) take the UID of the socket into
        account.
      - For packets not associated with a userspace socket, (e.g., ping
        replies) use UID 0 inside the user namespace corresponding to
        the network namespace the socket belongs to. This allows
        all namespaces to apply routing and iptables rules to
        kernel-originated traffic in that namespaces by matching UID 0.
        This is better than using the UID of the kernel socket that is
        sending the traffic, because the UID of kernel sockets created
        at namespace creation time (e.g., the per-processor ICMP and
        TCP sockets) is the UID of the user that created the socket,
        which might not be mapped in the namespace.
      
      Tested: compiles allnoconfig, allyesconfig, allmodconfig
      Tested: https://android-review.googlesource.com/253302Signed-off-by: NLorenzo Colitti <lorenzo@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e2d118a1
  22. 28 5月, 2015 1 次提交
  23. 13 5月, 2015 1 次提交
  24. 01 4月, 2015 1 次提交
  25. 24 11月, 2014 1 次提交
  26. 12 11月, 2014 1 次提交
    • J
      net: Convert LIMIT_NETDEBUG to net_dbg_ratelimited · ba7a46f1
      Joe Perches 提交于
      Use the more common dynamic_debug capable net_dbg_ratelimited
      and remove the LIMIT_NETDEBUG macro.
      
      All messages are still ratelimited.
      
      Some KERN_<LEVEL> uses are changed to KERN_DEBUG.
      
      This may have some negative impact on messages that were
      emitted at KERN_INFO that are not not enabled at all unless
      DEBUG is defined or dynamic_debug is enabled.  Even so,
      these messages are now _not_ emitted by default.
      
      This also eliminates the use of the net_msg_warn sysctl
      "/proc/sys/net/core/warnings".  For backward compatibility,
      the sysctl is not removed, but it has no function.  The extern
      declaration of net_msg_warn is removed from sock.h and made
      static in net/core/sysctl_net_core.c
      
      Miscellanea:
      
      o Update the sysctl documentation
      o Remove the embedded uses of pr_fmt
      o Coalesce format fragments
      o Realign arguments
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ba7a46f1
  27. 07 11月, 2014 1 次提交
    • J
      net: esp: Convert NETDEBUG to pr_info · 45083497
      Joe Perches 提交于
      Commit 64ce2073 ("[NET]: Make NETDEBUG pure printk wrappers")
      originally had these NETDEBUG printks as always emitting.
      
      Commit a2a316fd ("[NET]: Replace CONFIG_NET_DEBUG with sysctl")
      added a net_msg_warn sysctl to these NETDEBUG uses.
      
      Convert these NETDEBUG uses to normal pr_info calls.
      
      This changes the output prefix from "ESP: " to include
      "IPSec: " for the ipv4 case and "IPv6: " for the ipv6 case.
      
      These output lines are now like the other messages in the files.
      
      Other miscellanea:
      
      Neaten the arithmetic spacing to be consistent with other
      arithmetic spacing in the files.
      Signed-off-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      45083497
  28. 25 8月, 2014 2 次提交
  29. 14 3月, 2014 1 次提交
  30. 07 12月, 2013 1 次提交
  31. 29 10月, 2013 1 次提交