aboutsummaryrefslogtreecommitdiffstats
path: root/src/libhydra/plugins/kernel_netlink/kernel_netlink_shared.h
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2013-03-15 14:32:25 +0100
committerMartin Willi <martin@revosec.ch>2013-03-15 14:32:25 +0100
commit53c98f098feed0dd779ab0426b6ab635a6e33c8f (patch)
treef2d00b8a76b98a62fd4f421f3fbf44a4c57b255e /src/libhydra/plugins/kernel_netlink/kernel_netlink_shared.h
parent6ac601f543346ec75bcba0fc14fb7319663f37d8 (diff)
downloadstrongswan-53c98f098feed0dd779ab0426b6ab635a6e33c8f.tar.bz2
strongswan-53c98f098feed0dd779ab0426b6ab635a6e33c8f.tar.xz
Correctly check buffer length in netlink_add_attribute()
Diffstat (limited to 'src/libhydra/plugins/kernel_netlink/kernel_netlink_shared.h')
-rw-r--r--src/libhydra/plugins/kernel_netlink/kernel_netlink_shared.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/libhydra/plugins/kernel_netlink/kernel_netlink_shared.h b/src/libhydra/plugins/kernel_netlink/kernel_netlink_shared.h
index dfd27a21a..f5721dfbb 100644
--- a/src/libhydra/plugins/kernel_netlink/kernel_netlink_shared.h
+++ b/src/libhydra/plugins/kernel_netlink/kernel_netlink_shared.h
@@ -42,7 +42,8 @@ struct netlink_socket_t {
* @param out received netlink message
* @param out_len length of the received message
*/
- status_t (*send)(netlink_socket_t *this, struct nlmsghdr *in, struct nlmsghdr **out, size_t *out_len);
+ status_t (*send)(netlink_socket_t *this, struct nlmsghdr *in,
+ struct nlmsghdr **out, size_t *out_len);
/**
* Send a netlink message and wait for its acknowledge.
@@ -67,11 +68,12 @@ netlink_socket_t *netlink_socket_create(int protocol);
/**
* Creates an rtattr and adds it to the given netlink message.
*
- * @param hdr netlink message
- * @param rta_type type of the rtattr
- * @param data data to add to the rtattr
- * @param buflen length of the netlink message buffer
+ * @param hdr netlink message
+ * @param rta_type type of the rtattr
+ * @param data data to add to the rtattr
+ * @param buflen length of the netlink message buffer
*/
-void netlink_add_attribute(struct nlmsghdr *hdr, int rta_type, chunk_t data, size_t buflen);
+void netlink_add_attribute(struct nlmsghdr *hdr, int rta_type, chunk_t data,
+ size_t buflen);
#endif /* KERNEL_NETLINK_SHARED_H_ */