On Sun, Jul 20, 2014 at 03:52:14PM +0200, phoebe.buckheis...@itwm.fraunhofer.de 
wrote:
> > IPv6 packets sent via lowpan over iee802.15.4 with be at most 1280 octets.
> >
> > Signed-off-by: Martin Townsend <mtownsend1...@gmail.com>
> > ---
> >   net/ieee802154/reassembly.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/net/ieee802154/reassembly.c b/net/ieee802154/reassembly.c
> > index b85bd3f..758377b 100644
> > --- a/net/ieee802154/reassembly.c
> > +++ b/net/ieee802154/reassembly.c
> > @@ -529,7 +529,7 @@ static int __net_init lowpan_frags_init_net(struct
> > net *net)
> >       ieee802154_lowpan->frags.high_thresh = IPV6_FRAG_HIGH_THRESH;
> >       ieee802154_lowpan->frags.low_thresh = IPV6_FRAG_LOW_THRESH;
> >       ieee802154_lowpan->frags.timeout = IPV6_FRAG_TIMEOUT;
> > -    ieee802154_lowpan->max_dsize = 0xFFFF;
> > +    ieee802154_lowpan->max_dsize = IPV6_MIN_MTU;
> 
> If you do that, you should probably also adjust the lowpan device MTU to
> 1280. It is currently set at 1281 for some reason.
> 

yes, we should make an another patch which fix this to be RFC complaint.

diff --git a/net/ieee802154/6lowpan_rtnl.c b/net/ieee802154/6lowpan_rtnl.c
index fe6bd7a..6371644 100644
--- a/net/ieee802154/6lowpan_rtnl.c
+++ b/net/ieee802154/6lowpan_rtnl.c
@@ -433,7 +433,7 @@ static void lowpan_setup(struct net_device *dev)
        /* Frame Control + Sequence Number + Address fields + Security Header */
        dev->hard_header_len    = 2 + 1 + 20 + 14;
        dev->needed_tailroom    = 2; /* FCS */
-       dev->mtu                = 1281;
+       dev->mtu                = IPV6_MIN_MTU;
        dev->tx_queue_len       = 0;
        dev->flags              = IFF_BROADCAST | IFF_MULTICAST;
        dev->watchdog_timeo     = 0;

- Alex


------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Linux-zigbee-devel mailing list
Linux-zigbee-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel

Reply via email to