mirror of
https://github.com/OpenEtherCATsociety/SOEM.git
synced 2026-03-23 07:42:33 +08:00
Fixes uninitialised value was created by a stack allocation by ecx_setupnic (nicdrv.c:170)
This commit is contained in:
committed by
Hans-Erik Floryd
parent
791b782a59
commit
0cc34318a7
@@ -167,6 +167,7 @@ int ecx_setupnic(ecx_portt *port, const char *ifname, int secondary)
|
||||
r |= ioctl(*psock, SIOCSIFFLAGS, &ifr);
|
||||
|
||||
/* bind socket to protocol, in this case RAW EtherCAT */
|
||||
memset((void*)&sll, 0, sizeof(sll));
|
||||
sll.sll_family = AF_PACKET;
|
||||
sll.sll_ifindex = ifindex;
|
||||
sll.sll_protocol = htons(ETH_P_ECAT);
|
||||
|
||||
Reference in New Issue
Block a user