mirror of
https://github.com/AlbrechtL/openwrt-docker.git
synced 2026-10-18 16:01:38 +00:00
LAN_IF "host" mode
Make explicit the use of the networking as user mode for LAN_IF using "host".
This commit is contained in:
+4
-2
@@ -18,11 +18,13 @@ services:
|
||||
CPU_COUNT: 2
|
||||
|
||||
# Define which physical or virtual interfaces shall be attach direct to OpenWrt
|
||||
# If WAN_IF is missing then "host" mode is selected
|
||||
# If WAN_IF/LAN_IF is missing then "host" mode is selected
|
||||
# -
|
||||
WAN_IF: "host" # Usage of container host Ethernet connection as WAN. WARNING: Bad performace because of user space Ethernet implementation.
|
||||
#WAN_IF: "none" # No WAN interface defined. This is useful if OpenWrt WAN acts a USB Wi-Fi client or as USB cellular modem
|
||||
#WAN_IF: "enx00e04c0407a6" # Use this option to define a specific physical Ethernet interface
|
||||
|
||||
# -
|
||||
#LAN_IF: "host" # Usage of container host Ethernet connection as LAN. WARNING: Bad performace because of user space Ethernet implementation.
|
||||
LAN_IF: "veth" # veth pair between OpenWrt and host system
|
||||
#LAN_IF: "enx00e04d68033f" # Use this option to define a specific physical Ethernet interface
|
||||
|
||||
|
||||
+1
-1
@@ -148,7 +148,7 @@ fi
|
||||
|
||||
# Attach physical PHY to container
|
||||
LAN_ARGS=""
|
||||
if [[ -z "${LAN_IF}" ]]; then
|
||||
if [[ -z "${LAN_IF}" || $LAN_IF = "host" ]]; then
|
||||
LAN_ARGS="-device virtio-net,netdev=qlan0 -netdev user,id=qlan0,net=192.168.1.0/24"
|
||||
elif [[ $LAN_IF = "veth" ]]; then
|
||||
attach_veth_if veth-openwrt0 veth1 qlan1
|
||||
|
||||
Reference in New Issue
Block a user