mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 13:45:32 +02:00
[GH-ISSUE #674] [Bug]: Docker image missing iproute2 — alias/secondary IPs not shown in Virtual Printer Bind Address dropdown #446
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy#446
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @PurseChicken on GitHub (Mar 12, 2026).
Original GitHub issue: https://github.com/maziggy/bambuddy/issues/674
Originally assigned to: @maziggy on GitHub.
Bug Description
When running Bambuddy in Docker with network_mode: host on a system that has alias (secondary) IP addresses configured on a network interface, the Virtual Printer "Bind Address" dropdown only shows the primary IP address. Alias IPs are not listed, making it impossible to bind virtual printers to dedicated alias IPs.
The root cause is that the Docker image does not include iproute2, so the ip command is not available. In backend/app/services/network_utils.py, the get_all_interface_ips() function checks for the ip command via shutil.which("ip") and falls back to _fallback_get_all_ips() → get_network_interfaces() when it's not found. The fallback uses fcntl.ioctl with SIOCGIFADDR (0x8915), which is a kernel-level limitation that only returns the primary IP per interface — secondary/alias addresses are invisible to this ioctl.
Meanwhile, psutil (which is already a dependency in the image) correctly sees all IPs via psutil.net_if_addrs(). This was confirmed inside the running container.
Expected Behavior
The Bind Address dropdown should list all IP addresses available on the host, including alias/secondary IPs. In my case, the interface bond1 has three IPs (one primary, two aliases), and all three should appear as bind options for virtual printers.
Steps to Reproduce
Configure alias IP addresses on a network interface (e.g., via TrueNAS Network → Interface → Aliases)
Deploy Bambuddy as a Docker custom app with network_mode: host
Go to Settings → Virtual Printer → Add/Edit a virtual printer
Open the "Bind Address" dropdown
Only the primary IP is listed; alias IPs are missing
Printer Model
P1S
Bambuddy Version
0.2.3b1
Printer Firmware Version
01.09.01.00
Installation Method
Docker
Operating System
Linux (Other)
Relevant Logs / Support Package
Screenshots
No response
Additional Context
Suggested Fix (either or both):
Checklist
@maziggy commented on GitHub (Mar 12, 2026):
Fixed in branch dev.
Fix interface aliases not shown in virtual printer interface select
The Docker image (python:3.13-slim) didn't include iproute2, so the
ipcommand wasn't available. The code fell back to ioctl-basedenumeration which can only return one IP per interface — aliases like
eth0:1 were completely invisible. Added iproute2 to the Dockerfile.
@maziggy commented on GitHub (Mar 12, 2026):
Please let me know if it works for you now.
@PurseChicken commented on GitHub (Mar 13, 2026):
Just deployed 0.2.2b4-daily.20260313 and its working without issue now. Aliases properly show as options in the list.
Thank you!
@TravisWilder commented on GitHub (Mar 14, 2026):
I can also confirm that I can select the alias