~ubuntu-branches/ubuntu/wily/linux-ti-omap4/wily

« back to all changes in this revision

Viewing changes to net/packet/af_packet.c

  • Committer: Package Import Robot
  • Author(s): Paolo Pisati, Paolo Pisati
  • Date: 2013-07-11 18:35:20 UTC
  • Revision ID: package-import@ubuntu.com-20130711183520-htnf1x4y5r11hndr
Tags: 3.5.0-229.42
* Release Tracking Bug
  - LP: #1199276

[ Paolo Pisati ]

* [Config] CONFIG_ATH9K_LEGACY_RATE_CONTROL is not set

Show diffs side-by-side

added added

removed removed

Lines of Context:
2854
2854
                return -EOPNOTSUPP;
2855
2855
 
2856
2856
        uaddr->sa_family = AF_PACKET;
 
2857
        memset(uaddr->sa_data, 0, sizeof(uaddr->sa_data));
2857
2858
        rcu_read_lock();
2858
2859
        dev = dev_get_by_index_rcu(sock_net(sk), pkt_sk(sk)->ifindex);
2859
2860
        if (dev)
2860
 
                strncpy(uaddr->sa_data, dev->name, 14);
2861
 
        else
2862
 
                memset(uaddr->sa_data, 0, 14);
 
2861
                strlcpy(uaddr->sa_data, dev->name, sizeof(uaddr->sa_data));
2863
2862
        rcu_read_unlock();
2864
2863
        *uaddr_len = sizeof(*uaddr);
2865
2864