Modify

Opened 5 years ago

Closed 5 years ago

#13789 closed defect (wontfix)

udhcpc bug

Reported by: fclql@… Owned by: developers
Priority: high Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: Cc:

Description

root@X-openwrt:/# udhcpc -s b/netifd/dhcp.script -f -t 0 -i eth0.2 -C
udhcpc (v1.19.4) started
Command failed: Not found
Sending discover...
Sending discover...
Sending discover...

Attachments (0)

Change History (8)

comment:1 Changed 5 years ago by jow

  • Resolution set to invalid
  • Status changed from new to closed

Your command line is wrong.

comment:2 Changed 5 years ago by jiyif

  • Resolution invalid deleted
  • Status changed from closed to reopened

I define eth0.2 as wan port ( dhcp client mode). This port cann't get IP address.

root@openwrt:/# ifconfig
br-lan Link encap:Ethernet HWaddr 7A:16:F0:CD:CC:70

inet addr:192.168.16.1 Bcast:192.168.16.255 Mask:255.255.255.0
inet6 addr: fe80::7816:f0ff:fecd:cc70/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:311 errors:0 dropped:0 overruns:0 frame:0
TX packets:111 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:29737 (29.0 KiB) TX bytes:27438 (26.7 KiB)

br-lan1 Link encap:Ethernet HWaddr 7A:16:F0:CD:CC:71

inet addr:116.154.2.1 Bcast:116.154.2.255 Mask:255.255.255.0
inet6 addr: fe80::7816:f0ff:fecd:cc71/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:810 (810.0 B)

eth0 Link encap:Ethernet HWaddr 7A:16:F0:CD:CC:70

inet6 addr: fe80::7816:f0ff:fecd:cc70/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:504 errors:0 dropped:17 overruns:0 frame:0
TX packets:139 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:84325 (82.3 KiB) TX bytes:44052 (43.0 KiB)
Interrupt:5

eth0.1 Link encap:Ethernet HWaddr 7A:16:F0:CD:CC:70

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:196 errors:0 dropped:0 overruns:0 frame:0
TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:20848 (20.3 KiB) TX bytes:2550 (2.4 KiB)

eth0.2 Link encap:Ethernet HWaddr 7A:16:F0:CD:CC:72

inet6 addr: fe80::7816:f0ff:fecd:cc72/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:236 errors:0 dropped:0 overruns:0 frame:0
TX packets:53 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:37643 (36.7 KiB) TX bytes:19665 (19.2 KiB)

eth0.3 Link encap:Ethernet HWaddr 7A:16:F0:CD:CC:73

inet6 addr: fe80::7816:f0ff:fecd:cc73/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:19272 (18.8 KiB)

eth0.4 Link encap:Ethernet HWaddr 7A:16:F0:CD:CC:70

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:810 (810.0 B)

lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:898 errors:0 dropped:0 overruns:0 frame:0
TX packets:898 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:60232 (58.8 KiB) TX bytes:60232 (58.8 KiB)

wlan0 Link encap:Ethernet HWaddr 7A:16:F0:CD:CC:70

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:114 errors:0 dropped:0 overruns:0 frame:0
TX packets:311 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:10479 (10.2 KiB) TX bytes:57114 (55.7 KiB)

root@openwrt:/# ping www.baidu.com
ping: bad address 'www.baidu.com'
root@openwrt:/# [ 241.040000] rt305x-esw 10110000.esw: link changed 0x12
[ 241.290000] rt305x-esw 10110000.esw: link changed 0x12
[ 617.750000] rt305x-esw 10110000.esw: link changed 0x12
[ 618.000000] rt305x-esw 10110000.esw: link changed 0x12

root@openwrt:/# [ 1375.940000] rt305x-esw 10110000.esw: link changed 0x12
[ 1376.200000] rt305x-esw 10110000.esw: link changed 0x12
#################################################################################
fclql debug it and show:

root@openwrt:/# udhcpc -s b/netifd/dhcp.script -f -t 0 -i eth0.2 -C
udhcpc (v1.19.4) started
Command failed: Not found
Sending discover...
Sending discover...
Sending discover...

The WAN (dhcp client mode) port isn't work.

comment:3 follow-ups: Changed 5 years ago by jow

  • Resolution set to invalid
  • Status changed from reopened to closed

The commandline is still wrong. "b/netifd/dhcp.script" is no valid path, hence the "Command failed: Not found" error.

comment:4 Changed 5 years ago by anonymous

udhcpc -s /lib/netifd/
dhcp.script -f -t 0 -i
eth0.2 -C
udhcpc (v1.19.4) started
Command failed: Not
found
Sending discover...
Sending discover...
Sending discover...

comment:5 in reply to: ↑ 3 Changed 5 years ago by anonymous

  • Resolution invalid deleted
  • Status changed from closed to reopened

Replying to jow:

The commandline is still wrong. "b/netifd/dhcp.script" is no valid path, hence the "Command failed: Not found" error.

udhcpc -s /lib/netifd/
dhcp.script -f -t 0 -i
eth0.2 -C
udhcpc (v1.19.4) started
Command failed: Not
found
Sending discover...
Sending discover...
Sending discover...

comment:6 in reply to: ↑ 3 Changed 5 years ago by anonymous

  • Resolution invalid deleted
  • Status changed from closed to reopened

Replying to jow:

The commandline is still wrong. "b/netifd/dhcp.script" is no valid path, hence the "Command failed: Not found" error.

udhcpc -s /lib/netifd/
dhcp.script -f -t 0 -i
eth0.2 -C
udhcpc (v1.19.4) started
Command failed: Not
found
Sending discover...
Sending discover...
Sending discover...

comment:7 Changed 5 years ago by jiyif

sorry. copy again
root@openwrt:/# udhcpc -s /lib/netifd/dhcp.script -f -t 0 -i eth0.2 -C
udhcpc (v1.19.4) started
Command failed: Not found
Sending discover...
Sending discover...
Sending discover...
[30839.450000] rt305x-esw 10110000.esw: link changed 0x12
[30839.700000] rt305x-esw 10110000.esw: link changed 0x12

comment:8 Changed 5 years ago by nbd

  • Resolution set to wontfix
  • Status changed from reopened to closed

Why are you calling udhcpc with the netifd script manually? That makes no sense at all.
Either you want to bypass /etc/config/network and run udhcpc manually - in that case omit -s.
Or you want to use /etc/config/network, in that case configure your wan interface there and use ifup/ifdown/ifstatus, but do NOT call udhcpc manually.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.