Comment 9 for bug 991666

Revision history for this message
Antti P Miettinen (apm) wrote :

My current disgusting workaround:

--- network-manager-0.9.4.0.orig/src/nm-policy.c
+++ network-manager-0.9.4.0/src/nm-policy.c
@@ -19,6 +19,9 @@
  * Copyright (C) 2007 - 2008 Novell, Inc.
  */

+#include <sys/types.h>
+#include <sys/stat.h>
+
 #include <config.h>
 #include <string.h>
 #include <unistd.h>
@@ -447,6 +450,10 @@ update_ip4_routing_and_dns (NMPolicy *po
  NMSettingConnection *s_con = NULL;
  const char *connection_id;
  int ip_ifindex = 0;
+ struct stat sb;
+
+ if (stat("/run/nm-policy-block-ip4-updates", &sb) == 0)
+ return;

  best = get_best_ip4_device (policy->manager, &best_req);
  if (!best)

which allows me to touch or rm /run/nm-policy-block-ip4-updates upon VPN establish/teardown.