summaryrefslogtreecommitdiff
path: root/include/net/netlink.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-04-19 14:30:10 -0400
committerDavid S. Miller <davem@davemloft.net>2016-04-19 14:30:10 -0400
commit18402843bf88c2e9674e1a3a05c73b7d9b09ee05 (patch)
treeec57ed115507f9b2b6bf920575036d0ff5e656ec /include/net/netlink.h
parentb67d1df5ad0c227adc89d2913e933ed4addc5dab (diff)
net: Align IFLA_STATS64 attributes properly on architectures that need it.
Since the nlattr header is 4 bytes in size, it can cause the netlink attribute payload to not be 8-byte aligned. This is particularly troublesome for IFLA_STATS64 which contains 64-bit statistic values. Solve this by creating a dummy IFLA_PAD attribute which has a payload which is zero bytes in size. When HAVE_EFFICIENT_UNALIGNED_ACCESS is false, we insert an IFLA_PAD attribute into the netlink response when necessary such that the IFLA_STATS64 payload will be properly aligned. With help and suggestions from Eric Dumazet. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netlink.h')
0 files changed, 0 insertions, 0 deletions