Tiny Core Base > TCB Bugs

Busybox udhcpc sometimes fails to connect to modern router

<< < (2/3) > >>

Paul_123:
Normally privesep needs to point to a user with no login shell.

Use “nobody”.

polikuo:

--- Quote from: Rich on October 17, 2020, 07:53:44 AM ---
--- Code: ---/dev/null 2>&1 &
--- End code ---

--- End quote ---

Sure, I know that it's forked, but if the router assigns an IP, udhcpc will background itself.

Try it yourself, kill the running udhcp, then start it again without '&'

--- Code: ---tc@box:~$ sudo udhcpc
udhcpc: started, v1.31.1
udhcpc: sending discover
udhcpc: sending select for 192.168.0.101
udhcpc: lease of 192.168.0.101 obtained, lease time 7200
deleting routers
route: SIOCDELRT: No such process
adding dns 192.168.1.1
adding dns 192.168.0.1
tc@box:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=115 time=11.945 ms
64 bytes from 8.8.8.8: seq=1 ttl=115 time=8.994 ms
64 bytes from 8.8.8.8: seq=2 ttl=115 time=9.137 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 8.994/10.025/11.945 ms

--- End code ---

polikuo:

--- Quote from: Paul_123 on October 17, 2020, 08:41:42 AM ---Normally privesep needs to point to a user with no login shell.

Use “nobody”.

--- End quote ---

I think it's working ?


--- Code: ---root@box:~# pkill udhcpc
root@box:~# dhcpcd
refusing chroot: nobody: /nonexistent
dhcpcd-9.3.1 starting
DUID 00:01:00:01:27:1d:a7:f6:dc:a6:32:37:c7:eb
eth0: IAID 32:37:c7:eb
eth0: soliciting a DHCP lease
eth0: offered 192.168.0.101 from 192.168.0.1
eth0: leased 192.168.0.101 for 7200 seconds
eth0: adding route to 192.168.0.0/24
eth0: adding default route via 192.168.0.1
forked to background, child pid 6774
root@box:~# ifconfig
eth0      Link encap:Ethernet  HWaddr DC:A6:32:37:C7:EB 
          inet addr:192.168.0.101  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:251 errors:0 dropped:0 overruns:0 frame:0
          TX packets:83 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:19725 (19.2 KiB)  TX bytes:5996 (5.8 KiB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:200 (200.0 B)  TX bytes:200 (200.0 B)

root@box:~# ping -c 3 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=115 time=11.520 ms
64 bytes from 8.8.8.8: seq=1 ttl=115 time=10.977 ms
64 bytes from 8.8.8.8: seq=2 ttl=115 time=11.002 ms

--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 10.977/11.166/11.520 ms
root@box:~#

--- End code ---

If you think my configs are OK, then I'll mail it.

Paul_123:
I might have steered you wrong.  Looking at the source https://roy.marples.name/cgit/dhcpcd.git/tree/src/privsep.c#n85

That printed message would mean in init error.  Looks like it needs a user that can spawn a chroot environment.   The requirements are not clear.

curaga:
For busybox bugs, since bb is easy to build, you could try git busybox, and if it still happens report a bug to them.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version