[PATCH 1/2] idiag: add a copy of linux/sock_diag.h

Cong Wang xiyou.wangcong at gmail.com
Fri Oct 24 09:52:28 PDT 2014


On Fri, Oct 24, 2014 at 9:43 AM, Cong Wang <xiyou.wangcong at gmail.com> wrote:
> Good catch! I am wondering why compiler doesn't complain this.
>
> I don't think we can drop this, otherwise we would have access
> out of boundary. Probably we really need a run-time check,
> that is, changing #if to if(). Of course, smart compiler should
> still be able to drop that code on older kernel.
>
> Ideally, kernel should define SK_MEMINFO_BACKLOG as
> a macro so that we can just test it with #ifdef. :(

Never mind... we can just drop that check since we have a copy.
Needs some coffee. :(



More information about the libnl mailing list