On Sun, Feb 20, 2011 at 10:59:48PM +0100, Stefan Sperling wrote:
> mos(4) doesn't set IFF_BROADCAST, which prevents hostapd(8) from using it.
> hostapd tries a SIOCGIFBRDADDR ioctl which fails with EINVAL in netinet/in.c:
> 
>         case SIOCGIFBRDADDR:
>                 if ((ifp->if_flags & IFF_BROADCAST) == 0)
>                         return (EINVAL);
> 
> Index: if_mos.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/usb/if_mos.c,v
> retrieving revision 1.13
> diff -u -p -r1.13 if_mos.c
> --- if_mos.c  25 Jan 2011 20:03:35 -0000      1.13
> +++ if_mos.c  20 Feb 2011 21:46:53 -0000
> @@ -719,7 +719,7 @@ mos_attach(struct device *parent, struct
>       /* Initialize interface info.*/
>       ifp = GET_IFP(sc);
>       ifp->if_softc = sc;
> -     ifp->if_flags = IFF_SIMPLEX | IFF_MULTICAST;
> +     ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
>       ifp->if_ioctl = mos_ioctl;
>       ifp->if_start = mos_start;
>       ifp->if_watchdog = mos_watchdog;
> 

Makes sense. All ethernet devices should set at least IFF_BROADCAST and
IFF_MULTICAST. OK claudio@

-- 
:wq Claudio

Reply via email to