Unverified Commit 47f57af4 authored by Kroese's avatar Kroese Committed by GitHub
Browse files

feat: Check kernel support for IPv6 (#770)

parent 3541f044
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -184,7 +184,11 @@ getHostPorts() {

configureUser() {

  if [ -z "$IP6" ]; then
    NET_OPTS="-netdev user,id=hostnet0,host=${VM_NET_IP%.*}.1,net=${VM_NET_IP%.*}.0/24,dhcpstart=$VM_NET_IP,hostname=$VM_NET_HOST"
  else
    NET_OPTS="-netdev user,id=hostnet0,ipv4=on,host=${VM_NET_IP%.*}.1,net=${VM_NET_IP%.*}.0/24,dhcpstart=$VM_NET_IP,ipv6=on,hostname=$VM_NET_HOST"
  fi

  local forward
  forward=$(getUserPorts "$USER_PORTS")