summaryrefslogtreecommitdiff
path: root/sys/src/9/ppc
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/9/ppc
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/9/ppc')
-rw-r--r--sys/src/9/ppc/devether.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/9/ppc/devether.c b/sys/src/9/ppc/devether.c
index 5e1179b43..cacc27f4b 100644
--- a/sys/src/9/ppc/devether.c
+++ b/sys/src/9/ppc/devether.c
@@ -265,7 +265,8 @@ etherwrite(Chan* chan, void* buf, long n, vlong)
nexterror();
}
memmove(bp->rp, buf, n);
- memmove(bp->rp+Eaddrlen, ether->ea, Eaddrlen);
+ if(!ether->f[NETID(chan->qid.path)]->bridge)
+ memmove(bp->rp+Eaddrlen, ether->ea, Eaddrlen);
poperror();
bp->wp += n;