#20403: default route is missing
---------------------------------------+----------------------------------
Reporter: cmtsij | Owner: developers
Type: defect | Status: new
Priority: normal | Milestone: Chaos Calmer (trunk)
Component: base system | Version: Trunk
Keywords: busybox route musl uClibc |
---------------------------------------+----------------------------------
OpenWrt version: r46725
Toolchain: toolchain-mips_34kc_gcc-4.8-linaro_musl-1.1.10
Device: can reproduce on GL-iNet, xiaomi mini, Buffalo WZR-HP-AG300H
the content of "/proc/net/route" is correct.
But command "route -n" is in-correct.
Please check console log above:
{{{
root@OpenWrt:~# cat /proc/net/route
Iface Destination Gateway Flags RefCnt Use Metric
Mask MTU Window IRTT
eth0 00000000 0A05A0FE 0003 0 0 0
00000000 0 0 0
eth0 0A05A000 00000000 0001 0 0 0
FFFFFF00 0 0 0
eth0 0A05A0FE 00000000 0005 0 0 0
FFFFFFFF 0 0 0
br-lan C0A80100 00000000 0001 0 0 0
FFFFFF00 0 0 0
root@OpenWrt:~# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use
Iface
10.5.160.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
10.5.160.254 0.0.0.0 255.255.255.255 UH 0 0 0
eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
br-lan
}}}
strace route result:
{{{
root@OpenWrt:~# strace route -n
execve("/sbin/route", ["route", "-n"], [/* 12 vars */]) = 0
set_thread_area(0x779eb644) = 0
set_tid_address(0x779e4584) = 1318
open("/etc/ld-musl-mips-sf.path", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = -1
ENOENT (No such file or directory)
open("/lib/libgcc_s.so.1", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 3
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=89084, ...}) = 0
read(3,
"\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\10\0\0\0\1\0\0006\340\0\0\0004"...,
936) = 936
mmap2(NULL, 147456, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x7791a000
mmap2(0x7793d000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3,
0x13000) = 0x7793d000
close(3) = 0
getuid() = 0
open("/proc/net/route", O_RDONLY|O_LARGEFILE) = 3
ioctl(1, TIOCGWINSZ, 0x7ff9ba40) = 0
writev(1, [{"", 0}, {"Kernel IP routing table\n", 24}], 2Kernel IP routing
table
) = 24
writev(1, [{"Destination Gateway "..., 71}, {" Iface\n", 7}],
2Destination Gateway Genmask Flags Metric Ref Use
Iface
) = 78
readv(3, [{"", 0}, {"Iface\tDestination\tGateway \tFlags"..., 1024}], 2) =
512
writev(1, [{"10.5.160.0 0.0.0.0 "..., 76}, {"\n", 1}],
210.5.160.0 0.0.0.0 255.255.255.0 U 0 0 0
eth0
) = 77
writev(1, [{"10.5.160.254 0.0.0.0 "..., 76}, {"\n", 1}],
210.5.160.254 0.0.0.0 255.255.255.255 UH 0 0 0
eth0
) = 77
readv(3, [{"", 0}, {"Iface\tDestination\tGateway \tFlags"..., 1024}], 2) =
0
writev(1, [{"192.168.1.0 0.0.0.0 "..., 78}, {"\n", 1}],
2192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0
br-lan
) = 79
close(3) = 0
exit_group(0) = ?
+++ exited with 0 +++
}}}
If I switch to use '''uClibc''', the issue is gone.
I would put uClibc result later.
--
Ticket URL: <https://dev.openwrt.org/ticket/20403>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets