mfkexpress wrote:
> I think there is a bug related to setting ip6 header version in 
> IP6H_VTCFL_SET() function.
> Because this function do not set the header version to 6 which I found by 
> debugging into my code.
> [..]
> IP6H_VTCFL_SET(ip6hdr, 6, tc, 0);
> ip6hdr->_v_tc_fl = htonl(ip6hdr->_v_tc_fl | (0x6));
> ip6hdr->_v_tc_fl = htonl((ip6hdr->_v_tc_fl) << 28);
> [..]
> Is it proper approach?

Doesn't seem like the proper approach, no.

Could you try this instead:

#define IP6H_VTCFL_SET(hdr, v, tc, fl) (hdr)->_v_tc_fl = (htonl((((u32_t)(v)) 
<< 28) | (((u32_t)(tc)) << 20) | (fl)))

Maybe your compiler has problems with shifting the constant '6' left by 28... 
Which platform were you using again?


Simon

_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to