Debian Bug report logs -
#799080
wide-dhcpv6-server: Unable to start on multiple interfaces
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, Jérémie Corbier <jcorbier@debian.org>:
Bug#799080; Package wide-dhcpv6-server.
(Tue, 15 Sep 2015 16:45:09 GMT) (full text, mbox, link).
Acknowledgement sent
to Robert Wolf <r.wolf.debian@atlas.cz>:
New Bug report received and forwarded. Copy sent to Jérémie Corbier <jcorbier@debian.org>.
(Tue, 15 Sep 2015 16:45:09 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: wide-dhcpv6-server
Version: 20080615-12
Severity: normal
Tags: ipv6
Dear Maintainer,
if you want to start wide-dhcpv6-server on multiple interfaces you can
configure multiple interfaces either in dpkg or manually in
/etc/default/wide-dhcpv6-server.
As stated in the /etc/default file "Interfaces on which the server
should serve DHCPv6 requests." or in dpkg configuration of this package
"Network interfaces on which the DHCPv6 server listens to requests
should be specified here. Multiple interfaces are separated with
spaces." you can enter list of interfaces to run dhcp6s on.
If you enter multiple interfaces and start wide-dhcpv6-server there will
be only one dhcp6s daemon running with the first listed interface.
The dhcp6s daemon does use control port for communication with dhcp6ctl.
This control port can be defined using "-p" option on the command line
during daemon start. If there is no "-p" option entered, it will be one
default port used. If you try to start dhcp6s without option "-p"
multiple times, only the first started daemon keep running and binds to
the control port. The second daemon listening on the other interface
cannot start because control port is already used. The dhcp6s fails to
start with error:
--------------------------------------------------
dhcp6s[23695]: dhcp6_ctl_init: bind(control sock): Address already in use
dhcp6s[23695]: server6_init: failed to initialize control channel
--------------------------------------------------
You can find following errors in the daemon log file if you try to start
dhcp6s on vlan96 and vlan95 - the INTERFACES variable contains "vlan96
vlan95" in the /etc/default/wide-dhcpv6-server (dhcp6s on vlan96 has
started without error, the error messages belongs to dhcp6s on vlan95).
--------------------------------------------------
wide-dhcpv6-server[23686]: Starting WIDE DHCPv6 server on vlan96: dhcp6s.
dhcp6s[23695]: dhcp6_ctl_init: bind(control sock): Address already in use
dhcp6s[23695]: server6_init: failed to initialize control channel
wide-dhcpv6-server[23686]: Starting WIDE DHCPv6 server on vlan95: dhcp6s.
--------------------------------------------------
=== /etc/default/wide-dhcpv6-server ===
--------------------------------------------------
INTERFACES="vlan96 vlan95"
--------------------------------------------------
The init.d script should be able to either generate random control ports
for different dhcp6s daemons running on different interface or should be
possible to define control port together with interface.
I have solved the problem allowing to define INTERFACES as
INTERFACE[:CONTROL-PORT] ...
it is simple to get interface and control port from this using e.g.:
for V in $INTERFACES; do INT="${V%:*}" ; CP="${V#$INT}" ; CP="${CP#:}"
INT is interface and PC is control port and the to start dhcp6s daemon
using:
start-stop-daemon --start --quiet --pidfile ${DHCP6SPIDBASE}.${INT}.pid \
--exec $DHCP6SBIN --oknodo -- -k /dev/null \
-P ${DHCP6SPIDBASE}.${INT}.pid ${CP:+-p} $CP $INT
Regards,
Robert Wolf.
-- System Information:
Debian Release: 8.2
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages wide-dhcpv6-server depends on:
ii debconf [debconf-2.0] 1.5.56
ii libc6 2.19-18+deb8u1
ii lsb-base 4.1+Debian13+nmu1
wide-dhcpv6-server recommends no packages.
wide-dhcpv6-server suggests no packages.
-- debconf information excluded
Information forwarded
to debian-bugs-dist@lists.debian.org:
Bug#799080; Package wide-dhcpv6-server.
(Tue, 05 Jan 2016 17:12:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Roger Shimizu <rogershimizu@gmail.com>:
Extra info received and forwarded to list.
(Tue, 05 Jan 2016 17:12:04 GMT) (full text, mbox, link).
Message #10 received at 799080@bugs.debian.org (full text, mbox, reply):
Control: forwarded -1 http://sourceforge.net/p/wide-dhcpv6/bugs/36/
Control: tag -1 +patch
Dear Robert,
I find your report is similar to upstream's bug:
http://sourceforge.net/p/wide-dhcpv6/bugs/36/
And there's also patch on that page. So if you have compiling
environment, you can try that solution.
Cheers,
Roger
Added tag(s) patch.
Request was from Roger Shimizu <rogershimizu@gmail.com>
to 799080-submit@bugs.debian.org.
(Tue, 05 Jan 2016 17:12:05 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, Roger Shimizu <rogershimizu@gmail.com>:
Bug#799080; Package wide-dhcpv6-server.
(Wed, 06 Jan 2016 11:48:08 GMT) (full text, mbox, link).
Acknowledgement sent
to r.wolf.debian@atlas.cz:
Extra info received and forwarded to list. Copy sent to Roger Shimizu <rogershimizu@gmail.com>.
(Wed, 06 Jan 2016 11:48:08 GMT) (full text, mbox, link).
Message #19 received at 799080@bugs.debian.org (full text, mbox, reply):
On Wed, 6 Jan 2016, Roger Shimizu wrote:
> Control: forwarded -1 http://sourceforge.net/p/wide-dhcpv6/bugs/36/
> Control: tag -1 +patch
>
> Dear Robert,
>
> I find your report is similar to upstream's bug:
> http://sourceforge.net/p/wide-dhcpv6/bugs/36/
> And there's also patch on that page. So if you have compiling
> environment, you can try that solution.
>
> Cheers,
> Roger
Hello Roger,
you are right, the upstream bug report reports the same error, but the analysis
and solution is IMHO incorrect. I will send my opinion to the upstream bug
report too.
IMHO the code:
if (fgets(line, sizeof(line), fp) == NULL && ferror(fp)) {
dprintf(LOG_ERR, FNAME, "failed to read key file: %s",
strerror(errno));
goto fail;
}
is correct:
first, fgets() tries to read something. If the fgets() returns NULL, it means
either there are no data or there was an error. Then, if the fgets()==NULL
(TRUE) the code does "&&" (AND) and checks, if there is ERROR on fp - ferror()
checks the error state of stream.
And if both, fgets()==NULL AND ferror(), are TRUE, it means there was an
error. If the ferror() returns FALSE, then fgets()==NULL means only, there are
no data but it is no error. It means, there is no problem with -k /dev/null -
it means only there is no "shared secret to authenticate the communication
with dhcp6ctl" (man page).
On my system there are running two dhcp6s with -k /dev/null and I have no
error:
PID TTY STAT TIME COMMAND
2637 ? Ss 0:00 /usr/sbin/dhcp6s -k /dev/null -P /var/run/dhcp6s.vlan95.pid -p 2095 vlan95
2641 ? Ss 0:00 /usr/sbin/dhcp6s -k /dev/null -P /var/run/dhcp6s.vlan96.pid -p 2096 vlan96
But I have to use different control ports -p 2095 and -p 2096.
But this has nothing to do with the error reported by me in Debian bug
#799080:
dhcp6s[1471]: dhcp6_ctl_init: bind(control sock): Address already in use
This error comes because dhcp6s uses one port for communication with dhcp6ctl
and the default port is set to 5546. It means, if you start first dhcp6s, it
starts listening on port 5546. Then you try to start second dhcp6s and it want
to listen on port 5546 too - but this port is already used and therefore the
error "Address already in use" reported.
The main problem is that dhcp6s must be started as one process for every
interface, so if you have multiple interfaces then you have to start multiple
dhcp6s processes. You can solve this using /etc/rc.local and start all these
dhcp6s processes yourself with "-p" option, but the debian init.d script
contains code to process multiple interfaces and start dhcp6s process for every
interface:
for INT in $INTERFACES; do
log_daemon_msg "Starting $DESC on $INT" "$NAME"
start-stop-daemon --start --quiet --pidfile ${DHCP6SPIDBASE}.${INT}.pid \
--exec $DHCP6SBIN --oknodo -- -k /dev/null -P ${DHCP6SPIDBASE}.${INT}.pid $INT
sleep 2
if check_status -q; then
log_end_msg 0
else
log_end_msg 1
exit 1
fi
done
As you can see, init.d script starts dhcp6s only with different (generated)
PID file, but the port is not defined, i.e. for every dhcp6s it tries to start
with default port 5546. It would be great if someone can solve this and allow
to start dhcp6s for every interface with different (generated or somehow
defined) control port.
Thank you.
Regards,
Robert Wolf.
Information forwarded
to debian-bugs-dist@lists.debian.org, Roger Shimizu <rogershimizu@gmail.com>:
Bug#799080; Package wide-dhcpv6-server.
(Thu, 07 Jan 2016 12:33:03 GMT) (full text, mbox, link).
Acknowledgement sent
to r.wolf.debian@atlas.cz:
Extra info received and forwarded to list. Copy sent to Roger Shimizu <rogershimizu@gmail.com>.
(Thu, 07 Jan 2016 12:33:03 GMT) (full text, mbox, link).
Message #24 received at 799080@bugs.debian.org (full text, mbox, reply):
On Wed, 6 Jan 2016, Roger Shimizu wrote:
> Control: forwarded -1 http://sourceforge.net/p/wide-dhcpv6/bugs/36/
> Control: tag -1 +patch
>
> Dear Robert,
>
> I find your report is similar to upstream's bug:
> http://sourceforge.net/p/wide-dhcpv6/bugs/36/
> And there's also patch on that page. So if you have compiling
> environment, you can try that solution.
>
> Cheers,
> Roger
>
Hello Roger,
Michael has explained his bug report and now I understand it. It should be
possible to skip opening control port if there is no shared secret (-k
/dev/null).
There is really a bug in the original code. And this is no bug in debian init.d
script. It means, this bug report can be closed.
Could you tell me, if this will be fixed, how long it will take until the new
version (or this patch) will be included to this package, if the upstream
updates the package?
Could you tell me, what happens if the upstream do not update original package?
Would it be possible to include this patch direct to debian package?
Thank you.
Regards,
Robert Wolf.
Information forwarded
to debian-bugs-dist@lists.debian.org:
Bug#799080; Package wide-dhcpv6-server.
(Thu, 07 Jan 2016 14:21:06 GMT) (full text, mbox, link).
Acknowledgement sent
to Roger Shimizu <rogershimizu@gmail.com>:
Extra info received and forwarded to list.
(Thu, 07 Jan 2016 14:21:06 GMT) (full text, mbox, link).
Message #29 received at 799080@bugs.debian.org (full text, mbox, reply):
On Thu, Jan 7, 2016 at 9:29 PM, Robert Wolf <r.wolf.debian@atlas.cz> wrote:
> Michael has explained his bug report and now I understand it. It should be
> possible to skip opening control port if there is no shared secret (-k
> /dev/null).
Great to hear that you have achieved consensus.
> There is really a bug in the original code. And this is no bug in debian init.d
> script. It means, this bug report can be closed.
>
> Could you tell me, if this will be fixed, how long it will take until the new
> version (or this patch) will be included to this package, if the upstream
> updates the package?
>
> Could you tell me, what happens if the upstream do not update original package?
> Would it be possible to include this patch direct to debian package?
Since the upstream isn't active since 2008, there're already a few
patches to fix various issues in debian:
- https://sources.debian.net/src/wide-dhcpv6/20080615-15/debian/patches/
You can send the patch to both upstream and debian.
Please also CC Michael if possible. I think it's better you two have
the consensus on the patch as well.
Thanks for your help!
Cheers,
Roger
Information forwarded
to debian-bugs-dist@lists.debian.org, Roger Shimizu <rogershimizu@gmail.com>:
Bug#799080; Package wide-dhcpv6-server.
(Mon, 11 Jan 2016 13:24:04 GMT) (full text, mbox, link).
Acknowledgement sent
to r.wolf.debian@atlas.cz:
Extra info received and forwarded to list. Copy sent to Roger Shimizu <rogershimizu@gmail.com>.
(Mon, 11 Jan 2016 13:24:04 GMT) (full text, mbox, link).
Message #34 received at 799080@bugs.debian.org (full text, mbox, reply):
[Message part 1 (text/plain, inline)]
Hello Roger,
we have agreed the probable functionality of the wide-dhcp6s in case there is
no shared secret - the server should not open and listen on control port.
For this, I have reported this on the upstream bug report page
https://sourceforge.net/p/wide-dhcpv6/bugs/36/
and I have created some patches. Maybe it is good to apply both of the patches
to be sure as most as possible, that there will be no way how to create control
port without shared secret.
> Since the upstream isn't active since 2008, there're already a few
> patches to fix various issues in debian:
> - https://sources.debian.net/src/wide-dhcpv6/20080615-15/debian/patches/
>
> You can send the patch to both upstream and debian.
*** I have attached the patches to this email, I am not sure if it will be
visible in the bugreport. How could I submit a patch to debian package? I would
be great if you could apply these patches to this version and release it. But
please, check the patches. I am only admin and no programmer, maybe there could
be something wrong. I have patched the original version, they you "dprintf()",
but debian has changed to "debug_printf()" - this must be done. And the line
numbers are according to original upstream source, not the patched debian
version - is it OK?
> Please also CC Michael if possible. I think it's better you two have
> the consensus on the patch as well.
*** We have discussed it on sf.net messaging, but his profile is now 404. I
have commented his bug report, but we have agreed correct function of dhcp6s
and the patch to correct this bug.
Thank you.
Reagrds,
Robert Wolf.
[wide-dhcpv6-20080615-skip-ctlport-patch.zip (application/zip, attachment)]
Information forwarded
to debian-bugs-dist@lists.debian.org:
Bug#799080; Package wide-dhcpv6-server.
(Wed, 13 Jan 2016 16:57:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Roger Shimizu <rogershimizu@gmail.com>:
Extra info received and forwarded to list.
(Wed, 13 Jan 2016 16:57:04 GMT) (full text, mbox, link).
Message #39 received at 799080@bugs.debian.org (full text, mbox, reply):
On Mon, Jan 11, 2016 at 10:21 PM, Robert Wolf <r.wolf.debian@atlas.cz> wrote:
> we have agreed the probable functionality of the wide-dhcp6s in case there is
> no shared secret - the server should not open and listen on control port.
Great to hear that.
> For this, I have reported this on the upstream bug report page
>
> https://sourceforge.net/p/wide-dhcpv6/bugs/36/
>
> and I have created some patches. Maybe it is good to apply both of the patches
> to be sure as most as possible, that there will be no way how to create control
> port without shared secret.
>
>> Since the upstream isn't active since 2008, there're already a few
>> patches to fix various issues in debian:
>> - https://sources.debian.net/src/wide-dhcpv6/20080615-15/debian/patches/
>>
>> You can send the patch to both upstream and debian.
>
> *** I have attached the patches to this email, I am not sure if it will be
> visible in the bugreport. How could I submit a patch to debian package? I would
> be great if you could apply these patches to this version and release it. But
> please, check the patches. I am only admin and no programmer, maybe there could
> be something wrong. I have patched the original version, they you "dprintf()",
> but debian has changed to "debug_printf()" - this must be done. And the line
> numbers are according to original upstream source, not the patched debian
> version - is it OK?
Thanks for your patch!
Yes, it will remain in Debian's BTS forever.
I'll check your patch.
Please don't worry about the patch already existed in Debian.
I'll make it be able to apply before commit it into debian's patch queue.
>> Please also CC Michael if possible. I think it's better you two have
>> the consensus on the patch as well.
>
> *** We have discussed it on sf.net messaging, but his profile is now 404. I
> have commented his bug report, but we have agreed correct function of dhcp6s
> and the patch to correct this bug.
I'm sorry we seems lost his contacting.
404 means he deleted his profile on sf?
Thanks for your contribution, again!
Cheers,
Roger
Reply sent
to Roger Shimizu <rogershimizu@gmail.com>:
You have taken responsibility.
(Sat, 24 Mar 2018 15:12:09 GMT) (full text, mbox, link).
Notification sent
to Robert Wolf <r.wolf.debian@atlas.cz>:
Bug acknowledged by developer.
(Sat, 24 Mar 2018 15:12:09 GMT) (full text, mbox, link).
Message #44 received at 799080-close@bugs.debian.org (full text, mbox, reply):
Source: wide-dhcpv6
Source-Version: 20080615-20
We believe that the bug you reported is fixed in the latest version of
wide-dhcpv6, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 799080@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Roger Shimizu <rogershimizu@gmail.com> (supplier of updated wide-dhcpv6 package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sat, 24 Mar 2018 23:05:29 +0900
Source: wide-dhcpv6
Binary: wide-dhcpv6-server wide-dhcpv6-client wide-dhcpv6-client-udeb wide-dhcpv6-relay
Architecture: source
Version: 20080615-20
Distribution: unstable
Urgency: medium
Maintainer: Roger Shimizu <rogershimizu@gmail.com>
Changed-By: Roger Shimizu <rogershimizu@gmail.com>
Description:
wide-dhcpv6-client - DHCPv6 client for automatic IPv6 hosts configuration
wide-dhcpv6-client-udeb - DHCPv6 client for automatic IPv6 hosts configuration (udeb)
wide-dhcpv6-relay - DHCPv6 relay for automatic IPv6 hosts configuration
wide-dhcpv6-server - DHCPv6 server for automatic IPv6 hosts configuration
Closes: 765453 799080 893008
Changes:
wide-dhcpv6 (20080615-20) unstable; urgency=medium
.
* debian/patches:
- Add patch 0017 to fix FTBFS with flex 2.6.4-6 in buster.
Thanks to Adrian Bunk for the report and patch (Closes: #893008).
- Add patch 0018 to ignore advertise messages with none of
requested data and missed status codes.
Thanks to Roman Mamedov for the report and Evgeniy Manachkin
for the patch (Closes: #765453).
- Add patch 0019 not to bind control port if there is no shared
secret. Thanks to Robert Wolf for the report and patch.
(Closes: #799080)
* debian/control:
- Remove homepage from description, since there's already in
Homepage field. This can also avoid one lintian complaint.
Checksums-Sha1:
cbc43bde86c8cd4502eb268ed2754e1275737927 2182 wide-dhcpv6_20080615-20.dsc
061742636aec916685deb663ef33fce82e573efa 65916 wide-dhcpv6_20080615-20.debian.tar.xz
cdd0f66de5c92d8e5dcac1abea43cdd738818b02 5885 wide-dhcpv6_20080615-20_source.buildinfo
Checksums-Sha256:
2ad8c8c1861017a51bb80cf9496d9eac9f87b2ab5d9e9f0118874045a0de62ec 2182 wide-dhcpv6_20080615-20.dsc
fb935bb7f3ec21d6cf458e880d618c4cdbdce077a5c26570bbc55e16223a0852 65916 wide-dhcpv6_20080615-20.debian.tar.xz
0ed2ac41d61b18fde4b95bff53bcd186aea722edb8c98a594b3de9ad3e4644e1 5885 wide-dhcpv6_20080615-20_source.buildinfo
Files:
c39afd6939eee0b33d6a700820dd108b 2182 net optional wide-dhcpv6_20080615-20.dsc
7101cfc6dc43df82bb25df46f90240dd 65916 net optional wide-dhcpv6_20080615-20.debian.tar.xz
acd8d7cc6b8a3410a1800d262506c471 5885 net optional wide-dhcpv6_20080615-20_source.buildinfo
-----BEGIN PGP SIGNATURE-----
iQJLBAEBCgA1FiEECjKtvoA5m+cWOFnspHhrDacDNKgFAlq2W/cXHHJvZ2Vyc2hp
bWl6dUBnbWFpbC5jb20ACgkQpHhrDacDNKio3hAAljaK9j7biL84JCHWqnYHoXj3
dykRXThHpAkJanU1EkntUsffMyg/9BXvJzSh69yCfGYpE8FoPbpnMavlcmbNUKsQ
z0j0ItxmbN119aj30yrWoXx4i8SfGGuguctHpExfpDaQJFmbBQwr5hB2JO440b5H
X7ileWFoKEyc2/VwV/nyusnSt+j4pmqcL0TEL2W7soG7Iyw3rFHaaDax5G7GaV89
k33C539IrhFLry4Ek0UIinHD9W7JvTQjtFhGoDjH3DUdfaaRML9LjKsEO7ignnOW
eWaYrppKyFbBdqtHYFJ5ota7+NPV53BSCAu5a7PKyf+h2/N/C6/ugKpWrYSU7WoN
z//9MT+DRFg4DJkBsJYvZ0P0FOL/+QaXMSJLYvcL/+Rlt2kV2SMH7nT2d7BBRrSe
Jba75pPBp3giPIykk0ZjQUVeKLcgbLEV7hqmZmi0h3hX6Kgm6V5HMQJK8mdEpjkw
sR0EKBwfiNAOzP+Ya2LPadClSLXrDwyB+8HB0UfLuwWqa+t/E1cFj3b8K3LzuCqa
G+vTG/MU1z9frOyZsGqiAwF2Oq4yiLnZPgq8h3BswnGS2w3CMYfih8HWGe0jq3S6
/E3NMylFTLtXoo+VvuaHivlUbMKwrSh3yEFsjjzcpXws4EXorHrQPB8ZYky+V+gf
Kjn5FqbvszQvWSXe4WM=
=p/yH
-----END PGP SIGNATURE-----
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Tue, 29 May 2018 07:34:20 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Mon Jun 5 03:20:08 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.