Re: My network device don't work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 20, 2017 at 02:32:31PM +0200, wiktoria.lewicka wrote:
> Hello.
> I write simple network device, but its don't work. Module is loading, loading, loading...
> Code:
> [...]
Hello,
"strncpy(my_netdev.name, DEV_NAME, 5)" only copies the 5 chars in "chwdp" without the null byte. You could bump it to 6
or maybe change 5 to IFNAMSIZ (the net_device.name's size) and then change the last byte to '\0' manually

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux