Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 309133 - net-misc/dhcp-4.2.1 dhcrelay fails after network interface is restarted
Summary: net-misc/dhcp-4.2.1 dhcrelay fails after network interface is restarted
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-12 12:37 UTC by Milan Dadok
Modified: 2014-11-08 18:22 UTC (History)
1 user (show)

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 Milan Dadok 2010-03-12 12:37:11 UTC
Dhcrelay don't work correctlly after network interface on which is listening is restarted (ie. /etc/init.d/net.eth1 restart)
Workaround is manually run /etc/init.d/dhcrelay restart after.

My working solution is to make dhcrelay init.d script depend on all network interfaces on which dhcp listen

depend() {
        need net net.eth1
        use logger
}

After that dhcrelay is restarted too during eth1 restart.

But there is no documentation about that. Can it be in some place - /etc/conf.d/dhcrelay in IFACE parameter description? 
For example.
# Please make init.d dhcrelay script depend on all used interfaces (net.eth0 etc.)


Reproducible: Always

Steps to Reproduce:
1. vlan90 on eth1, vlan1 on eth0
2. dhcrelay configured on vlan90 and vlan1
3. /etc/init.d/net.eth1 restart
messages: receive_packet failed on vlan90: Network is down
dhcrelay no more relays DHCP packets from vlan90 interface to vlan10
Comment 1 Panagiotis Christopoulos (RETIRED) gentoo-dev 2010-03-23 21:57:32 UTC
Please paste your emerge --info output. 
Comment 2 Milan Dadok 2010-03-24 00:06:03 UTC
Portage 2.1.6.13 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.31-gentoo-r6 i686)
=================================================================
System uname: Linux-2.6.31-gentoo-r6-i686-Pentium_III_-Coppermine-with-gentoo-1.12.11.1
Timestamp of tree: Wed, 10 Mar 2010 09:30:01 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p28
dev-lang/python:     2.5.4-r3, 2.6.2-r1
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.63-r1
sys-devel/automake:  1.10.3
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=i686 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe -march=i686 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="buildpkg ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl apache2 berkdb bzip2 cli cracklib crypt cups cxx dri extensions gd gdbm gpm iconv iproute2 jpeg ldap modules mssql mudflap mysql nagios-dns nagios-ntp nagios-ping nagios-ssh ncurses nls nptl nptlonly openmp pam pcre perl png pppd python readline reflection session slang spl ssl svg sysfs tcpd threads unicode ups vim-syntax x86 xml xmlreader xmlwriter xorg xsl zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="prefork" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

Comment 3 Stefan Behte (RETIRED) gentoo-dev Security 2010-06-19 11:41:25 UTC
I have confirmed this bug on a tap interface.
Comment 4 SpanKY gentoo-dev 2011-03-05 23:54:56 UTC
does dhcp-4.2.1 fail too ?
Comment 5 Milan Dadok 2011-03-08 20:57:39 UTC
(In reply to comment #4)
> does dhcp-4.2.1 fail too ?

yes, I make quick check in one server

config: vlan1 + vlan10 + vlan90 on eth1

Mar  8 21:45:02 dhcrelay: Internet Systems Consortium DHCP Relay Agent 4.2.1 Gentoo-r0
Mar  8 21:45:02 dhcrelay: Copyright 2004-2011 Internet Systems Consortium.
Mar  8 21:45:02 dhcrelay: All rights reserved.
Mar  8 21:45:02 dhcrelay: For info, please visit https://www.isc.org/software/dhcp/
Mar  8 21:45:02 dhcrelay: Listening on LPF/vlan1/00:0a:5e:65:xx:xx
Mar  8 21:45:02 dhcrelay: Sending on   LPF/vlan1/00:0a:5e:65:xx:xx
Mar  8 21:45:02 dhcrelay: Listening on LPF/vlan10/00:0a:5e:65:xx:xx
Mar  8 21:45:02 dhcrelay: Sending on   LPF/vlan10/00:0a:5e:65:xx:xx
Mar  8 21:45:02 dhcrelay: Listening on LPF/vlan90/00:0a:5e:65:xx:xx
Mar  8 21:45:02 dhcrelay: Sending on   LPF/vlan90/00:0a:5e:65:xx:xx
Mar  8 21:45:02 dhcrelay: Sending on   Socket/fallback

after /etc/init.d/net.eth1 restart
Mar  8 21:45:56 dhcrelay: receive_packet failed on vlan1: Network is down
Mar  8 21:45:58 dhcrelay: receive_packet failed on vlan10: Network is down
Mar  8 21:45:59 dhcrelay: receive_packet failed on vlan90: Network is down

from now dhcp request are ignored

after
/etc-init.d/dhcrelay restart
dhcp works
Comment 6 SpanKY gentoo-dev 2014-11-08 18:22:03 UTC
should be all set now in the tree; thanks for the report!

Commit message: Add suggestion to set rc_need for specific network interfaces when IFACE is set
http://sources.gentoo.org/net-misc/dhcp/files/dhcrelay.conf?r1=1.7&r2=1.8