On Tue, Aug 23, 2005 at 05:28:00PM -0400, Mike Kershaw wrote: > Very small patch to allow setting of the link type of the virtual tapX > interfaces in tun/tap. Needed for writing packets of other arp link > types to tap, ie 80211 wireless frames. > > Implemented as a simple IOCTL to set the arptype.
> @@ -612,6 +615,11 @@ static int tun_chr_ioctl(struct inode *i > DBG(KERN_INFO "%s: owner set to %d\n", tun->dev->name, > tun->owner); > break; > > + case TUNSETLINK: > + tun->dev->type = (int) arg; > + DBG(KERN_INFO "%s: linktype set to %d\n", tun->dev->name, > tun->dev->type); > + break; > + > #ifdef TUN_DEBUG > case TUNSETDEBUG: > tun->debug = arg; Do you need to do some range validation on arg before setting tun->dev->type? John -- John W. Linville [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html