--- zzzz-none-000/linux-4.4.60/net/socket.c 2017-04-08 07:53:53.000000000 +0000 +++ jet-2400-727/linux-4.4.60/net/socket.c 2021-03-17 14:36:41.000000000 +0000 @@ -890,6 +890,9 @@ void __user *argp = (void __user *)arg; int pid, err; struct net *net; +#ifdef CONFIG_AVM_SK_TC_INDEX + unsigned long tc_index; +#endif sock = file->private_data; sk = sock->sk; @@ -951,6 +954,21 @@ err = dlci_ioctl_hook(cmd, argp); mutex_unlock(&dlci_ioctl_mutex); break; + +#ifdef CONFIG_AVM_SK_TC_INDEX + case SIOCSET_TC_INDEX: + err = -EFAULT; + if (get_user(tc_index, (unsigned long __user *)argp)) + break; + sock->sk->sk_tc_index = tc_index; + err = 0; + break; + + case SIOCGET_TC_INDEX: + err = put_user(sock->sk->sk_tc_index, (unsigned long __user *)argp); + break; +#endif + default: err = sock_do_ioctl(net, sock, cmd, arg); break;