summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authordv <dv@cvs.openbsd.org>2021-06-02 14:40:47 +0000
committerdv <dv@cvs.openbsd.org>2021-06-02 14:40:47 +0000
commit70d80b6f5ef81a9141521337c74a481541df09ac (patch)
tree722bfd0f043717a2947cd79e5201697723506252 /usr.sbin
parent96c18fc50e195cccd4af961f5e76d5924c6743f8 (diff)
vmd(8): allow locking a randomly assigned lladdr
Provide a default value of a zero'd mac address so a user can still specify the interface should be "locked" (only transmitting ethernet packets with a matching source address). vmd will assign a random address at vm launch. As an example, this is now valid: vm "name" { interface { locked lladdr } ... } From Martin Vahlensieck ok claudio@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/vmd/parse.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/vmd/parse.y b/usr.sbin/vmd/parse.y
index bc2b4b50534..52815e028e8 100644
--- a/usr.sbin/vmd/parse.y
+++ b/usr.sbin/vmd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.56 2020/09/23 19:18:18 martijn Exp $ */
+/* $OpenBSD: parse.y,v 1.57 2021/06/02 14:40:46 dv Exp $ */
/*
* Copyright (c) 2007-2016 Reyk Floeter <reyk@openbsd.org>
@@ -694,6 +694,9 @@ lladdr : STRING {
memcpy($$, ea, ETHER_ADDR_LEN);
}
+ | /* empty */ {
+ memset($$, 0, ETHER_ADDR_LEN);
+ }
;
local : /* empty */ { $$ = 0; }