chiark / gitweb /
test-example: Reorder a config to better test CHILDPERSIST
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 1 Oct 2014 22:33:39 +0000 (23:33 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 21 Oct 2014 00:07:12 +0000 (01:07 +0100)
If we move the polypath comm before the tun netlink, the tun will
already have been set up by the time polypath spawns its privsep
helper.  (Since the entries are processed in reverse order.)  This
means that the CHILDPERSIST phase hook ends up closing the tun fd,
which we can see in strace.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
test-example/inside-polypath.conf

index a3a515aee617f32910f9c8e4e9af6fbef6cdcfa0..2986434cf5ef5f1ea4facc9f8b4c5be8df8d10f1 100644 (file)
@@ -1,3 +1,10 @@
+comm polypath {
+       port 16910;
+       buffer sysbuffer(4096);
+       monitor-command "./polypath-interface-monitor-linux";
+       interfaces "!secnet-test*";
+       permit-loopback True;
+};
 netlink tun {
        name "netlink-tun"; # Printed in log messages from this netlink
        local-address "172.18.232.9";
 netlink tun {
        name "netlink-tun"; # Printed in log messages from this netlink
        local-address "172.18.232.9";
@@ -7,13 +14,6 @@ netlink tun {
        buffer sysbuffer(2048);
        interface "secnet-test-i";
 };
        buffer sysbuffer(2048);
        interface "secnet-test-i";
 };
-comm polypath {
-       port 16910;
-       buffer sysbuffer(4096);
-       monitor-command "./polypath-interface-monitor-linux";
-       interfaces "!secnet-test*";
-       permit-loopback True;
-};
 local-name "test-example/inside/inside";
 local-key rsa-private("test-example/inside.key");
 local-mobile True;
 local-name "test-example/inside/inside";
 local-key rsa-private("test-example/inside.key");
 local-mobile True;