On Fri, Feb 13, 2015 at 6:19 PM, Stuart Henderson <st...@openbsd.org> wrote:
> In sys/net/if_media.c r1.19 (2007/12/20) the return code for unknown
> ioctl requests was changed from EINVAL to ENOTTY.
>
> libpcap uses a SIOCGIFMEDIA to determine whether an interface can use
> rfmon mode; this change breaks this. Noticed because wireshark doesn't
> identify the correct DLT for interfaces (like pflog0 or lo0) which
> don't support this ioctl.
>
> Diff below allows libpcap to accept either EINVAL or ENOTTY as "can't
> lookup capabilities so just say the device doesn't support it". It might
> be appropriate to just replace the existing EINVAL case but I thought
> this would be safer for now (in case some interface does have a specific
> handler for SIOCGIFMEDIA which returns EINVAL).
>
> OK?

Yes, ok with me.

ciao,
David

Reply via email to