Dibbler-client fails to bind on ppp interfaces, fails to install, fails to build on Ubuntu 22.04
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dibbler (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Before I start: I know that the author of Dibbler considers this software unmaintained (https:/
== Issue #1: Dibbler binds to incorrect link-local address of a ppp(oe) interface ==
After upgrading my home router from Ubuntu 20.04 to Ubuntu 22.04, I have noticed that dibbler-client is no longer capable of starting up and binding to the PPPoE (PPP) interface created as part of my connection set-up process.
This is how the link local addresses look like:
rzajic@
28: ppp999: <POINTOPOINT,
inet6 fe80::8157:
valid_lft forever preferred_lft forever
fe80::8157:
fe80::427c:
(The addresses change on every reconnection, it's nothing sensitive.)
The error logs from Dibbler-client were:
Apr 25 11:00:39 router.local systemd[1]: Starting LSB: Starts DHCPv6 client...
Apr 25 11:00:39 router.local dibbler-
Apr 25 11:00:39 router.local systemd[1]: Started LSB: Starts DHCPv6 client.
Apr 25 11:00:39 router.local DibblerClient[
Apr 25 11:00:39 router.local DibblerClient[
Apr 25 11:00:39 router.local DibblerClient[
Apr 25 11:00:39 router.local DibblerClient[
Apr 25 11:00:39 router.local DibblerClient[
Apr 25 11:00:39 router.local DibblerClient[
Apr 25 11:00:39 router.local DibblerClient[
Apr 25 11:00:39 router.local DibblerClient[
Apr 25 11:00:39 router.local DibblerClient[
Apr 25 11:00:39 router.local DibblerClient[
Apr 25 11:00:39 router.local DibblerClient[
Apr 25 11:00:39 router.local DibblerClient[
Apr 25 11:00:39 router.local DibblerClient[
Apr 25 11:00:39 router.local DibblerClient[
Apr 25 11:00:39 router.local DibblerClient[
Apr 25 11:00:39 router.local DibblerClient[
After a quick review, it became clear that the dibbler-client attempts to bind to incorrect IPv6 link local address. This might be related to how the new(er?) clients present the link local addresses.
Using the script from https:/
=======
family: 6
dev: ppp999
prefix length: 128
local address: fe80::8157:
if address: fe80::427c:
=======
family: 6
dev: tap4
prefix length: 64
if address: fe80::4048:
This can be worked around by modifying the low level Linux code (note that there seems to be a bug in Dibbler code, which uses IFLA_ADDRESS [belongs to layer 2, e.g. MAC address] instead of IFA_ADDRESS):
--- lowlevel-linux.c 2022-04-25 23:56:08.736090768 +0200
+++ dibbler-
@@ -277,7 +277,7 @@
if (!rta_tb[
if (!rta_tb[
- memcpy(
+ memcpy(
if (addr[0]!=0xfe || addr[1]!=0x80) {
continue; /* ignore non link-scoped addrs */
}
The local address is always set a few lines above the memcpy() call.
After rebuild (see Issue #3 below), the process starts, binds and request a prefix (which was my goal at the beginning):
Apr 25 23:39:45 router.local systemd[1]: Starting LSB: Starts DHCPv6 client...
Apr 25 23:39:45 router.local dibbler-
Apr 25 23:39:45 router.local systemd[1]: Started LSB: Starts DHCPv6 client.
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:45 router.local DibblerClient[
Apr 25 23:39:46 router.local DibblerClient[
Apr 25 23:39:46 router.local DibblerClient[
Apr 25 23:39:46 router.local DibblerClient[
Apr 25 23:39:46 router.local DibblerClient[
Apr 25 23:39:46 router.local DibblerClient[
Apr 25 23:39:46 router.local DibblerClient[
Apr 25 23:39:46 router.local DibblerClient[
Apr 25 23:39:46 router.local DibblerClient[
Apr 25 23:39:46 router.local DibblerClient[
Apr 25 23:39:46 router.local DibblerClient[
Apr 25 23:39:46 router.local DibblerClient[
Apr 25 23:39:46 router.local DibblerClient[
Apr 25 23:39:46 router.local DibblerClient[
Apr 25 23:39:46 router.local DibblerClient[
Apr 25 23:39:46 router.local DibblerClient[
== Issue #2: Post-install script fails ==
This is yet another issue spotted as part of the installation. Maybe it would deserve a separate bug report - who knows. Anyway, here it is:
The postinst script fails, causing the whole installation to fail:
Preparing to unpack .../dibbler-
Unpacking dibbler-client (1.0.1-1build2) over (1.0.1-1build2) ...
Setting up dibbler-client (1.0.1-1build2) ...
Error: The new file /etc/dibbler/
dpkg: error processing package dibbler-client (--install):
installed dibbler-client package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.10.2-1) ...
Errors were encountered while processing:
dibbler-client
This can be fixed by creating the conf-new version at all times:
--- dibbler-
+++ /home/work/
@@ -30,6 +30,8 @@
rm ${CONFFILE_NEW}
fi
+touch ${CONFFILE_NEW}
+
db_version 2.0
#db_capb backup
db_settitle dibbler-
== Issue #3: Dibbler rebuild fails ==
To rebuild the package on Ubuntu 22.04 with the latest gcc, I had to supply the "-fcommon" flag explicitly:
apt-get source dibbler-client
apt-get build-deps dibbler-client
cd dibbler-1.0.1/
DEB_CPPFLAGS_
Without that backwards compatibility flag, build fails on this error:
/usr/bin/ld: libLowLevel_
(.text+0x0): multiple definition of `interface_
/usr/bin/ld: libLowLevel_
(.text+0x0): multiple definition of `interface_
./Port-
30 | int die(const char * pidfile);
| ^
Port-linux/
191 | void die(const char * pidfile) {
| ^
Port-linux/
Port-linux/
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:629: dibbler-client] Error 1
make[2]: Leaving directory '/home/
make[1]: *** [Makefile:816: all-recursive] Error 1
make[1]: Leaving directory '/home/
dh_auto_build: error: make -j1 returned exit code 2
make: *** [debian/rules:16: build] Error 25
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -i -b failed
== System info ==
# lsb_release -rd
Description: Ubuntu 22.04 LTS
Release: 22.04
# Shows my rebuild/patched version
# apt-cache policy dibbler-client
dibbler-client:
Installed: 1.0.1-1build2
Candidate: 1.0.1-1.1
Version table:
1.0.1-1.1 500
500 http://
*** 1.0.1-1build2 100
100 /var/lib/
description: | updated |