- fix typ0 in message: NLSMG -> NLMSG
- use strerror() to print a human readable message

Signed-off-by: Antonio Quartulli <a...@unstable.cc>
---

v2:
 - change %d to %s (thanks Michael Shiels for catching this)

 src/openvpn/route.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/openvpn/route.c b/src/openvpn/route.c
index 349b2c76..9c33863c 100644
--- a/src/openvpn/route.c
+++ b/src/openvpn/route.c
@@ -3445,7 +3445,7 @@ get_default_gateway_ipv6(struct route_ipv6_gateway_info 
*rgi6,
         if (nh->nlmsg_type == NLMSG_ERROR)
         {
             struct nlmsgerr *ne = (struct nlmsgerr *)NLMSG_DATA(nh);
-            msg(M_WARN, "GDG6: NLSMG_ERROR: error %d\n", ne->error);
+            msg(M_WARN, "GDG6: NLMSG_ERROR: error %s\n", strerror(-ne->error));
             break;
         }
 
-- 
2.13.3


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to