Hi, this patch restricts 6lowpan to IEEE802154 devices (in order to make sure that the BUG_ONs in mib.c are not triggered).
I am however currently trying to get 6lowpan running on a tun device. This would enable to use the Linux 6lowpan stack with e.g. Contiki's tunslip6. The only changes needed to enable 6lowpan-on-tun are to replace the calls to ieee802154_mlme_ops(real_dev)->get_XXX(real_dev); where XXX = pan_id|short_addr|dsn Would it be acceptable for the maintainers to have module parameters to 6lowpan specify pan_id and short_addr (while counting dsn in the module itself) when not running on top of a IEEE802154 device? BR, Markus On Saturday 05 October 2013 23:15:18 Alan Ott wrote: > Refuse to create 6lowpan links if the actual hardware interface is > of any type other than ARPHRD_IEEE802154. > > Signed-off-by: Alan Ott <a...@signal11.us> > Suggested-by: Alexander Aring <alex.ar...@gmail.com> > --- > net/ieee802154/6lowpan.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c > index c85e71e..8f56b2b 100644 > --- a/net/ieee802154/6lowpan.c > +++ b/net/ieee802154/6lowpan.c > @@ -1372,6 +1372,8 @@ static int lowpan_newlink(struct net *src_net, struct > net_device *dev, real_dev = dev_get_by_index(src_net, > nla_get_u32(tb[IFLA_LINK])); if (!real_dev) > return -ENODEV; > + if (real_dev->type != ARPHRD_IEEE802154) > + return -EINVAL; > > lowpan_dev_info(dev)->real_dev = real_dev; > lowpan_dev_info(dev)->fragment_tag = 0; ------------------------------------------------ | Dipl.-Ing. Markus Becker | Communication Networks | TZI - Center for Computing Technologies | University Bremen | Germany ------------------------------------------------ | web: http://www-user.uni-bremen.de/~beckerm/ | mailto: m...@comnets.uni-bremen.de | telephone: +49 421 218 62379 | building: NW1 room: N2260 ------------------------------------------------ ------------------------------------------------------------------------------ November Webinars for C, C++, Fortran Developers Accelerate application performance with scalable programming models. Explore techniques for threading, error checking, porting, and tuning. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk _______________________________________________ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel