summaryrefslogtreecommitdiff
path: root/sys/src/cmd/vmx
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2017-12-15 22:22:29 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2017-12-15 22:22:29 +0100
commit9fd8894fec87ccd326997b84a2be431af8764cce (patch)
treedf8bdfa139b48cefa908f208d44b1ecb326150f5 /sys/src/cmd/vmx
parent4ad70e6055093123f0611269ca7e8e201257e5db (diff)
ether: allow spoofing of source mac address for bridges; used by vmx
to implement layer 2 bridges in userspace, we disable to auto filling of the source mac address when bridge mode is enabled on the connection.
Diffstat (limited to 'sys/src/cmd/vmx')
-rw-r--r--sys/src/cmd/vmx/virtio.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/src/cmd/vmx/virtio.c b/sys/src/cmd/vmx/virtio.c
index 8a7a7d0b3..1dd1b5537 100644
--- a/sys/src/cmd/vmx/virtio.c
+++ b/sys/src/cmd/vmx/virtio.c
@@ -655,7 +655,10 @@ mkvionet(char *net)
}else{
fd = dial(netmkaddr("-1", net, nil), nil, nil, &cfd);
if(fd < 0) return -1;
- if(cfd >= 0) fprint(cfd, "promiscuous");
+ if(cfd >= 0) {
+ write(cfd, "promiscuous", 11);
+ write(cfd, "bridge", 6);
+ }
}
d = mkviodev(0x1000, 0x020000, 1, 3);