|
@@ -1190,6 +1190,16 @@ static inline struct in6_addr nla_get_in6_addr(const struct nlattr *nla)
|
|
|
return tmp;
|
|
return tmp;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/**
|
|
|
|
|
+ * nla_memdup - duplicate attribute memory (kmemdup)
|
|
|
|
|
+ * @src: netlink attribute to duplicate from
|
|
|
|
|
+ * @gfp: GFP mask
|
|
|
|
|
+ */
|
|
|
|
|
+static inline void *nla_memdup(const struct nlattr *src, gfp_t gfp)
|
|
|
|
|
+{
|
|
|
|
|
+ return kmemdup(nla_data(src), nla_len(src), gfp);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* nla_nest_start - Start a new level of nested attributes
|
|
* nla_nest_start - Start a new level of nested attributes
|
|
|
* @skb: socket buffer to add attributes to
|
|
* @skb: socket buffer to add attributes to
|