Re: [PATCH] packet_sendmsg_spkt incorrectly truncates an interfacename

From: Raj
Date: Tue Feb 10 2004 - 03:23:08 EST




On Tue, 10 Feb 2004, MAEDA Naoaki wrote:

> Hi,
>
> > > Obviously, max name length of a network interface name is IFNAMESIZ-1,
> > > which is 15.
> >
> > Yes, but sockaddr_pkt.spkt_device[] is only 14 bytes for some reason.
>
> Oops! I have not checked it.
> Does anybody know the reason why it is only 14 bytes?
>
include/linux/socket.h
struct sockaddr {
...
char sa_data[14]; /* 14 bytes of protocol address */
};

A 14 byte field here too !. Maybe there is an explanation.

/Raj
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/