Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 45725 - dnsmasq 1.18 may have problems with IPV6
Summary: dnsmasq 1.18 may have problems with IPV6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Jon Portnoy (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-25 10:56 UTC by Davin Boling
Modified: 2004-03-28 13:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Davin Boling 2004-03-25 10:56:31 UTC
IPV6 support was added to dnsmasq in version 1.2 according to official documentation, yet the stable dnsmasq ebuild (1.18) seems to encounter problems when used in conjunction with IPV6. I've included an strace of the problem. It should be noted that this problem does not exist in versions 2.0 or greater. (all marked unstable)

Reproducible: Always
Steps to Reproduce:
1. Have IPV6 enabled (in my case, modularized)
2. Attempt to run dnsmasq commandline or from init.d

Actual Results:  
[root@halcyon ~]$ dnsmasq
dnsmasq: failed to bind socket: No such device

[root@halcyon ~]$ strace dnsmasq
execve("/usr/sbin/dnsmasq", ["dnsmasq"], [/* 42 vars */]) = 0
uname({sys="Linux", node="halcyon", ...}) = 0
brk(0)                                  = 0x8053000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40015000
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=75019, ...}) = 0
mmap2(NULL, 75019, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 ]\1\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1302876, ...}) = 0
mmap2(NULL, 1241060, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40029000
mmap2(0x40152000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x128)
= 0x40152000
mmap2(0x40156000, 8164, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40156000
close(3)                                = 0
munmap(0x40016000, 75019)               = 0
open("/dev/urandom", O_RDONLY)          = 3
read(3, "-N(\315\236~d\342\376A\26\344\260\323+0jM;z\333U\243#\22"..., 32) = 32
close(3)                                = 0
rt_sigaction(SIGUSR1, {0x8050310, [USR1], SA_RESTORER|SA_RESTART, 0x400523f8},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGUSR2, {0x8050310, [USR2], SA_RESTORER|SA_RESTART, 0x400523f8},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGHUP, {0x8050310, [HUP], SA_RESTORER|SA_RESTART, 0x400523f8},
{SIG_DFL}, 8) = 0
brk(0)                                  = 0x8053000
brk(0x8074000)                          = 0x8074000
brk(0)                                  = 0x8074000
open("/etc/dnsmasq.conf", O_RDONLY)     = -1 ENOENT (No such file or directory)
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
ioctl(3, 0x8912, 0xbffff298)            = 0
ioctl(3, 0x8912, 0xbffff298)            = 0
ioctl(3, 0x8913, 0x8053a68)             = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(4, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("69.15.43.130")}, 16) = 0
ioctl(3, 0x8913, 0x8053a88)             = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
setsockopt(5, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(5, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("192.168.42.1")}, 16) = 0
ioctl(3, 0x8913, 0x8053aa8)             = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 6
setsockopt(6, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(6, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("127.0.0.1")}, 16) = 0
close(3)                                = 0
open("/proc/net/if_inet6", O_RDONLY)    = 3
fstat64(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40016000
read(3, "fe800000000000000208c7fffe91ffa2"..., 1024) = 162
socket(PF_INET6, SOCK_DGRAM, 0)         = 7
setsockopt(7, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(7, {sa_family=AF_INET6, sin6_port=htons(53), inet_pton(AF_INET6,
"fe80::208:c7ff:fe91:ffa2", &sin6_addr), sin6_flowinfo=0,
sin6_scope_id=536870912}, 28) = -1 ENODEV (No such device)
close(7)                                = 0
close(3)                                = 0
munmap(0x40016000, 4096)                = 0
write(2, "dnsmasq: ", 9dnsmasq: )                = 9
write(2, "failed to bind socket: No such d"..., 37failed to bind socket: No such
device) = 37
write(2, "\n", 1
)                       = 1
time([1080217919])                      = 1080217919
open("/etc/localtime", O_RDONLY)        = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1267, ...}) = 0
mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40158000
read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0"..., 131072) = 1267
close(3)                                = 0
munmap(0x40158000, 131072)              = 0
rt_sigaction(SIGPIPE, {0x400fac60, [], SA_RESTORER, 0x400523f8}, {SIG_DFL}, 8) = 0
socket(PF_UNIX, SOCK_DGRAM, 0)          = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
connect(3, {sa_family=AF_UNIX, path="/dev/log"}, 16) = -1 EPROTOTYPE (Protocol
wrong type for socket)
close(3)                                = 0
socket(PF_UNIX, SOCK_STREAM, 0)         = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
connect(3, {sa_family=AF_UNIX, path="/dev/log"}, 16) = 0
send(3, "<10>Mar 25 07:31:59 dnsmasq: fai"..., 67, 0) = 67
rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
time([1080217919])                      = 1080217919
rt_sigaction(SIGPIPE, {0x400fac60, [], SA_RESTORER, 0x400523f8}, {SIG_DFL}, 8) = 0
send(3, "<10>Mar 25 07:31:59 dnsmasq: FAI"..., 48, 0) = 48
rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
exit_group(1)                           = ?
[root@halcyon /usr/portage/net-dns]$ dnsmasq
dnsmasq: failed to bind socket: No such device
[root@halcyon /usr/portage/net-dns]$ strace dnsmasq
execve("/usr/sbin/dnsmasq", ["dnsmasq"], [/* 42 vars */]) = 0
uname({sys="Linux", node="halcyon", ...}) = 0
brk(0)                                  = 0x8053000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40015000
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=75019, ...}) = 0
mmap2(NULL, 75019, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 ]\1\000"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1302876, ...}) = 0
mmap2(NULL, 1241060, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40029000
mmap2(0x40152000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x128)
= 0x40152000
mmap2(0x40156000, 8164, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40156000
close(3)                                = 0
munmap(0x40016000, 75019)               = 0
open("/dev/urandom", O_RDONLY)          = 3
read(3, "\325\342\334\253n\205\243X/\227\241\207b\361\267bw2\224"..., 32) = 32
close(3)                                = 0
rt_sigaction(SIGUSR1, {0x8050310, [USR1], SA_RESTORER|SA_RESTART, 0x400523f8},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGUSR2, {0x8050310, [USR2], SA_RESTORER|SA_RESTART, 0x400523f8},
{SIG_DFL}, 8) = 0
rt_sigaction(SIGHUP, {0x8050310, [HUP], SA_RESTORER|SA_RESTART, 0x400523f8},
{SIG_DFL}, 8) = 0
brk(0)                                  = 0x8053000
brk(0x8074000)                          = 0x8074000
brk(0)                                  = 0x8074000
open("/etc/dnsmasq.conf", O_RDONLY)     = -1 ENOENT (No such file or directory)
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3
ioctl(3, 0x8912, 0xbffff298)            = 0
ioctl(3, 0x8912, 0xbffff298)            = 0
ioctl(3, 0x8913, 0x8053a68)             = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
setsockopt(4, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
bind(4, {sa_family=AF_INET, sin_port=htons(53),
sin_addr=inet_addr("69.15.43.130")}, 16) = 0
ioctl(3, 0x8913, 0x8053a88)             = 0
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 5
 device) = 37
write(2, "\n", 1
)                       = 1
time([1080217947])                      = 1080217947
open("/etc/localtime", O_RDONLY)        = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=1267, ...}) = 0
mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0x40158000
read(3, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0"..., 131072) = 1267
close(3)                                = 0
munmap(0x40158000, 131072)              = 0
rt_sigaction(SIGPIPE, {0x400fac60, [], SA_RESTORER, 0x400523f8}, {SIG_DFL}, 8) = 0
socket(PF_UNIX, SOCK_DGRAM, 0)          = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
connect(3, {sa_family=AF_UNIX, path="/dev/log"}, 16) = -1 EPROTOTYPE (Protocol
wrong type for socket)
close(3)                                = 0
socket(PF_UNIX, SOCK_STREAM, 0)         = 3
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
connect(3, {sa_family=AF_UNIX, path="/dev/log"}, 16) = 0
send(3, "<10>Mar 25 07:32:27 dnsmasq: fai"..., 67, 0) = 67
rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
time([1080217947])                      = 1080217947
rt_sigaction(SIGPIPE, {0x400fac60, [], SA_RESTORER, 0x400523f8}, {SIG_DFL}, 8) = 0
send(3, "<10>Mar 25 07:32:27 dnsmasq: FAI"..., 48, 0) = 48
rt_sigaction(SIGPIPE, {SIG_DFL}, NULL, 8) = 0
exit_group(1)                           = ?


Expected Results:  
dnsmasq should return no output and background.

lsmod demonstrating that the ipv6 module has been inserted.

[root@halcyon ~]$ lsmod
Module                  Size  Used by
ipt_TOS                 2112  12
ipt_LOG                 5472  0
ipt_REJECT              5792  4
ipt_pkttype             1472  2
ipt_state               1600  15
ip_nat_irc              3664  0
ip_nat_tftp             2896  0
ip_nat_ftp              4400  0
ip_conntrack_irc       70548  1 ip_nat_irc
ip_conntrack_tftp       2996  0
ip_conntrack_ftp       71348  1 ip_nat_ftp
ipt_multiport           1792  0
ipt_conntrack           2144  3
iptable_filter          2336  1
iptable_mangle          2272  1
iptable_nat            21444  4 ip_nat_irc,ip_nat_tftp,ip_nat_ftp
ip_tables              17152  10
ipt_TOS,ipt_LOG,ipt_REJECT,ipt_pkttype,ipt_state,ipt_multiport,ipt_conntrack,iptable_filter,iptable_mangle,iptable_nat
sg                     31776  0
st                     37944  0
md5                     3776  1
ipv6                  252320  22
rtc                    11912  0
Comment 1 Jon Portnoy (RETIRED) gentoo-dev 2004-03-28 13:08:34 UTC
dnsmasq 2.x is now very usable, so I've marked 2.5 stable on x86 and amd64.