mirror of
https://github.com/cirruslabs/softnet.git
synced 2026-09-30 20:11:16 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2403f0ea9 | ||
|
|
717e6b0f89 | ||
|
|
71465f8bff |
@@ -20,12 +20,12 @@ And assumes that:
|
||||
|
||||
## Installing
|
||||
|
||||
For proper functioning Softnet binary requires two things:
|
||||
For proper functioning, Softnet binary requires two things:
|
||||
|
||||
* a [SUID-bit](https://en.wikipedia.org/wiki/Setuid#SUID) is set on the binary or [passwordless sudo](https://serverfault.com/questions/160581/how-to-setup-passwordless-sudo-on-linux) is enabled, which effectively gives the binary `root` privileges
|
||||
* this is needed in order to create [`vmnet.framework`](https://developer.apple.com/documentation/vmnet) interface and perform DHCP-related tweaks
|
||||
* a [SUID-bit](https://en.wikipedia.org/wiki/Setuid#SUID) to be set on the binary or a [passwordless sudo](https://serverfault.com/questions/160581/how-to-setup-passwordless-sudo-on-linux) to be configured, which effectively gives the binary `root` privileges
|
||||
* these privileges are needed to create [`vmnet.framework`](https://developer.apple.com/documentation/vmnet) interface and perform DHCP-related system tweaks
|
||||
* the privileges will be dropped automatically to that of the calling user (or those represented by the `--user` and `--group` command-line arguments) once all of the initialization is completed
|
||||
* the binary is available in `PATH`
|
||||
* the binary to be available in `PATH`
|
||||
* so that the Tart will be able to find it
|
||||
|
||||
## Running
|
||||
|
||||
+3
-1
@@ -12,7 +12,9 @@ impl Proxy {
|
||||
|
||||
// Snoop bootpd(8) replies from the host to
|
||||
// figure out the IP assigned to the VM
|
||||
self.snoop(frame);
|
||||
if frame.dst_addr() == self.vm_mac_address {
|
||||
self.snoop(frame);
|
||||
}
|
||||
|
||||
self.vm
|
||||
.write(frame.as_ref())
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ struct Args {
|
||||
#[clap(
|
||||
long,
|
||||
help = "set bootpd(8) lease time to this value (in seconds) before starting the VM",
|
||||
default_value_t = 60
|
||||
default_value_t = 600
|
||||
)]
|
||||
bootpd_lease_time: u32,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user