[patch] OpenVPN helper server crash



Hi,

I have been using the ubuntu 0.6.1 packages (really nice btw!), and have
compiled up the openvpn service, however it the helper program just
crashed for me when using it.

The attached patch fixes the crash - it appears as though I don't have a
ptp address so it was crashing when trying to convert a null string to
an ip address.

Crispin
Index: nm-openvpn-service-openvpn-helper.c
===================================================================
RCS file: /cvs/gnome/NetworkManager/vpn-daemons/openvpn/src/nm-openvpn-service-openvpn-helper.c,v
retrieving revision 1.6
diff -u -u -8 -p -r1.6 nm-openvpn-service-openvpn-helper.c
--- nm-openvpn-service-openvpn-helper.c	16 Jan 2006 22:58:12 -0000	1.6
+++ nm-openvpn-service-openvpn-helper.c	29 Mar 2006 22:06:49 -0000
@@ -170,17 +170,17 @@ send_config_info (DBusConnection *con,
   }
 
   if (! ipstr_to_uint32 (str_ip4_address, &uint_ip4_address) ) {
     nm_warning ("nm-openvpn-service-openvpn-helper didn't receive a valid Internal IP4 Address from openvpn.");
     send_config_error (con, "IP4 Address");
     goto out;
   }
 
-  if (! ipstr_to_uint32 (str_ip4_ptpaddr, &uint_ip4_ptpaddr) ) {
+  if (str_ip4_ptpaddr && ! ipstr_to_uint32 (str_ip4_ptpaddr, &uint_ip4_ptpaddr) ) {
     nm_warning ("nm-openvpn-service-openvpn-helper didn't receive a valid PtP IP4 Address from openvpn.");
     send_config_error (con, "IP4 PtP Address");
     goto out;
   }
 
   if (strlen (str_ip4_netmask) > 0) {
     ipstr_to_uint32 (str_ip4_netmask, &uint_ip4_netmask);
   }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]