Re: af_packet.c bug?
From: Ben Greear <hidden>
Date: 2005-03-28 20:33:41
Thomas Graf wrote:
* Ben Greear [ref] 2005-03-28 12:08quoted
quoted
Seems so, please adopt the size of spkt_device in struct sockaddr_pktyou mean adapt maybe?Of course, stupid typo. ;->quoted
I was also wondering why we couldn't hold a reference to the net-device instead of just it's ifindex when dealing with a bound raw socket.Saving a netdevice handle in the packet socket is not a problem but doing the same for the packet socket address seems to be non trivial.
Yes. But assuming you bind the socket, you use the device saved in the packet socket. If you are sending to a particular device for each send(), then you'll just have to pay the lookup costs. I haven't looked recently, but didn't someone finally hash the device lookup so that it's not a linear walk of the device list now? Ben -- Ben Greear [off-list ref] Candela Technologies Inc http://www.candelatech.com