Skip to content

NUT server listens on the wrong IPv6 address #3417

@fencepost-error

Description

@fencepost-error

With the following example upsd.conf:

LISTEN upsserver.lan 3493

the server listens on the IPv6 address that was current when it was started but never updates when the address changes, so after awhile it ends up listening on an address that will never get any connections:

> dig upsserver.lan AAAA
;; ANSWER SECTION:
upsserver.lan.         0       IN      AAAA    2403:de00:2200:f06:xxxx:xxxx:xxxx:5678

However the NUT server is still listening on whatever IPv6 address was current at the time it started (...1234), not the one that's in use now (...5678):

> ifconfig | grep 5678
    inet6 2403:de00:2200:f06:xxxx:xxxx:xxxx:5678/64 scope global temporary dynamic
> ifconfig | grep 1234
    inet6 2403:de00:2200:f06:xxxx:xxxx:xxxx:1234/64 scope global temporary deprecated dynamic

Perhaps the NUT server could warn about, or report an error with, using hostnames in the LISTEN entry in the presence of IPv6 addresses, or update the code to do whatever sshd, httpds, etc do to keep current with interface addresses.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Connection stability issuesIssues about driver<->device and/or networked connections (upsd<->upsmon...) going AWOL over timeimpacts-release-2.8.5Issues reported against NUT release 2.8.5 (maybe vanilla or with minor packaging tweaks)service/daemon start/stopGeneral subject for starting and stopping NUT daemons (drivers, server, monitor); also BG/FG/Debug

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions