1. 08 11月, 2009 1 次提交
    • E
      net: Support specifying the network namespace upon device creation. · 81adee47
      Eric W. Biederman 提交于
      There is no good reason to not support userspace specifying the
      network namespace during device creation, and it makes it easier
      to create a network device and pass it to a child network namespace
      with a well known name.
      
      We have to be careful to ensure that the target network namespace
      for the new device exists through the life of the call.  To keep
      that logic clear I have factored out the network namespace grabbing
      logic into rtnl_link_get_net.
      
      In addtion we need to continue to pass the source network namespace
      to the rtnl_link_ops.newlink method so that we can find the base
      device source network namespace.
      Signed-off-by: NEric W. Biederman <ebiederm@aristanetworks.com>
      Acked-by: NEric Dumazet <eric.dumazet@gmail.com>
      81adee47
  2. 20 10月, 2009 1 次提交
    • W
      can: provide library functions for skb allocation · 7b6856a0
      Wolfgang Grandegger 提交于
      This patch makes the private functions alloc_can_skb() and
      alloc_can_err_skb() of the at91_can driver public and adapts all
      drivers to use these. While making the patch I realized, that
      the skb's are *not* setup consistently. It's now done as shown
      below:
      
        skb->protocol = htons(ETH_P_CAN);
        skb->pkt_type = PACKET_BROADCAST;
        skb->ip_summed = CHECKSUM_UNNECESSARY;
        *cf = (struct can_frame *)skb_put(skb, sizeof(struct can_frame));
        memset(*cf, 0, sizeof(struct can_frame));
      
      The frame is zeroed out to avoid uninitialized data to be passed to
      user space. Some drivers or library code did not set "pkt_type" or
      "ip_summed". Also,  "__constant_htons()" should not be used for
      runtime invocations, as pointed out by David Miller.
      Signed-off-by: NWolfgang Grandegger <wg@grandegger.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7b6856a0
  3. 13 10月, 2009 1 次提交
  4. 04 9月, 2009 1 次提交
  5. 03 9月, 2009 1 次提交
  6. 14 8月, 2009 1 次提交
  7. 21 7月, 2009 2 次提交
  8. 01 6月, 2009 1 次提交
  9. 19 5月, 2009 1 次提交