diff --git a/docker-compose.yml b/docker-compose.yml index 1b58cd5..e5c4714 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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 diff --git a/src/run_openwrt.sh b/src/run_openwrt.sh index ccd6689..cb5adf8 100755 --- a/src/run_openwrt.sh +++ b/src/run_openwrt.sh @@ -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