aboutsummaryrefslogtreecommitdiffstats
path: root/csource/common.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-01-23 20:00:59 +0100
committerGitHub <noreply@github.com>2017-01-23 20:00:59 +0100
commit936725c942e8da86575d4483bcab3f4bf9b2b090 (patch)
tree5236193145cb9321083f2117e864bbec3e419848 /csource/common.go
parentbb1ff0b5592262d20e88397f56f18e48d47d56ea (diff)
parente1f60133833906c5ad132f4264775b23946698dc (diff)
Merge pull request #115 from xairy/better-tun
sys: add ethernet and ipv4 packet descriptions
Diffstat (limited to 'csource/common.go')
-rw-r--r--csource/common.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/csource/common.go b/csource/common.go
index 004e5bbd2..48d645cc6 100644
--- a/csource/common.go
+++ b/csource/common.go
@@ -201,8 +201,8 @@ int tunfd = -1;
#define LOCAL_MAC "aa:aa:aa:aa:aa:%02hx"
#define REMOTE_MAC "bb:bb:bb:bb:bb:%02hx"
-#define LOCAL_IPV4 "192.168.%d.170"
-#define REMOTE_IPV4 "192.168.%d.187"
+#define LOCAL_IPV4 "172.20.%d.170"
+#define REMOTE_IPV4 "172.20.%d.187"
#define LOCAL_IPV6 "fd00::%02hxaa"
#define REMOTE_IPV6 "fd00::%02hxbb"
@@ -214,7 +214,7 @@ static void initialize_tun(uint64_t pid)
if (pid >= MAX_PIDS)
fail("tun: no more than %d executors", MAX_PIDS);
- int id = pid + 250 - MAX_PIDS;
+ int id = pid;
tunfd = open("/dev/net/tun", O_RDWR);
if (tunfd == -1)