Hi,

CISTPL_FUNCE_LAN_NODE_ID format is
   04 06 yy yy yy yy yy yy ff.
yy is mac address.
so the length is 9.


> > tuple->TupleDataLen should be ETH_ALEN + 3;
> 
> Hmmm... ETH_ALEN is 6, both xirc2ps_cs.c and ssb/pcmcia.c checked for
> TupleDataLen==8... Maybe this isn't as standardized as it should be. Might
> 
> > -   if (tuple->TupleDataLen != ETH_ALEN + 2)
> > +   if (tuple->TupleDataLen < (ETH_ALEN + 2))
> 
> be more suitable?
> 

That's OK.

but I want to add warning messeage.

        if (tuple->TupleData[0] != CISTPL_FUNCE_LAN_NODE_ID)
                return -EINVAL;
        if (tuple->TupleDataLen < ETH_ALEN + 2) {
                dev_printk(.....);
                return -EINVAL;
        }
        if (tuple->TupleData[1] != ETH_ALEN) {
                dev_printk(.......);
                return -EINVAL;
        }

Best Regards
Komuro



_______________________________________________
Linux PCMCIA reimplementation list
http://lists.infradead.org/mailman/listinfo/linux-pcmcia

Reply via email to