From 01a13aa4fe0cb668fc535d38d6f9383433923874 Mon Sep 17 00:00:00 2001 From: Jiri Benc Date: Sat, 13 Jun 2015 21:46:47 +0200 Subject: netlink: implement nla_put_in_addr and nla_put_in6_addr IP addresses are often stored in netlink attributes. Add generic functions to do that. For nla_put_in_addr, it would be nicer to pass struct in_addr but this is not used universally throughout the kernel, in way too many places __be32 is used to store IPv4 address. Signed-off-by: Jiri Benc Signed-off-by: David S. Miller Compatibility part added. Signed-off-by: Jozsef Kadlecsik --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index c032bf6..6b6ba1f 100644 --- a/configure.ac +++ b/configure.ac @@ -416,6 +416,16 @@ else AC_SUBST(HAVE_NF_BRIDGE_GET_PHYSDEV, undef) fi +AC_MSG_CHECKING([kernel source for nla_put_in_addr]) +if test -f $ksourcedir/include/net/netlink.h && \ + $GREP -q 'nla_put_in_add' $ksourcedir/include/net/netlink.h; then + AC_MSG_RESULT(yes) + AC_SUBST(HAVE_NLA_PUT_IN_ADDR, define) +else + AC_MSG_RESULT(no) + AC_SUBST(HAVE_NLA_PUT_IN_ADDR, undef) +fi + AC_MSG_CHECKING([kernel source for struct net_generic]) if test -f $ksourcedir/include/net/netns/generic.h && \ $GREP -q 'struct net_generic' $ksourcedir/include/net/netns/generic.h; then -- cgit v1.2.3