On Sat, Sep 29, 2018 at 05:36:06PM +0200, Klemens Nanni wrote:
> Flow labels used to be 24-bit back in 1995 until the IPv6 header format
> changed in 1998 in which the field siz was reduced to 20-bit.
>
> https://tools.ietf.org/html/rfc1883#section-6
> https://tools.ietf.org/html/rfc2460#section-6
>
> There since import at 26.10.2000.
> OK?
>
OK denis@
> Index: print-ip6.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/tcpdump/print-ip6.c,v
> retrieving revision 1.26
> diff -u -p -r1.26 print-ip6.c
> --- print-ip6.c 10 Feb 2018 10:00:32 -0000 1.26
> +++ print-ip6.c 29 Sep 2018 15:24:46 -0000
> @@ -224,19 +224,10 @@ ip6_print(const u_char *bp, u_int length
> end:
>
> flow = ntohl(ip6->ip6_flow);
> -#if 0
> - /* rfc1883 */
> - if (flow & 0x0f000000)
> - (void)printf(" [pri 0x%x]", (flow & 0x0f000000) >> 24);
> - if (flow & 0x00ffffff)
> - (void)printf(" [flowlabel 0x%x]", flow & 0x00ffffff);
> -#else
> - /* RFC 2460 */
> if (flow & 0x0ff00000)
> (void)printf(" [class 0x%x]", (flow & 0x0ff00000) >> 20);
> if (flow & 0x000fffff)
> (void)printf(" [flowlabel 0x%x]", flow & 0x000fffff);
> -#endif
>
> if (ip6->ip6_hlim <= 1)
> (void)printf(" [hlim %d]", (int)ip6->ip6_hlim);
>