<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>2035</bug_id>
          
          <creation_ts>2003-01-22 14:15:58 +0300</creation_ts>
          <short_desc>клиент DHCP не берет адрес если в машине 2 сетевые карты</short_desc>
          <delta_ts>2005-08-30 14:28:00 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>dhcp-client</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Igor Muratov">migor</reporter>
          <assigned_to name="Grigory Milev">week</assigned_to>
          <cc>sem</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1858</commentid>
    <comment_count>0</comment_count>
    <who name="Igor Muratov">migor</who>
    <bug_when>2003-01-22 14:15:58 +0300</bug_when>
    <thetext>Информация о баге поступила от Oleg K. Artemjev &amp;lt;&lt;a href=&quot;mailto:olli@rbauto.ru&amp;gt&quot; target=&quot;_new&quot;&gt;olli@rbauto.ru&amp;gt&lt;/a&gt;; Полное описание прилагается
---

---
Alt Linux Master 2.0 


[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# /sbin/dhcpcd eth0
[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# echo $?
0
[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# /sbin/dhcpcd eth1
[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# echo $?
1
[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# /etc/rc.d/init.d/network stop
Shutting down interface eth0:                                                                         [  OK  ]
Shutting down interface eth1:                                                                         [  OK  ]
[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# /sbin/dhcpcd eth1
[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# echo $?
0
[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# /sbin/dhcpcd eth0
[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# echo $?
1
[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# 

В /etc/sysconfig/network-scripts/if-up в этом кусочке 

if [ -n \&amp;quot;$DYNCONFIG\&amp;quot; ]; then
    echo -n \&amp;quot;Determining IP information for $DEVICE via ${DHCP_CLIENT##*/}...\&amp;quot;
    if $DHCP_CLIENT $DHCP_ARGS; then
    echo \&amp;quot; done.\&amp;quot;
    else
    echo \&amp;quot; failed.\&amp;quot;
    exit 1
    fi

конфликт с возвратом $? от dhcpcd &amp;lt;interface&amp;gt;.

[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# /etc/rc.d/init.d/network stop
Shutting down interface eth0:                                                                         [  OK  ]
Shutting down interface eth1:                                                                         [  OK  ]
[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# dhcpcd eth0
[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# echo $?
0
[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# dhcpcd eth1
[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# echo $?
1
[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# ifconfig 
eth0      Link encap:Ethernet  HWaddr 00:05:5D:28:3C:AE  
          inet addr:192.168.200.2  Bcast:192.168.200.255  Mask:255.255.255.0
          UP BROADCAST NOTRAILERS RUNNING  MTU:1500  Metric:1
          RX packets:4067 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1170 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 
          RX bytes:1494436 (1.4 Mb)  TX bytes:117127 (114.3 Kb)

eth1      Link encap:Ethernet  HWaddr 00:C0:DF:09:20:9D  
          UP BROADCAST NOTRAILERS RUNNING  MTU:1500  Metric:1
          RX packets:6632 errors:0 dropped:0 overruns:0 frame:0
          TX packets:925 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 
          RX bytes:1977332 (1.8 Mb)  TX bytes:63176 (61.6 Kb)

[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# 

Таким образом баг в самом dhcpcd который не отрабатывает корректно ситуацию с двумя картами.

[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# strace /sbin/dhcpcd eth1 2&amp;gt; /tmp/dcpcd.strace
[&lt;a href=&quot;mailto:root@ws002&quot; target=&quot;_new&quot;&gt;root@ws002&lt;/a&gt; root]# cat /tmp/dcpcd.strace
execve(\&amp;quot;/sbin/dhcpcd\&amp;quot;, [\&amp;quot;/sbin/dhcpcd\&amp;quot;, \&amp;quot;eth1\&amp;quot;], [/* 44 vars */]) = 0
uname({sys=\&amp;quot;Linux\&amp;quot;, node=\&amp;quot;ws002\&amp;quot;, ...}) = 0
brk(0)                                  = 0x8051754
open(\&amp;quot;/etc/ld.so.preload\&amp;quot;, O_RDONLY)    = -1 ENOENT (No such file or directory)
open(\&amp;quot;/etc/ld.so.cache\&amp;quot;, O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=117420, ...}) = 0
old_mmap(NULL, 117420, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2aabf000
close(3)                                = 0
open(\&amp;quot;/lib/libc.so.6\&amp;quot;, O_RDONLY)        = 3
read(3, \&amp;quot;\\177ELF\\1\\1\\1\\0\\0\\0\\0\\0\\0\\0\\0\\0\\3\\0\\3\\0\\1\\0\\0\\0000\\210\&amp;quot;..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=5752480, ...}) = 0
old_mmap(NULL, 1264224, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x2aadc000
mprotect(0x2ac07000, 39520, PROT_NONE)  = 0
old_mmap(0x2ac07000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12a000) = 0x2ac07000
old_mmap(0x2ac0d000, 14944, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ac0d000
close(3)                                = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2ac11000
munmap(0x2aabf000, 117420)              = 0
getuid32()                              = 0
umask(022)                              = 022
open(\&amp;quot;/var/run/dhcpcd-eth1.pid\&amp;quot;, O_RDONLY) = -1 ENOENT (No such file or directory)
rt_sigaction(SIGHUP, NULL, {SIG_DFL}, 8) = 0
rt_sigaction(SIGHUP, {0x804a3c0, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGINT, {0x804a3c0, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGQUIT, {0x804a3c0, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGILL, {0x804a3c0, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGTRAP, {0x804a3c0, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGABRT, {0x804a3c0, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGBUS, {0x804a3c0, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGFPE, {0x804a3c0, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGKILL, {0x804a3c0, [], 0x4000000}, NULL, 8) = -1 EINVAL (Invalid argument)
rt_sigaction(SIGUSR1, {0x804a3c0, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGSEGV, {0x804a3c0, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGUSR2, {0x804a3c0, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGPIPE, {0x804a3c0, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGALRM, {0x804a3c0, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGTERM, {0x804a3c0, [], 0x4000000}, NULL, 8) = 0
rt_sigaction(SIGCHLD, {0x804a3c0, [], 0x4000000}, NULL, 8) = 0
alarm(60)                               = 0
socket(PF_PACKET, SOCK_PACKET, 768)     = 3
ioctl(3, 0x8927, 0x7ffff760)            = 0
setsockopt(3, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0
ioctl(3, 0x8914, 0x7ffff760)            = 0
ioctl(3, 0x8927, 0x7ffff760)            = 0
setsockopt(3, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0
ioctl(3, 0x8914, 0x7ffff760)            = 0
bind(3, {sin_family=AF_PACKET, proto=0x6574, if12648, pkttype=0, addr(0)={0, }, 16) = 0
time(NULL)                              = 1043241962
socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 4
setsockopt(4, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0
bind(4, {sin_family=AF_INET, sin_port=htons(68), sin_addr=inet_addr(\&amp;quot;0.0.0.0\&amp;quot;)}}, 16) = -1 EADDRINUSE (Address already in use)
brk(0)                                  = 0x8051754
brk(0x80518e4)                          = 0x80518e4
brk(0x8052000)                          = 0x8052000
brk(0x8055000)                          = 0x8055000
time([1043241962])                      = 1043241962
open(\&amp;quot;/etc/localtime\&amp;quot;, O_RDONLY)        = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=815, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aabf000
read(5, \&amp;quot;TZif\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\f\\0\\0\\0\\f\\0\&amp;quot;..., 4096) = 815
close(5)                                = 0
munmap(0x2aabf000, 4096)                = 0
getpid()                                = 10047
rt_sigaction(SIGPIPE, {0x2abbed90, [], 0x4000000}, {0x804a3c0, [], 0x4000000}, 8) = 0
socket(PF_UNIX, SOCK_DGRAM, 0)          = 5
fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0
connect(5, {sin_family=AF_UNIX, path=\&amp;quot;/dev/log\&amp;quot;}, 16) = 0
send(5, \&amp;quot;&amp;lt;131&amp;gt;Jan 22 16:26:02 dhcpcd[1004\&amp;quot;..., 76, 0) = 76
rt_sigaction(SIGPIPE, {0x804a3c0, [], 0x4000000}, NULL, 8) = 0
_exit(1)                                = ?

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>17400</commentid>
    <comment_count>1</comment_count>
    <who name="Grigory Milev">week</who>
    <bug_when>2004-07-22 09:20:20 +0400</bug_when>
    <thetext>fixed</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>