drivers/connector/connector.c
145
if (nlh->nlmsg_len < NLMSG_HDRLEN + sizeof(struct cn_msg) + msg->len)
drivers/connector/connector.c
205
len = nlmsg_len(nlh);
drivers/connector/connector.c
208
skb->len < nlh->nlmsg_len ||
drivers/infiniband/core/addr.c
95
nlmsg_len(nlh), ib_nl_addr_policy, NULL);
drivers/infiniband/core/iwpm_util.c
700
nlmsg_bytes += nlh->nlmsg_len;
drivers/infiniband/core/iwpm_util.c
703
if (NLMSG_GOODSIZE - nlmsg_bytes < nlh->nlmsg_len * 2) {
drivers/infiniband/core/netlink.c
221
if (nlh->nlmsg_len < NLMSG_HDRLEN || skb->len < nlh->nlmsg_len)
drivers/infiniband/core/netlink.c
248
msglen = NLMSG_ALIGN(nlh->nlmsg_len);
drivers/infiniband/core/sa_query.c
1066
nlmsg_len(nlh), ib_nl_policy, NULL);
drivers/infiniband/core/sa_query.c
1120
nlmsg_len(nlh), ib_nl_policy, NULL);
drivers/infiniband/core/sa_query.c
951
len = nlmsg_len(nlh);
drivers/net/wireless/virtual/mac80211_hwsim.c
6853
if (skb->len < nlh->nlmsg_len)
drivers/scsi/scsi_netlink.c
43
if ((nlh->nlmsg_len < (sizeof(*nlh) + sizeof(*hdr))) ||
drivers/scsi/scsi_netlink.c
44
(skb->len < nlh->nlmsg_len)) {
drivers/scsi/scsi_netlink.c
50
rlen = NLMSG_ALIGN(nlh->nlmsg_len);
drivers/scsi/scsi_netlink.c
71
if (nlh->nlmsg_len < (sizeof(*nlh) + hdr->msglen)) {
drivers/scsi/scsi_transport_iscsi.c
2844
nlhstat->nlmsg_len = actual_size;
drivers/scsi/scsi_transport_iscsi.c
3355
nlhchap->nlmsg_len = actual_size;
drivers/scsi/scsi_transport_iscsi.c
3761
nlhhost_stats->nlmsg_len = actual_size;
drivers/scsi/scsi_transport_iscsi.c
4067
if (nlh->nlmsg_len < sizeof(*nlh) + sizeof(*ev) ||
drivers/scsi/scsi_transport_iscsi.c
4068
skb->len < nlh->nlmsg_len) {
drivers/scsi/scsi_transport_iscsi.c
4073
rlen = NLMSG_ALIGN(nlh->nlmsg_len);
include/net/genetlink.h
583
return (nlh->nlmsg_len - GENL_HDRLEN - NLMSG_HDRLEN);
include/net/netlink.h
1083
nlh->nlmsg_len = skb_tail_pointer(skb) - (unsigned char *)nlh;
include/net/netlink.h
619
return nlh->nlmsg_len - NLMSG_HDRLEN;
include/net/netlink.h
632
if (nlh->nlmsg_len < nlmsg_msg_size(len))
include/net/netlink.h
657
return nlmsg_len(nlh) - NLMSG_ALIGN(hdrlen);
include/net/netlink.h
668
nlh->nlmsg_len >= sizeof(struct nlmsghdr) &&
include/net/netlink.h
669
nlh->nlmsg_len <= remaining);
include/net/netlink.h
683
int totlen = NLMSG_ALIGN(nlh->nlmsg_len);
include/net/netlink.h
784
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen)) {
include/net/netlink.h
928
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
include/net/rtnetlink.h
66
if (nlmsg_len(nlh) >= sizeof(struct rtgenmsg))
include/uapi/linux/netlink.h
104
#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
include/uapi/linux/netlink.h
106
NLMSG_ALIGN((nlh)->nlmsg_len)))
include/uapi/linux/netlink.h
108
(nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
include/uapi/linux/netlink.h
109
(nlh)->nlmsg_len <= (len))
include/uapi/linux/netlink.h
110
#define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
include/uapi/linux/netlink.h
53
__u32 nlmsg_len;
kernel/audit.c
1272
data_len = nlmsg_len(nlh);
kernel/audit.c
1380
if (sizeof(s) > (size_t)nlh->nlmsg_len)
kernel/audit.c
2774
nlh->nlmsg_len = skb->len - NLMSG_HDRLEN;
kernel/audit.c
873
nlh->nlmsg_len = skb->len;
net/can/gw.c
1091
if (nlmsg_len(nlh) < sizeof(*r))
net/can/gw.c
1224
if (nlmsg_len(nlh) < sizeof(*r))
net/core/neighbour.c
1965
if (nlmsg_len(nlh) < sizeof(*ndm))
net/core/neighbour.c
2956
if (nlmsg_len(nlh) >= sizeof(struct ndmsg) &&
net/core/rtnetlink.c
2460
hdrlen = nlmsg_len(nlh) < sizeof(struct ifinfomsg) ?
net/core/rtnetlink.c
4342
hdrlen = nlmsg_len(nlh) < sizeof(struct ifinfomsg) ?
net/core/rtnetlink.c
4345
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
net/core/rtnetlink.c
4972
if (nlmsg_len(nlh) != sizeof(struct ndmsg) &&
net/core/rtnetlink.c
4973
(nlmsg_len(nlh) != sizeof(struct ndmsg) +
net/core/rtnetlink.c
5517
if (nlmsg_len(nlh) < sizeof(*ifm))
net/core/rtnetlink.c
5598
if (nlmsg_len(nlh) < sizeof(*ifm))
net/core/rtnetlink.c
6901
if (nlmsg_len(nlh) < sizeof(struct rtgenmsg))
net/core/sock_diag.c
234
if (nlmsg_len(nlh) < sizeof(*req))
net/ipv4/devinet.c
2242
if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(struct netconfmsg))) {
net/ipv4/devinet.c
2353
if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*ncm))) {
net/ipv4/fib_frontend.c
1038
} else if (nlmsg_len(nlh) >= sizeof(struct rtmsg)) {
net/ipv4/fib_frontend.c
1414
skb->len < nlh->nlmsg_len ||
net/ipv4/fib_frontend.c
1415
nlmsg_len(nlh) < sizeof(*frn))
net/ipv4/inet_diag.c
948
nlmsg_len(nlh) < hdrlen)
net/ipv4/inet_diag.c
968
if (nlmsg_len(h) < hdrlen)
net/ipv4/ipmr.c
1012
nlh->nlmsg_len = skb_tail_pointer(skb) -
net/ipv4/ipmr.c
1016
nlh->nlmsg_len = nlmsg_msg_size(sizeof(struct nlmsgerr));
net/ipv4/ipmr.c
1017
skb_trim(skb, nlh->nlmsg_len);
net/ipv4/ipmr.c
751
nlh->nlmsg_len = nlmsg_msg_size(sizeof(struct nlmsgerr));
net/ipv4/ipmr.c
752
skb_trim(skb, nlh->nlmsg_len);
net/ipv6/addrconf.c
624
if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(struct netconfmsg))) {
net/ipv6/addrconf.c
751
if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*ncm))) {
net/ipv6/ip6_fib.c
649
} else if (nlmsg_len(nlh) >= sizeof(struct rtmsg)) {
net/ipv6/ip6mr.c
1041
nlh->nlmsg_len = skb_tail_pointer(skb) - (u8 *)nlh;
net/ipv6/ip6mr.c
1044
nlh->nlmsg_len = nlmsg_msg_size(sizeof(struct nlmsgerr));
net/ipv6/ip6mr.c
1045
skb_trim(skb, nlh->nlmsg_len);
net/ipv6/ip6mr.c
802
nlh->nlmsg_len = nlmsg_msg_size(sizeof(struct nlmsgerr));
net/ipv6/ip6mr.c
803
skb_trim(skb, nlh->nlmsg_len);
net/mpls/af_mpls.c
1250
if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(struct netconfmsg))) {
net/mpls/af_mpls.c
1364
if (nlh->nlmsg_len < nlmsg_msg_size(sizeof(*ncm))) {
net/netfilter/ipset/ip_set_core.c
1526
nlh->nlmsg_len - min_len,
net/netfilter/ipset/ip_set_core.c
1698
pr_debug("nlmsg_len: %u\n", nlh->nlmsg_len);
net/netfilter/ipset/ip_set_core.c
1767
sizeof(*errmsg) + nlmsg_len(nlh));
net/netfilter/ipset/ip_set_core.c
1780
unsafe_memcpy(&errmsg->msg, nlh, nlh->nlmsg_len,
net/netfilter/ipset/ip_set_core.c
1786
nlh->nlmsg_len - min_len, ip_set_adt_policy,
net/netfilter/ipset/ip_set_core.c
1996
pr_debug("Send TYPE, nlmsg_len: %u\n", nlh2->nlmsg_len);
net/netfilter/nfnetlink.c
225
if (nlmsg_len(nlh) < sizeof(struct nfgenmsg))
net/netfilter/nfnetlink.c
259
int attrlen = nlh->nlmsg_len - min_len;
net/netfilter/nfnetlink.c
451
if (nlh->nlmsg_len < NLMSG_HDRLEN ||
net/netfilter/nfnetlink.c
452
skb->len < nlh->nlmsg_len ||
net/netfilter/nfnetlink.c
453
nlmsg_len(nlh) < sizeof(struct nfgenmsg)) {
net/netfilter/nfnetlink.c
504
int attrlen = nlh->nlmsg_len - min_len;
net/netfilter/nfnetlink.c
563
msglen = NLMSG_ALIGN(nlh->nlmsg_len);
net/netfilter/nfnetlink.c
619
int attrlen = nlh->nlmsg_len - min_len;
net/netfilter/nfnetlink.c
625
msglen = NLMSG_ALIGN(nlh->nlmsg_len);
net/netfilter/nfnetlink.c
657
nlh->nlmsg_len < NLMSG_HDRLEN ||
net/netfilter/nfnetlink.c
658
skb->len < nlh->nlmsg_len)
net/netfilter/nfnetlink_log.c
659
nlh->nlmsg_len = inst->skb->tail - old_tail;
net/netfilter/nfnetlink_queue.c
925
nlh->nlmsg_len = skb->len;
net/netlink/af_netlink.c
2146
nlh->nlmsg_len = size;
net/netlink/af_netlink.c
2190
addr - (const void *) nlh >= nlh->nlmsg_len);
net/netlink/af_netlink.c
2479
payload += nlmsg_len(nlh);
net/netlink/af_netlink.c
2500
if (!nlmsg_append(skb, nlmsg_len(nlh)))
net/netlink/af_netlink.c
2504
nlmsg_len(nlh));
net/netlink/af_netlink.c
2539
if (nlh->nlmsg_len < NLMSG_HDRLEN || skb->len < nlh->nlmsg_len)
net/netlink/af_netlink.c
2559
msglen = NLMSG_ALIGN(nlh->nlmsg_len);
net/netlink/diag.c
230
if (nlmsg_len(h) < hdrlen)
net/netlink/genetlink.c
1171
if (nlh->nlmsg_len < nlmsg_msg_size(hdrlen))
net/netlink/genetlink.c
976
ctx->nlh->nlmsg_len < nlmsg_msg_size(ctx->hdrlen))
net/openvswitch/datapath.c
597
((struct nlmsghdr *) user_skb->data)->nlmsg_len = user_skb->len;
net/packet/diag.c
230
if (nlmsg_len(h) < hdrlen)
net/sched/act_api.c
1677
nlh->nlmsg_len = skb_tail_pointer(skb) - b;
net/sched/act_api.c
1809
nlh->nlmsg_len = skb_tail_pointer(skb) - b;
net/sched/act_api.c
2279
nlh->nlmsg_len = skb_tail_pointer(skb) - b;
net/sched/cls_api.c
2101
nlh->nlmsg_len = skb_tail_pointer(skb) - b;
net/sched/cls_api.c
2858
if (nlmsg_len(cb->nlh) < sizeof(*tcm))
net/sched/cls_api.c
2995
nlh->nlmsg_len = skb_tail_pointer(skb) - b;
net/sched/cls_api.c
3257
if (nlmsg_len(cb->nlh) < sizeof(*tcm))
net/sched/sch_api.c
1983
nlh->nlmsg_len = skb_tail_pointer(skb) - b;
net/sched/sch_api.c
2423
if (nlmsg_len(cb->nlh) < sizeof(*tcm))
net/sched/sch_api.c
972
nlh->nlmsg_len = skb_tail_pointer(skb) - b;
net/tipc/diag.c
82
if (nlmsg_len(h) < hdrlen)
net/tipc/netlink_compat.c
1331
rep_nlh->nlmsg_len = msg.rep->len;
net/tipc/netlink_compat.c
213
if (nlmsg_len(cb.nlh) > 0) {
net/unix/diag.c
293
if (nlmsg_len(h) < hdrlen)
net/vmw_vsock/diag.c
146
if (nlmsg_len(h) < hdrlen)
net/wireless/nl80211.c
18184
memset(nlmsg_data(nlh), 0, nlmsg_len(nlh));
net/xdp/xsk_diag.c
187
if (nlmsg_len(hdr) < hdrlen)
net/xfrm/xfrm_compat.c
371
size_t len = nlmsg_len(src);
net/xfrm/xfrm_compat.c
433
nlmsg->nlmsg_len += nla->nla_len;
net/xfrm/xfrm_compat.c
486
dst->nlmsg_len = NLMSG_HDRLEN + xfrm_msg_min[type];
net/xfrm/xfrm_compat.c
558
pos = dst->nlmsg_len;
net/xfrm/xfrm_compat.c
625
if (len == nlmsg_len(h32))
samples/bpf/xdp_router_ipv4_user.c
280
req.nl.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
samples/bpf/xdp_router_ipv4_user.c
290
iov.iov_len = req.nl.nlmsg_len;
samples/bpf/xdp_router_ipv4_user.c
416
req.nl.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtmsg));
samples/bpf/xdp_router_ipv4_user.c
425
iov.iov_len = req.nl.nlmsg_len;
samples/connector/ucon.c
60
nlh->nlmsg_len = size;
security/selinux/hooks.c
6156
if (nlh->nlmsg_len < NLMSG_HDRLEN || nlh->nlmsg_len > data_len)
security/selinux/hooks.c
6189
msg_len = NLMSG_ALIGN(nlh->nlmsg_len);
security/selinux/netlink.c
86
nlh->nlmsg_len = skb->tail - tmp;
tools/accounting/delaytop.c
434
msg.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN);
tools/accounting/delaytop.c
445
msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len);
tools/accounting/delaytop.c
448
buflen = msg.n.nlmsg_len;
tools/accounting/getdelays.c
130
msg.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN);
tools/accounting/getdelays.c
141
msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len);
tools/accounting/getdelays.c
144
buflen = msg.n.nlmsg_len ;
tools/accounting/getdelays.c
653
sizeof(struct nlmsghdr), msg.n.nlmsg_len, rep_len);
tools/accounting/procacct.c
136
msg.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN);
tools/accounting/procacct.c
147
msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len);
tools/accounting/procacct.c
150
buflen = msg.n.nlmsg_len;
tools/accounting/procacct.c
368
sizeof(struct nlmsghdr), msg.n.nlmsg_len, rep_len);
tools/bpf/bpftool/net.c
221
len = nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*t));
tools/bpf/bpftool/net.c
236
.nlh.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcmsg)),
tools/bpf/bpftool/net.c
245
if (send(sock, &req, req.nlh.nlmsg_len, 0) < 0)
tools/bpf/bpftool/net.c
260
len = nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*t));
tools/bpf/bpftool/net.c
275
.nlh.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcmsg)),
tools/bpf/bpftool/net.c
284
if (send(sock, &req, req.nlh.nlmsg_len, 0) < 0)
tools/bpf/bpftool/net.c
299
len = nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*t));
tools/bpf/bpftool/net.c
314
.nlh.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcmsg)),
tools/bpf/bpftool/net.c
324
if (send(sock, &req, req.nlh.nlmsg_len, 0) < 0)
tools/bpf/bpftool/net.c
338
len = nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*ifi));
tools/bpf/bpftool/net.c
353
.nlh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)),
tools/bpf/bpftool/net.c
361
if (send(sock, &req, req.nlh.nlmsg_len, 0) < 0)
tools/include/uapi/linux/netlink.h
100
#define NLMSG_PAYLOAD(nlh,len) ((nlh)->nlmsg_len - NLMSG_SPACE((len)))
tools/include/uapi/linux/netlink.h
45
__u32 nlmsg_len; /* Length of message including header */
tools/include/uapi/linux/netlink.h
95
#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
tools/include/uapi/linux/netlink.h
96
(struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
tools/include/uapi/linux/netlink.h
98
(nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && \
tools/include/uapi/linux/netlink.h
99
(nlh)->nlmsg_len <= (len))
tools/lib/bpf/netlink.c
239
if (send(sock, req, req->nh.nlmsg_len, 0) < 0) {
tools/lib/bpf/netlink.c
272
.nh.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN),
tools/lib/bpf/netlink.c
296
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg));
tools/lib/bpf/netlink.c
353
len = nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*ifi));
tools/lib/bpf/netlink.c
436
.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg)),
tools/lib/bpf/netlink.c
486
req.nh.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN);
tools/lib/bpf/netlink.c
608
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcmsg));
tools/lib/bpf/netlink.c
768
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcmsg));
tools/lib/bpf/netlink.c
845
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcmsg));
tools/lib/bpf/netlink.c
912
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcmsg));
tools/lib/bpf/nlattr.c
177
hlen += nlmsg_len(&err->msg);
tools/lib/bpf/nlattr.c
180
alen = (void *)nlh + nlh->nlmsg_len - (void *)attr;
tools/lib/bpf/nlattr.c
83
return nlh->nlmsg_len - NLMSG_HDRLEN;
tools/lib/bpf/nlattr.h
138
return (struct nlattr *)((void *)req + NLMSG_ALIGN(req->nh.nlmsg_len));
tools/lib/bpf/nlattr.h
146
if (NLMSG_ALIGN(req->nh.nlmsg_len) + NLA_ALIGN(NLA_HDRLEN + len) > sizeof(*req))
tools/lib/bpf/nlattr.h
156
req->nh.nlmsg_len = NLMSG_ALIGN(req->nh.nlmsg_len) + NLA_ALIGN(nla->nla_len);
tools/net/ynl/lib/ynl-priv.h
153
nlh->nlmsg_len = NLMSG_HDRLEN;
tools/net/ynl/lib/ynl-priv.h
160
return nlh->nlmsg_len - NLMSG_HDRLEN;
tools/net/ynl/lib/ynl-priv.h
176
return (char *)nlh + nlh->nlmsg_len;
tools/net/ynl/lib/ynl-priv.h
184
nlh->nlmsg_len += NLMSG_ALIGN(size);
tools/net/ynl/lib/ynl-priv.h
211
for ((attr) = ynl_attr_first(nlh, (nlh)->nlmsg_len, \
tools/net/ynl/lib/ynl-priv.h
262
o = nlh->nlmsg_len + NLA_HDRLEN + NLMSG_ALIGN(size) > nlh->nlmsg_pid;
tools/net/ynl/lib/ynl-priv.h
281
nlh->nlmsg_len += NLA_HDRLEN;
tools/net/ynl/lib/ynl-priv.h
307
nlh->nlmsg_len += NLMSG_ALIGN(attr->nla_len);
tools/net/ynl/lib/ynl-priv.h
326
nlh->nlmsg_len += NLMSG_ALIGN(attr->nla_len);
tools/net/ynl/lib/ynl.c
1052
err = send(ys->socket, req_nlh, req_nlh->nlmsg_len, 0);
tools/net/ynl/lib/ynl.c
713
err = send(ys->socket, nlh, nlh->nlmsg_len, 0);
tools/net/ynl/lib/ynl.c
995
err = send(ys->socket, req_nlh, req_nlh->nlmsg_len, 0);
tools/testing/selftests/bpf/netlink_helpers.c
193
int len = h->nlmsg_len;
tools/testing/selftests/bpf/netlink_helpers.c
270
.iov_len = n->nlmsg_len,
tools/testing/selftests/bpf/netlink_helpers.c
318
if (NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len) > maxlen) {
tools/testing/selftests/bpf/netlink_helpers.c
328
n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len);
tools/testing/selftests/bpf/netlink_helpers.c
334
if (NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len) > maxlen) {
tools/testing/selftests/bpf/netlink_helpers.c
342
n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + NLMSG_ALIGN(len);
tools/testing/selftests/bpf/netlink_helpers.c
357
return n->nlmsg_len;
tools/testing/selftests/bpf/netlink_helpers.h
24
((struct rtattr *) (((void *) (nmsg)) + NLMSG_ALIGN((nmsg)->nlmsg_len)))
tools/testing/selftests/bpf/prog_tests/tc_links.c
1809
req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct tcmsg));
tools/testing/selftests/bpf/prog_tests/tc_netkit.c
57
req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg));
tools/testing/selftests/bpf/prog_tests/tc_redirect.c
181
req.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg));
tools/testing/selftests/bpf/prog_tests/tc_redirect.c
192
req.n.nlmsg_len += sizeof(struct ifinfomsg);
tools/testing/selftests/bpf/prog_tests/test_bpf_smc.c
74
msg.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN);
tools/testing/selftests/bpf/prog_tests/test_bpf_smc.c
85
msg.n.nlmsg_len += NLMSG_ALIGN(na->nla_len);
tools/testing/selftests/bpf/prog_tests/test_bpf_smc.c
88
buflen = msg.n.nlmsg_len;
tools/testing/selftests/bpf/prog_tests/xfrm_info.c
175
(struct rtattr *)((uint8_t *)nh + RTA_ALIGN(nh->nlmsg_len));
tools/testing/selftests/bpf/prog_tests/xfrm_info.c
178
nh->nlmsg_len = RTA_ALIGN(nh->nlmsg_len) + RTA_ALIGN(rta->rta_len);
tools/testing/selftests/bpf/prog_tests/xfrm_info.c
198
uint8_t *end = (uint8_t *)nh + nh->nlmsg_len;
tools/testing/selftests/bpf/prog_tests/xfrm_info.c
217
nh->nlmsg_len = NLMSG_LENGTH(sizeof(req.info));
tools/testing/selftests/bpf/prog_tests/xfrm_info.c
236
ret = send(sock, nh, nh->nlmsg_len, 0);
tools/testing/selftests/bpf/prog_tests/xfrm_info.c
237
if (!ASSERT_EQ(ret, nh->nlmsg_len, "netlink send length"))
tools/testing/selftests/bpf/xsk.c
404
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(struct ifinfomsg));
tools/testing/selftests/bpf/xsk.c
409
rta = (struct rtattr *)(((char *)&req) + NLMSG_ALIGN(req.nh.nlmsg_len));
tools/testing/selftests/bpf/xsk.c
412
req.nh.nlmsg_len = NLMSG_ALIGN(req.nh.nlmsg_len) + RTA_LENGTH(sizeof(mtu));
tools/testing/selftests/bpf/xsk.c
415
ret = send(fd, &req, req.nh.nlmsg_len, 0);
tools/testing/selftests/connector/proc_filter.c
48
hdr->nlmsg_len = NL_MESSAGE_SIZE;
tools/testing/selftests/connector/proc_filter.c
50
hdr->nlmsg_len = NL_MESSAGE_SIZE_NF;
tools/testing/selftests/connector/proc_filter.c
74
if (send(nl_sock, hdr, hdr->nlmsg_len, 0) == -1) {
tools/testing/selftests/landlock/audit.h
147
.nlmsg_len = NLMSG_SPACE(sizeof(msg.rule)) +
tools/testing/selftests/landlock/audit.h
174
.nlmsg_len = NLMSG_SPACE(sizeof(msg.rule)),
tools/testing/selftests/landlock/audit.h
195
.nlmsg_len = NLMSG_SPACE(sizeof(msg.status)),
tools/testing/selftests/landlock/audit.h
70
ret = sendto(fd, msg, msg->header.nlmsg_len, 0,
tools/testing/selftests/landlock/audit.h
77
if (ret != msg->header.nlmsg_len)
tools/testing/selftests/nci/nci_dev.c
122
msg.n.nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN);
tools/testing/selftests/nci/nci_dev.c
140
msg.n.nlmsg_len += prv_len;
tools/testing/selftests/nci/nci_dev.c
144
buflen = msg.n.nlmsg_len;
tools/testing/selftests/net/af_unix/diag_uid.c
161
render_response(_metadata, NLMSG_DATA(nlh), nlh->nlmsg_len);
tools/testing/selftests/net/af_unix/diag_uid.c
85
.nlmsg_len = sizeof(req),
tools/testing/selftests/net/ipsec.c
1032
req.nh.nlmsg_len = NLMSG_LENGTH(0);
tools/testing/selftests/net/ipsec.c
1048
if (send(xfrm_sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/ipsec.c
1117
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info));
tools/testing/selftests/net/ipsec.c
1152
if (send(xfrm_sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/ipsec.c
1190
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.id));
tools/testing/selftests/net/ipsec.c
1203
if (send(xfrm_sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/ipsec.c
1241
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.id));
tools/testing/selftests/net/ipsec.c
1256
if (send(xfrm_sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/ipsec.c
1297
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.spi));
tools/testing/selftests/net/ipsec.c
1307
if (send(xfrm_sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/ipsec.c
1390
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.acq));
tools/testing/selftests/net/ipsec.c
1405
if (send(xfrm_sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/ipsec.c
1468
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.expire));
tools/testing/selftests/net/ipsec.c
1479
if (send(xfrm_sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/ipsec.c
1543
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.expire));
tools/testing/selftests/net/ipsec.c
1557
if (send(xfrm_sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/ipsec.c
1609
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.unused));
tools/testing/selftests/net/ipsec.c
1632
if (send(xfrm_sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/ipsec.c
1671
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.unused));
tools/testing/selftests/net/ipsec.c
1675
if (send(xfrm_sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/ipsec.c
216
return (struct rtattr *)((char *)(nh) + RTA_ALIGN((nh)->nlmsg_len));
tools/testing/selftests/net/ipsec.c
224
size_t nl_size = RTA_ALIGN(nh->nlmsg_len) + RTA_LENGTH(size);
tools/testing/selftests/net/ipsec.c
230
nh->nlmsg_len = nl_size;
tools/testing/selftests/net/ipsec.c
259
char *nlmsg_end = (char *)nh + nh->nlmsg_len;
tools/testing/selftests/net/ipsec.c
325
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info));
tools/testing/selftests/net/ipsec.c
355
if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/ipsec.c
373
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info));
tools/testing/selftests/net/ipsec.c
397
if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/ipsec.c
413
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info));
tools/testing/selftests/net/ipsec.c
423
if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/ipsec.c
441
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.rt));
tools/testing/selftests/net/ipsec.c
461
if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/ipsec.c
933
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info));
tools/testing/selftests/net/ipsec.c
965
if (send(xfrm_sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/mptcp/mptcp_diag.c
118
.nlmsg_len = sizeof(req),
tools/testing/selftests/net/mptcp/mptcp_diag.c
139
req.nlh.nlmsg_len += RTA_LENGTH(sizeof(proto));
tools/testing/selftests/net/mptcp/mptcp_diag.c
271
nlh->nlmsg_len - NLMSG_LENGTH(sizeof(*r)),
tools/testing/selftests/net/mptcp/pm_nl_ctl.c
1089
int len = nh->nlmsg_len;
tools/testing/selftests/net/mptcp/pm_nl_ctl.c
1187
nh->nlmsg_len = off;
tools/testing/selftests/net/mptcp/pm_nl_ctl.c
1225
int len = nh->nlmsg_len;
tools/testing/selftests/net/mptcp/pm_nl_ctl.c
148
msg_len = nh->nlmsg_len - NLMSG_LENGTH(GENL_HDRLEN);
tools/testing/selftests/net/mptcp/pm_nl_ctl.c
232
nh->nlmsg_len = len;
tools/testing/selftests/net/mptcp/pm_nl_ctl.c
259
int len = nlh->nlmsg_len;
tools/testing/selftests/net/mptcp/pm_nl_ctl.c
270
nlh->nlmsg_len, nlh->nlmsg_type);
tools/testing/selftests/net/mptcp/pm_nl_ctl.c
56
nh->nlmsg_len = NLMSG_LENGTH(GENL_HDRLEN);
tools/testing/selftests/net/mptcp/pm_nl_ctl.c
69
int len = nh->nlmsg_len - sizeof(*nh);
tools/testing/selftests/net/netfilter/audit_logread.c
53
.nlmsg_len = NLMSG_SPACE(sizeof(msg.u.s)),
tools/testing/selftests/net/netfilter/audit_logread.c
70
ret = sendto(fd, &msg, msg.nlh.nlmsg_len, 0,
tools/testing/selftests/net/netfilter/audit_logread.c
74
if (ret != (int)msg.nlh.nlmsg_len)
tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
119
if (mnl_socket_sendto(sock, nlh, nlh->nlmsg_len) < 0) {
tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
242
ret = mnl_socket_sendto(sock, nlh, nlh->nlmsg_len);
tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
289
ret = mnl_socket_sendto(sock, nlh, nlh->nlmsg_len);
tools/testing/selftests/net/netfilter/nf_queue.c
231
if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) {
tools/testing/selftests/net/netfilter/nf_queue.c
245
if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) {
tools/testing/selftests/net/netfilter/nf_queue.c
320
if (mnl_socket_sendto(nl, nlh, nlh->nlmsg_len) < 0) {
tools/testing/selftests/net/netlink-dumps.c
181
.nlmsg_len = sizeof(dump_policies),
tools/testing/selftests/net/netlink-dumps.c
97
.nlmsg_len = sizeof(dump_neigh_bad),
tools/testing/selftests/net/ovpn/ovpn-cli.c
1068
if ((int)(NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len)) > maxlen) {
tools/testing/selftests/net/ovpn/ovpn-cli.c
1083
n->nlmsg_len = NLMSG_ALIGN(n->nlmsg_len) + RTA_ALIGN(len);
tools/testing/selftests/net/ovpn/ovpn-cli.c
1186
.iov_len = payload->nlmsg_len,
tools/testing/selftests/net/ovpn/ovpn-cli.c
1266
len = h->nlmsg_len;
tools/testing/selftests/net/ovpn/ovpn-cli.c
1364
req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.i));
tools/testing/selftests/net/ovpn/ovpn-cli.c
1408
req.n.nlmsg_len = NLMSG_LENGTH(sizeof(req.i));
tools/testing/selftests/net/ovpn/ovpn-cli.c
255
int len = nlh->nlmsg_len;
tools/testing/selftests/net/ovpn/ovpn-cli.c
266
ack_len += err->msg.nlmsg_len - sizeof(*nlh);
tools/testing/selftests/net/tap.c
128
ret = send(rtnl, &req, req.nh.nlmsg_len, 0);
tools/testing/selftests/net/tap.c
131
ret = (unsigned int)ret != req.nh.nlmsg_len;
tools/testing/selftests/net/tap.c
153
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info));
tools/testing/selftests/net/tap.c
161
ret = send(rtnl, &req, req.nh.nlmsg_len, 0);
tools/testing/selftests/net/tap.c
165
ret = (unsigned int)ret != req.nh.nlmsg_len;
tools/testing/selftests/net/tap.c
37
(struct rtattr *)((uint8_t *)nh + RTA_ALIGN(nh->nlmsg_len));
tools/testing/selftests/net/tap.c
40
nh->nlmsg_len = RTA_ALIGN(nh->nlmsg_len) + RTA_ALIGN(rta->rta_len);
tools/testing/selftests/net/tap.c
51
uint8_t *end = (uint8_t *)nh + nh->nlmsg_len;
tools/testing/selftests/net/tap.c
96
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info));
tools/testing/selftests/net/tcp_ao/lib/netlink.c
104
char *nlmsg_end = (char *)nh + nh->nlmsg_len;
tools/testing/selftests/net/tcp_ao/lib/netlink.c
147
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info));
tools/testing/selftests/net/tcp_ao/lib/netlink.c
177
if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/tcp_ao/lib/netlink.c
210
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info));
tools/testing/selftests/net/tcp_ao/lib/netlink.c
222
if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/tcp_ao/lib/netlink.c
258
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.rt));
tools/testing/selftests/net/tcp_ao/lib/netlink.c
278
if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/tcp_ao/lib/netlink.c
317
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info));
tools/testing/selftests/net/tcp_ao/lib/netlink.c
327
if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/tcp_ao/lib/netlink.c
361
req.nh.nlmsg_len = NLMSG_LENGTH(sizeof(req.info));
tools/testing/selftests/net/tcp_ao/lib/netlink.c
395
if (send(sock, &req, req.nh.nlmsg_len, 0) < 0) {
tools/testing/selftests/net/tcp_ao/lib/netlink.c
62
return (struct rtattr *)((char *)(nh) + RTA_ALIGN((nh)->nlmsg_len));
tools/testing/selftests/net/tcp_ao/lib/netlink.c
70
size_t nl_size = RTA_ALIGN(nh->nlmsg_len) + RTA_LENGTH(size);
tools/testing/selftests/net/tcp_ao/lib/netlink.c
76
nh->nlmsg_len = nl_size;
tools/testing/vsock/vsock_diag_test.c
176
.nlmsg_len = sizeof(req),
tools/testing/vsock/vsock_diag_test.c
290
if (h->nlmsg_len < NLMSG_LENGTH(sizeof(*err)))
tools/testing/vsock/vsock_diag_test.c
305
if (h->nlmsg_len <