Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1697591

Re: [PATCH] net: inet: diag: expose sockets cgroup classid

From Cong Wang <xiyou.wangcong@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] net: inet: diag: expose sockets cgroup classid
Date 2017-07-27 00:10 +0200
Message-ID <u7CFc-65z-9@gated-at.bofh.it> (permalink)
References <u7yie-3eE-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Jul 26, 2017 at 10:22 AM, Levin, Alexander (Sasha Levin)
<alexander.levin@verizon.com> wrote:
> +       if (ext & (1 << (INET_DIAG_CLASS_ID - 1))) {
> +               u32 classid = 0;
> +
> +#ifdef CONFIG_SOCK_CGROUP_DATA
> +               classid = sock_cgroup_classid(&sk->sk_cgrp_data);
> +#endif


If CONFIG_SOCK_CGROUP_DATA is not enabled, should we put 0
or put nothing (that is, skipping this nla_put())?

> +
> +               nla_put(skb, INET_DIAG_CLASS_ID, sizeof(classid), &classid);

nla_put_u32()

Thanks.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] net: inet: diag: expose sockets cgroup classid "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-07-26 19:30 +0200
  Re: [PATCH] net: inet: diag: expose sockets cgroup classid Cong Wang <xiyou.wangcong@gmail.com> - 2017-07-27 00:10 +0200
    Re: [PATCH] net: inet: diag: expose sockets cgroup classid "Levin, Alexander (Sasha Levin)" <alexander.levin@verizon.com> - 2017-07-27 01:10 +0200

csiph-web