Messages in this thread | | | From | Cong Wang <> | Date | Wed, 26 Jul 2017 15:01:32 -0700 | Subject | Re: [PATCH] net: inet: diag: expose sockets cgroup classid |
| |
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.
| |