diff options
| author | David S. Miller <davem@davemloft.net> | 2015-03-31 13:58:36 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-03-31 13:58:36 -0400 |
| commit | 8e1fa36b3f5347eabd02385883fb5757aed56687 (patch) | |
| tree | 2a4deef870f2c01f36a27cfb7501e726d833880c /include/uapi/linux | |
| parent | f0ef31264cde8b489a0b87149ebc3a72cef4c58a (diff) | |
| parent | 67b61f6c130a05b2cd4c3dfded49a751ff42c534 (diff) | |
Merge branch 'nla_in_addr'
Jiri Benc says:
====================
netlink: access functions for IP address attributes
There are many places that read or write IP addresses to netlink attributes.
With IPv6 addresses, every such place currently has to use generic nla_put
and nla_memcpy. Implementing IPv6 address access functions simplify things
and makes the code more intelligible. IPv4 address access functions has
lesser value but it would be better to be consistent between IPv6 and IPv4
and they still serve as documentation.
The conversion is straightforward and the resulting patches are not that
large, thus I kept all the changes in the patches that introduce the access
functions. If anyone prefers to split the definition of access functions and
the conversion and/or break it out by network protocols, please let me know.
While doing the conversion, I came across ugly typecasting in
inetpeer_addr_base and xfrm_address_t when dealing with IPv6 addresses.
Instead of introducing more of this, I cleaned it up. Those are the first
two patches, serving as a prerequisite to the latter two.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi/linux')
| -rw-r--r-- | include/uapi/linux/xfrm.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/xfrm.h b/include/uapi/linux/xfrm.h index 02d5125a5ee8..2cd9e608d0d1 100644 --- a/include/uapi/linux/xfrm.h +++ b/include/uapi/linux/xfrm.h @@ -1,6 +1,7 @@ #ifndef _LINUX_XFRM_H #define _LINUX_XFRM_H +#include <linux/in6.h> #include <linux/types.h> /* All of the structures in this file may not change size as they are @@ -13,6 +14,7 @@ typedef union { __be32 a4; __be32 a6[4]; + struct in6_addr in6; } xfrm_address_t; /* Ident of a specific xfrm_state. It is used on input to lookup |
