Virtual Distributed Ethernet
v2 cover Virtual Distributed Ethernet
This patchset introduces VDE, the Virtual Distributed Ethernet application, which allows administrators to create virtual networks for qemu.
Changes since first version:
- coding style fixes
- remove a test paragraph that was wrongly included
Wkr,
Sven Vermeulen
PATCH 1/2 Introduce vde domain
VDE, or Virtual Distributed Ethernet, is a process that simulates a hub/switch within a virtual network. It can be used to provide both simple and complex network environments within a virtual scope.
We introduce the vde_t domain (and related types) here, and will later patch qemu to (optionally) use VDE
--- vde.fc | 20 ++++++++++++++++++++ vde.if | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ vde.te | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 135 insertions(+), 0 deletions(-) create mode 100644 vde.fc create mode 100644 vde.if create mode 100644 vde.te
vde.fc new file +20 -0
@@ -0,0 +1,20 @@ +# +# /etc +# +/etc/init.d/vde -- gen_context(system_u:object_r:vde_initrc_exec_t,s0) + +# +# /usr +# +/usr/bin/vde_switch -- gen_context(system_u:object_r:vde_exec_t,s0) +/usr/sbin/vde_tunctl -- gen_context(system_u:object_r:vde_exec_t,s0) + +# +# /var +# +/var/run/vde\.ctl(/.*)? gen_context(system_u:object_r:vde_var_run_t,s0) + +# +# /tmp +# +/tmp/vde.[0-9-]* -s gen_context(system_u:object_r:vde_tmp_t,s0)
vde.if new file +61 -0
61 lines not on this page · raw message
vde.te new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
1.7.3.4
PATCH v2 2/3 Allow qemu to interact with VDE
In reply to Sven VermeulenOptionally allow qemu to connect to the vde switch
--- qemu.te | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
qemu.te +4 -0
@@ -99,6 +99,10 @@ optional_policy(` ') optional_policy(` + vde_connect(qemu_t) +') + +optional_policy(` virt_manage_images(qemu_t) virt_append_log(qemu_t) ')
Signature · 1 line
1.7.3.4
PATCH v2 3/3 Allow sysadm_r to manage vde switches
In reply to Sven VermeulenAssign the vde_role to sysadm_r so that the system administrator can manage virtual distributed ethernet process(es).
--- policy/modules/roles/sysadm.te | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
policy/modules/roles/sysadm.te +4 -0
@@ -386,6 +386,10 @@ optional_policy(` ') optional_policy(` + vde_role(sysadm_r, sysadm_t) +') + +optional_policy(` vmware_role(sysadm_r, sysadm_t) ')
Signature · 1 line
1.7.3.4