On Tue, Sep 25, 2018 at 09:11:42AM +0800, Nan Xiao wrote:
> Hi tech@,
> 
> According to netcat source code, the `-T' option not only takes effect
> in IPv4 but also IPv6:
> 
>       if (Tflag != -1) {
>               if (af == AF_INET && setsockopt(s, IPPROTO_IP,
>                   IP_TOS, &Tflag, sizeof(Tflag)) == -1)
>                       err(1, "set IP ToS");
> 
>               else if (af == AF_INET6 && setsockopt(s, IPPROTO_IPV6,
>                   IPV6_TCLASS, &Tflag, sizeof(Tflag)) == -1)
>                       err(1, "set IPv6 traffic class");
>       }
> 
> So I think the following patch should be more accurate:
> 

fixed, thanks.
jmc

> diff --git nc.1 nc.1
> index cb391288f15..5588daf87ae 100644
> --- nc.1
> +++ nc.1
> @@ -241,7 +241,7 @@ Cannot be used together with
>  or
>  .Fl x .
>  .It Fl T Ar keyword
> -Change the IPv4 TOS value or the TLS options.
> +Change the IPv4 TOS/IPv6 Traffic Class value or the TLS options.
>  .Pp
>  For TLS options,
>  .Ar keyword
> @@ -269,7 +269,7 @@ for further details).
>  Specifying TLS options requires
>  .Fl c .
>  .Pp
> -For the IPv4 TOS value,
> +For the IPv4 TOS/IPv6 Traffic Class value,
>  .Ar keyword
>  may be one of
>  .Cm critical ,
> 
> 
> Thanks!
> 
> -- 
> Best Regards
> Nan Xiao
> 

Reply via email to