[strongSwan-dev] [PATCH] Fix typo in kernel_netlink_net.c

Mirko Parthey mirko.parthey at informatik.tu-chemnitz.de
Tue Nov 15 14:27:19 CET 2011


Hi,

In the expression for building addr.nl_groups, RTMGRP_IPV4_ROUTE is
OR'ed twice.  One of them was likely meant to say IPV6 instead.
My patch has only been compile-tested.

Regards,
Mirko

diff --git a/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c b/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c
index 31f3844..cce0ff4 100644
--- a/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c
+++ b/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c
@@ -1542,7 +1542,7 @@ kernel_netlink_net_t *kernel_netlink_net_create()
 		return NULL;
 	}
 	addr.nl_groups = RTMGRP_IPV4_IFADDR | RTMGRP_IPV6_IFADDR |
-					 RTMGRP_IPV4_ROUTE | RTMGRP_IPV4_ROUTE | RTMGRP_LINK;
+					 RTMGRP_IPV4_ROUTE | RTMGRP_IPV6_ROUTE | RTMGRP_LINK;
 	if (bind(this->socket_events, (struct sockaddr*)&addr, sizeof(addr)))
 	{
 		DBG1(DBG_KNL, "unable to bind RT event socket");




More information about the Dev mailing list