> Can then also change memset to zero only two bytes in the Ethernet case. > > + if (msg->msg_namelen < sizeof(struct sockaddr_ll)) { > + msg->msg_namelen = sizeof(struct sockaddr_ll); > + memset(msg->msg_name + copy_len, 0, > + msg->namelen - copy_len);
copy_len not defined .... > + } Except that has to be a real memset() not an inlined direct write of an 8byte register (or 2 writes on a 32bit systems). David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)