linuxserver / docker-netbootxyz

GNU General Public License v3.0
270 stars 28 forks source link

tftp service fails to run when IPv6 is disabled on Host #38

Closed bamhm182 closed 1 year ago

bamhm182 commented 2 years ago

linuxserver.io

IPv6 being disabled on the host causes the tftp service to fail

Expected Behavior

The tftp service should run, even when IPv6 is not available.

Current Behavior

When IPv6 is disabled on the host box, the script at /etc/services.d/tftp/run exists with code 71 and does not leave the tftp service in a running state.

Steps to reproduce

  1. Configure host box to disable IPv6 at kernel level
  2. Run this container
  3. Execute cat /proc/net/udp and notice a lack of port 69 (0x0045).

Environment

OS: Arch Linux CPU architecture: x86_64

IPv6 is disabled on this box

How docker service was installed:

The following docker-compose.yml

version: "3.9"
services:
  netbootxyz:
    image: lscr.io/linuxserver/netbootxyz:0.6.6
    container_name: netboot
    environment:
      - PUID=1000
      - PGID=1000
      - PORT_RANGE=30000:30010
      - SUBFOLDER=/
    ports:
      - 69:69/udp
      - 6969:80/tcp
    restart: unless-stopped
    volumes:
      - config:/config
      - assets:/assets

volumes:
  config:
  assets:

Command used to create docker container (run/create/compose/screenshot)

docker-compose up

Docker logs

Nothing to indicate there is a problem.

Workaround

I have added the environmental variable "IPV4=true" and I have created the file /config/custom-services.d/tftp with the following contents:

#!/usr/bin/with-contenv bash

exec /usr/sbin/in.tftpd \
        --foreground --listen --user abc --secure ${PORT_RANGE:+--port-range $PORT_RANGE} ${IPV4:+--ipv4} /config/menus

The --ipv4 flag is what is required for /usr/sbin/in.tftpd to not fail.

Proposed workaround

Adapt the change made in my custom-services.d script to the official tftp service script.

github-actions[bot] commented 2 years ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

drizuid commented 1 year ago

We have no plans to make bandaids for those operating under the false assumption that disabling ipv6 is beneficial in some way, even though for 20 years they've been told otherwise.