mirror of
https://github.com/AlbrechtL/openwrt-docker.git
synced 2026-10-16 16:01:35 +00:00
Add fixed IP address to host veth interface
This commit is contained in:
+1
-1
@@ -20,7 +20,7 @@ services:
|
||||
#LAN_IF: "enx00e04d68033f" # Use this option to define a specific physical Ethernet interface
|
||||
|
||||
# Make LuCI OpenWrt web interface accessible via host LAN
|
||||
#FORWARD_LUCI: "true"
|
||||
FORWARD_LUCI: "true"
|
||||
|
||||
# USB passthrough
|
||||
# Format <vendorID>:<productID> like 'lsusb' is given
|
||||
|
||||
@@ -64,6 +64,10 @@ attach_veth_if () {
|
||||
# Create veth pair
|
||||
nsenter --target 1 --uts --net --ipc --mount ip link add $VETH_IF_HOST type veth peer name $VETH_IF_CONTAINER
|
||||
nsenter --target 1 --uts --net --ipc --mount ip link set $VETH_IF_HOST up
|
||||
|
||||
if [[ -z "${IS_U_OS_APP}" ]]; then
|
||||
nsenter --target 1 --uts --net --ipc --mount ip addr add 172.31.1.2/24 dev $VETH_IF_HOST
|
||||
fi
|
||||
else
|
||||
info "Virtual Ethernet interface $VETH_IF_HOST already exists. Assuming pairs is already created."
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user