Skip to contentSkip to conversation

wrong error message for failing TUNSETGROUP

PATCH New Till Maas 1 participant 1 message Oct 12, 2008

lore
Share & tools
lore

Till Maas

author
#0 lore raw

PATCH 1/1 wrong error message for failing TUNSETGROUP

Hiyas,

currently openvpn prints that TUNSETOWNER failed if TUNSETGROUP failed. Attached patch fixes this.

Btw. it seems that the kernel shipped with CentOS does not support --group with --mktun, in case someone wants to document it somewhere.

Regards,
Till

tun.c renamed from tun.c.tunsetgroup_errormessage +1 -1
diff -up openvpn-2.1_rc13/tun.c.tunsetgroup_errormessage openvpn-2.1_rc13/tun.c
@@ -1279,7 +1279,7 @@ tuncfg (const char *dev, const char *dev
         msg (M_ERR, "Cannot get group entry for %s", groupname);
       else
         if (ioctl (tt->fd, TUNSETGROUP, group_state.gr->gr_gid) < 0)
-          msg (M_ERR, "Cannot ioctl TUNSETOWNER(%s) %s", groupname, dev);
+          msg (M_ERR, "Cannot ioctl TUNSETGROUP(%s) %s", groupname, dev);
     }
   close_tun (tt);
   msg (M_INFO, "Persist state set to: %s", (persist_mode ? "ON" : "OFF"));