You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When odhcpd receives a DHCPv6 client request it calls basename() function. Somehow it invokes the external /usr/bin/basename with incorrect arguments. Is it a linkage problem with libc.so on arm hardware?
# odhcpd
odhcpd[536]: Sending RS to wan6
odhcpd[536]: Got a RA on wan6
odhcpd[536]: Forward a RA on lan
odhcpd[536]: DHCPV6 SOLICIT IA_NA from XXX on lan: no addresses available
basename: missing operand
Try 'basename --help' for more information.
odhcpd[536]: DHCPV6 SOLICIT IA_NA from XXX on lan: no addresses available
odhcpd[536]: Sending RS to wan6
odhcpd[536]: Got a RA on wan6
odhcpd[536]: Forward a RA on lan
^C
# which basename
/usr/bin/basename
# ls -l /usr/bin/basename
lrwxrwxrwx 1 root root 31 Feb 14 06:23 /usr/bin/basename -> /usr/libexec/basename-coreutils*
I wrote a simple test function and it works as expected:
arm-openwrt-linux-gcc t.c -o t
file t
t: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-armhf.so.1, with debug_info, not stripped
scp t router:/tmp
Run on router:
/tmp/t
Base name: file.txt
I also checked all of the dynamic libraries loaded by odhcpd, and the only one that has basename() in it is libc.so:
When odhcpd receives a DHCPv6 client request it calls basename() function. Somehow it invokes the external /usr/bin/basename with incorrect arguments. Is it a linkage problem with libc.so on arm hardware?
I wrote a simple test function and it works as expected:
Run on router:
I also checked all of the dynamic libraries loaded by odhcpd, and the only one that has basename() in it is libc.so:
What causes odhcpd to invoke the external program?
The text was updated successfully, but these errors were encountered: