Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 131681 - pdnsd failed to use UDP protocol (solution proposal)
Summary: pdnsd failed to use UDP protocol (solution proposal)
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
: 147784 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-04-29 07:15 UTC by Tomas Rohr
Modified: 2006-09-16 02:31 UTC (History)
2 users (show)

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


Attachments
pdnsd-1.2.4-r1.ebuild (pdnsd-1.2.4-r1.ebuild,3.91 KB, text/plain)
2006-04-29 07:28 UTC, Tomas Rohr
Details
pdnsd.conf (pdnsd.conf,2.57 KB, text/plain)
2006-04-30 09:46 UTC, Tomas Rohr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Rohr 2006-04-29 07:15:57 UTC
pdnsd is reporting such error in syslog:

Apr 29 13:31:29 triss pdnsd[11795]: Could not set options on udp socket: Protocol not available

I have found solution proposal here:
http://lists.freebsd.org/pipermail/freebsd-ports/2004-November/018234.html
Author of pdnsd recomanded to use --disable-src-addr-disc configure option.
When I added this into ebuild it worked.
I have net-dns/pdnsd-1.2.4-r1

---EMERGE INFO ----
Gentoo Base System version 1.12.0_pre17
Portage 2.1_pre7-r5 (default-linux/x86/2005.1, gcc-3.4.6, glibc-2.4-r1, 2.6.15-gentoo i686)
=================================================================
System uname: 2.6.15-gentoo i686 Pentium III (Coppermine)
ccache version 2.4 [enabled]
dev-lang/python:     2.3.4-r1, 2.4.2-r1
dev-util/ccache:     2.4
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r3
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -mfpmath=sse -mmmx -msse -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/alias /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -mfpmath=sse -mmmx -msse -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks keepwork metadata-transfer sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.ynet.sk/pub"
LINGUAS="cs"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X aac alsa apm audiofile avi bash-completion berkdb bitmap-fonts browserplugin bzlib cli crypt cups eds emboss encode esd expat ffmpeg foomaticdb fortran gdbm gif gstreamer gtk gtk2 iconv imlib ipv6 isdnlog jpeg libg++ libwww live mad mikmod mmx motif mozilla mp3 mpeg ncurses nls nptl nptlonly nsplugin ogg oggvorbis oss pam pcre pdflib perl png pppd python qt quicktime readline real reflection rtc sdl session spell spl sse ssl tcpd tetex tiff truetype truetype-fonts type1-fonts vorbis wifi win32codecs xml2 xmms xorg xpm xv zlib elibc_glibc input_devices_mouse input_devices_keyboard input_devices_void input_devices_evdev kernel_linux linguas_cs userland_GNU video_cards_savage video_cards_fbdev video_cards_dummy video_cards_s3 video_cards_vesa video_cards_vga"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS
Comment 1 Tomas Rohr 2006-04-29 07:28:57 UTC
Created attachment 85768 [details]
pdnsd-1.2.4-r1.ebuild

added --disable-src-addr-disc as a configure option
Comment 2 Alin Năstac (RETIRED) gentoo-dev 2006-04-29 10:26:04 UTC
The error is "protocol not available" so I suspect either
  a) TARGET wasn't set as TARGET_LINUX by configure script
  b) SOL_IP define is wrong

Please do the following test with the original ebuild:
  1) ebuild pdnsd-1.2.4-r1.ebuild unpack
  2) edit /var/tmp/portage/pdnsd-1.2.4-r1/work/src/dns_answer.c and replace lines 1287 and 1298 with
     log_error("(%d, %d) Could not set options on udp socket: %s",SOL_IP,IP_PKTINFO,strerror(errno));
respectively
     log_error("(%d, %d) Could not set options on udp socket: %s",SOL_IPV6,IPV6_PKTINFO,strerror(errno));
  3) ebuild pdnsd-1.2.4-r1.ebuild merge

First thing after merge, you should check that config.h contain a line like this:
  #define TARGET TARGET_LINUX
If it does, restart pdnsd and post here the new log lines obtained with it.
Comment 3 Tomas Rohr 2006-04-30 07:47:20 UTC
Here are  results after changes in dns_answer.c and remerging (compile, install, qmerge)

$ grep TARGET /var/tmp/portage/pdnsd-1.2.4-r1/work/pdnsd-1.2.4/config.h
/* Define your Target here. Currently defined are TARGET_LINUX (any
 * architecture), TARGET_BSD (experimental; tested on FreeBSD, hopefully
 * works for other BSD variants) and TARGET_CYGWIN. */
#define TARGET TARGET_LINUX
#define TARGET_LINUX  0
#define TARGET_BSD    1
#define TARGET_CYGWIN 2

New log entry:
Apr 30 16:37:52 triss pdnsd[25396]: (41, 50) Could not set options on udp socket:Protocol not available
Comment 4 Alin Năstac (RETIRED) gentoo-dev 2006-04-30 09:30:34 UTC
1) Did you compiled your kernel with IPv6 support (CONFIG_IPV6)? 
2) Did you set anything related to IPv6 in your pdnsd.conf? 
3) Does your interfaces have IPv6 addresses?
Comment 5 Tomas Rohr 2006-04-30 09:46:46 UTC
Created attachment 85837 [details]
pdnsd.conf
Comment 6 Tomas Rohr 2006-04-30 09:47:53 UTC
1) My kernel configuration is as follows:

$ zcat /proc/config.gz | grep CONFIG_IPV6
CONFIG_IPV6=y
# CONFIG_IPV6_PRIVACY is not set
CONFIG_IPV6_TUNNEL=y

2) In pdnsd.conf I didn't set anything related to IPv6
(my pdnsd in attachement)
3) None interface has IPv6 address.

Additional information:
When I compile pdnsd without IPv6 support (USE=-ipv6) it works.
pdnsd is being launched with "-a" command line parameter (autodetect wheather to use IPv4 or IPv6). I use only IPv4, so maybe the autodetection does not work or I have something set up incorrectly. 
Comment 7 Alin Năstac (RETIRED) gentoo-dev 2006-04-30 10:04:58 UTC
I think autodetection isn't that smart (it only looks for IPv6 support in kernel, disregarding the fact it isn't used on any interface). Either that or your interfaces _do_ have IPv6 addresses without you knowing it (at least lo should have one). The latter is easy to check by running "ip addr".

You have 2 possible solution to your problem:
 a) build pdnsd without IPv6 support
 b) build your kernel without IPv6 support
Since you don't really need IPv6, both solutions are equally good.

Bug closed as INVALID.
Comment 8 Jakub Moc (RETIRED) gentoo-dev 2006-09-16 02:31:39 UTC
*** Bug 147784 has been marked as a duplicate of this bug. ***