On Mon, Jun 06, 2005 at 08:16:38PM +1200, Matthew Luckie wrote: > If I was to pursue this, would someone on this list consider committing the > work to current? ... > + case DLT_NULL: > + sockp->sa_family = AF_UNSPEC; > + if(strcmp(ifp->if_name, "tun") == 0) > + hlen = sizeof(int); > + else > + hlen = 0; > + break;
Maybe this won't work if an instance of tun is renamed? I'd compare "tun" with ifp->if_dname (driver name) to be on the safe side. Because tun instances allow their if_type to be set, one cannot use if_type as the sole key for determining if the ifnet is of type 'tun'; this would be ambiguous, as tun instances may have their if_type set by an ioctl. Another way of dealing with this would be to ask the tcpdump.org guys to define a DLT type for tun interfaces, rather than special-casing it for DLT_NULL. Regards, BMS _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "[EMAIL PROTECTED]"