Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#2144 - Missing ipv4 network on gl-ar150 router #8409

Closed
openwrt-bot opened this issue Feb 25, 2019 · 4 comments
Closed

FS#2144 - Missing ipv4 network on gl-ar150 router #8409

openwrt-bot opened this issue Feb 25, 2019 · 4 comments
Labels

Comments

@openwrt-bot
Copy link

rezder:

The router gl-ar150 extern antenna have wifi wlan0, lan eth1 and wan eth0 when
it is booted with wan connected and not lan connected.
The ipv4 network is not available over the wifi. When the lan is connected during
boot there is no problem.

There have been similar problems before.
Bug FS#763

Connecting the lan after boot does not help. Stoping and starting the dnsmasq after
boot solves the problem.

I am using 18.06.2 and it is also in 18.06.1 I do not know when it started.

To me it looks like the etc/init.d/dnsmasq have run with variable $BOOT sat this
does not configure the dhcp so there will be no dhcp ipv4 range in dnsmesq.conf.cfg01411c

"dhcp-range=set:lan,192.168.8.100,192.168.8.249,255.255.255.0,12h"

and no ip addresses in dhcp.conf.cfg01411c

"192.168.8.1 GL-AR150
fdf8:514b:e97a::1 GL-AR150"

This result in no dhcp server on ipv4.

When lan is plug in the during boot the dnsmesq is retarted
dmseg: Mon Feb 25 10:07:21 2019 daemon.info dnsmasq[744]: exiting on receipt of SIGTERM
and the dhcp is configured.

It is my first time looking at a openwrt so I maybe wayoff,
I have time to dig deeper but without someone to anwser a few question
that seems like a lost cause.

Please let me know if you need more information.

Here is what I used to look through.

The network config:

config interface 'loopback' option ifname 'lo' option proto 'static' option ipaddr '127.0.0.1' option netmask '255.0.0.0'

config globals 'globals'
option ula_prefix 'fdf8:514b:e97a::/48'

config interface 'lan'
option ifname 'eth1'
option force_link '1'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option hostname 'GL-AR150-881'
option ipaddr '192.168.8.1'

config interface 'wan'
option ifname 'eth0'
option proto 'dhcp'
option hostname 'GL-AR150-881'

config interface 'wan6'
option ifname 'eth0'
option proto 'dhcpv6'

The dhcp config is:

config dnsmasq option domainneeded '1' option boguspriv '1' option filterwin2k '0' option localise_queries '1' option rebind_protection '1' option rebind_localhost '1' option local '/lan/' option domain 'lan' option expandhosts '1' option nonegcache '0' option authoritative '1' option readethers '1' option leasefile '/tmp/dhcp.leases' option resolvfile '/tmp/resolv.conf.auto' option localservice '1'

config dhcp 'lan'
option interface 'lan'
option start '100'
option limit '150'
option leasetime '12h'
option dhcpv6 'server'
option ra 'server'

config dhcp 'wan'
option interface 'wan'
option ignore '1'

config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'

It generated the files config files for dnsmasq and dns:

Not Working generated files:

root@GL-AR150:~# cat /var/etc/dnsmasq.conf.cfg01411c # auto-generated config file from /etc/config/dhcp conf-file=/etc/dnsmasq.conf dhcp-authoritative domain-needed localise-queries read-ethers enable-ubus expand-hosts bind-dynamic local-service domain=lan server=/lan/ dhcp-leasefile=/tmp/dhcp.leases resolv-file=/tmp/resolv.conf.auto stop-dns-rebind rebind-localhost-ok dhcp-broadcast=tag:needs-broadcast addn-hosts=/tmp/hosts conf-dir=/tmp/dnsmasq.d user=dnsmasq group=dnsmasq

dhcp-ignore-names=tag:dhcp_bogus_hostname
conf-file=/usr/share/dnsmasq/dhcpbogushostname.conf

bogus-priv
conf-file=/usr/share/dnsmasq/rfc6761.conf

root@GL-AR150:~# cat /tmp/hosts/dhcp.cfg01411c

auto-generated config file from /etc/config/dhcp

root@GL-AR150:~# logread
Mon Feb 25 09:49:41 2019 daemon.info hostapd: wlan0: STA 00:18:de:6e:1c:66 IEEE 802.11: authenticated
Mon Feb 25 09:49:41 2019 daemon.info hostapd: wlan0: STA 00:18:de:6e:1c:66 IEEE 802.11: associated (aid 1)
Mon Feb 25 09:49:41 2019 daemon.notice hostapd: wlan0: AP-STA-CONNECTED 00:18:de:6e:1c:66
Mon Feb 25 09:49:41 2019 daemon.info hostapd: wlan0: STA 00:18:de:6e:1c:66 WPA: pairwise key handshake completed (RSN)
Mon Feb 25 09:49:42 2019 daemon.info odhcpd[860]: Using a RA lifetime of 0 seconds on br-lan
Mon Feb 25 09:49:43 2019 daemon.notice odhcpd[860]: Got DHCPv6 request
Mon Feb 25 09:49:43 2019 daemon.warn odhcpd[860]: DHCPV6 CONFIRM IA_NA from 000496f7799bee5e4d0c1d09e6b7af698e42 on br-lan: not on-link
Mon Feb 25 09:49:43 2019 daemon.info dnsmasq[744]: read /etc/hosts - 1 addresses
Mon Feb 25 09:49:43 2019 daemon.info dnsmasq[744]: read /tmp/hosts/odhcpd - 0 addresses
Mon Feb 25 09:49:43 2019 daemon.info dnsmasq[744]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Mon Feb 25 09:49:44 2019 daemon.notice odhcpd[860]: Got DHCPv6 request
Mon Feb 25 09:49:44 2019 daemon.warn odhcpd[860]: DHCPV6 SOLICIT IA_NA from 000496f7799bee5e4d0c1d09e6b7af698e42 on br-lan: ok fdf8:514b:e97a::aa7/128
Mon Feb 25 09:49:45 2019 daemon.notice odhcpd[860]: Got DHCPv6 request
Mon Feb 25 09:49:45 2019 daemon.warn odhcpd[860]: DHCPV6 REQUEST IA_NA from 000496f7799bee5e4d0c1d09e6b7af698e42 on br-lan: ok fdf8:514b:e97a::aa7/128
Mon Feb 25 09:49:45 2019 daemon.info dnsmasq[744]: read /etc/hosts - 1 addresses
Mon Feb 25 09:49:45 2019 daemon.info dnsmasq[744]: read /tmp/hosts/odhcpd - 1 addresses
Mon Feb 25 09:49:45 2019 daemon.info dnsmasq[744]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Mon Feb 25 09:50:23 2019 kern.notice kernel: [ 83.422055] random: crng init done
Mon Feb 25 09:50:56 2019 authpriv.info dropbear[1448]: Child connection from fdf8:514b:e97a::aa7:41489
Mon Feb 25 09:51:06 2019 authpriv.notice dropbear[1448]: Password auth succeeded for 'root' from fdf8:514b:e97a::aa7:41489

root@GL-AR150:~# dmesg
[ 0.000000] Linux version 4.9.152 (buildbot@builds-03.infra.lede-project.org) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7549-217219e) ) #0 Mon Jan 28 08:54:32 2019
[ 0.000000] MyLoader: sysp=a1a4a4a4, boardp=e5e4b5a5, parts=85a124a5
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[ 0.000000] SoC: Atheros AR9330 rev 1
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 04000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] On node 0 totalpages: 16384
[ 0.000000] free_area_init_node: node 0, pgdat 8044a204, node_mem_map 81000020
[ 0.000000] Normal zone: 128 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 16384 pages, LIFO batch:3
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=132768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: board=GL-AR150 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro console=ttyATH0,115200 rootfstype=squashfs noinitrd
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 60028K/65536K available (3388K kernel code, 175K rwdata, 448K rodata, 268K init, 211K bss, 5508K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:51
[ 0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[ 0.000014] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[ 0.007586] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[ 0.088757] pid_max: default: 32768 minimum: 301
[ 0.093347] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.099512] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.110351] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.118390] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.126123] NET: Registered protocol family 16
[ 0.131127] MIPS: machine is GL.iNet GL-AR150
[ 0.656270] Can't analyze schedule() prologue at 803ab684
[ 0.678677] clocksource: Switched to clocksource MIPS
[ 0.683646] NET: Registered protocol family 2
[ 0.687874] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.693233] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.699289] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.705467] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.710955] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.717204] NET: Registered protocol family 1
[ 0.721121] PCI: CLS 0 bytes, default 32
[ 0.726262] Crashlog allocated RAM at address 0x3f00000
[ 0.731589] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.746787] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.751040] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.773573] io scheduler noop registered
[ 0.775940] io scheduler deadline registered (default)
[ 0.781508] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.791012] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a AR933X UART
[ 0.798858] console [ttyATH0] enabled
[ 0.805643] bootconsole [early0] disabled
[ 0.822053] m25p80 spi0.0: found w25q128, expected m25p80
[ 0.836830] m25p80 spi0.0: w25q128 (16384 Kbytes)
[ 0.840146] 4 cmdlinepart partitions found on MTD device spi0.0
[ 0.845982] Creating 4 MTD partitions on "spi0.0":
[ 0.850804] 0x000000000000-0x000000040000 : "u-boot"
[ 0.858506] 0x000000040000-0x000000050000 : "u-boot-env"
[ 0.865390] 0x000000050000-0x000000ff0000 : "firmware"
[ 0.887313] 2 uimage-fw partitions found on MTD device firmware
[ 0.891855] 0x000000050000-0x0000001b0000 : "kernel"
[ 0.898948] 0x0000001b0000-0x000000ff0000 : "rootfs"
[ 0.904892] mtd: device 4 (rootfs) set to be root filesystem
[ 0.909224] 1 squashfs-split partitions found on MTD device rootfs
[ 0.915276] 0x000000400000-0x000000ff0000 : "rootfs_data"
[ 0.923740] 0x000000ff0000-0x000001000000 : "art"
[ 0.931475] libphy: Fixed MDIO Bus: probed
[ 0.954443] libphy: ag71xx_mdio: probed
[ 1.580395] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
[ 1.589186] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[ 2.220160] ag71xx-mdio.1: Found an AR7240/AR9330 built-in switch
[ 2.262279] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[ 2.269488] NET: Registered protocol family 10
[ 2.277802] NET: Registered protocol family 17
[ 2.280958] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[ 2.293923] 8021q: 802.1Q VLAN Support v1.8
[ 2.300394] hctosys: unable to open rtc device (rtc0)
[ 2.310592] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[ 2.318255] Freeing unused kernel memory: 268K
[ 2.321298] This architecture does not have kernel memory protection.
[ 2.538693] random: fast init done
[ 3.185428] init: Console is alive
[ 3.187695] init: - watchdog -
[ 4.405403] kmodloader: loading kernel modules from /etc/modules-boot.d/

[ 4.494256] usbcore: registered new interface driver usbfs
[ 4.498406] usbcore: registered new interface driver hub
[ 4.503826] usbcore: registered new device driver usb
[ 4.516294] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 4.523662] ehci-platform: EHCI generic platform driver
[ 4.527554] ehci-platform ehci-platform: EHCI Host Controller
[ 4.533306] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[ 4.543246] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[ 4.568732] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[ 4.574818] hub 1-0:1.0: USB hub found
[ 4.577726] hub 1-0:1.0: 1 port detected
[ 4.582545] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 4.591909] init: - preinit -
[ 5.549495] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 7.610162] eth0: link up (100Mbps/Full duplex)
[ 7.613286] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 8.936801] jffs2: notice: (397) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[ 8.953615] mount_root: switching to jffs2 overlay
[ 8.997220] urandom-seed: Seeding with /etc/urandom.seed
[ 9.278860] eth0: link down
[ 9.298174] procd: - early -
[ 9.299856] procd: - watchdog -
[ 9.986373] procd: - watchdog -
[ 9.988456] procd: - ubus -
[ 10.132306] random: ubusd: uninitialized urandom read (4 bytes read)
[ 10.140757] random: ubusd: uninitialized urandom read (4 bytes read)
[ 10.146320] random: ubusd: uninitialized urandom read (4 bytes read)
[ 10.153493] procd: - init -
[ 10.809144] kmodloader: loading kernel modules from /etc/modules.d/*
[ 10.820985] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 10.841495] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[ 10.848047] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[ 10.859097] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 10.875467] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[ 10.950543] usbcore: registered new interface driver usbserial
[ 10.955075] usbcore: registered new interface driver usbserial_generic
[ 10.961678] usbserial: USB Serial support registered for generic
[ 10.994372] xt_time: kernel timezone is -0000
[ 11.070685] usbcore: registered new interface driver pl2303
[ 11.074937] usbserial: USB Serial support registered for pl2303
[ 11.086021] PPP generic driver version 2.4.2
[ 11.092573] NET: Registered protocol family 24
[ 11.151352] ath: EEPROM regdomain: 0x0
[ 11.151367] ath: EEPROM indicates default country code should be used
[ 11.151372] ath: doing EEPROM country->regdmn map search
[ 11.151392] ath: country maps to regdmn code: 0x3a
[ 11.151400] ath: Country alpha2 being used: US
[ 11.151406] ath: Regpair used: 0x3a
[ 11.163466] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 11.169719] ieee80211 phy0: Atheros AR9330 Rev:1 mem=0xb8100000, irq=2
[ 11.213249] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 12.897104] urandom_read: 5 callbacks suppressed
[ 12.897117] random: jshn: uninitialized urandom read (4 bytes read)
[ 13.017028] random: ubusd: uninitialized urandom read (4 bytes read)
[ 26.704844] br-lan: port 1(eth1) entered blocking state
[ 26.708623] br-lan: port 1(eth1) entered disabled state
[ 26.714484] device eth1 entered promiscuous mode
[ 26.763278] br-lan: port 1(eth1) entered blocking state
[ 26.767063] br-lan: port 1(eth1) entered forwarding state
[ 26.772776] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[ 26.851480] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 27.688843] br-lan: port 1(eth1) entered disabled state
[ 28.970259] eth0: link up (100Mbps/Full duplex)
[ 28.973396] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 31.832881] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 31.854346] br-lan: port 2(wlan0) entered blocking state
[ 31.858211] br-lan: port 2(wlan0) entered disabled state
[ 31.864200] device wlan0 entered promiscuous mode
[ 33.149847] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 33.155015] br-lan: port 2(wlan0) entered blocking state
[ 33.160147] br-lan: port 2(wlan0) entered forwarding state
[ 33.182461] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 83.422055] random: crng init done

Working generated files:

root@GL-AR150:~# cat /var/etc/dnsmasq.conf.cfg01411c # auto-generated config file from /etc/config/dhcp conf-file=/etc/dnsmasq.conf dhcp-authoritative domain-needed localise-queries read-ethers enable-ubus expand-hosts bind-dynamic local-service domain=lan server=/lan/ dhcp-leasefile=/tmp/dhcp.leases resolv-file=/tmp/resolv.conf.auto stop-dns-rebind rebind-localhost-ok dhcp-broadcast=tag:needs-broadcast addn-hosts=/tmp/hosts conf-dir=/tmp/dnsmasq.d user=dnsmasq group=dnsmasq

dhcp-ignore-names=tag:dhcp_bogus_hostname
conf-file=/usr/share/dnsmasq/dhcpbogushostname.conf

bogus-priv
conf-file=/usr/share/dnsmasq/rfc6761.conf
dhcp-range=set:lan,192.168.8.100,192.168.8.249,255.255.255.0,12h
no-dhcp-interface=eth0

root@GL-AR150:~# cat /tmp/hosts/dhcp.cfg01411c

auto-generated config file from /etc/config/dhcp

192.168.8.1 GL-AR150
fdf8:514b:e97a::1 GL-AR150

root@GL-AR150:~# logread
Mon Feb 25 10:07:21 2019 daemon.notice odhcpd[860]: Got DHCPv6 request
Mon Feb 25 10:07:21 2019 daemon.warn odhcpd[860]: DHCPV6 REQUEST IA_NA from 000496f7799bee5e4d0c1d09e6b7af698e42 on br-lan: ok fdf8:514b:e97a::aa7/128
Mon Feb 25 10:07:21 2019 daemon.info dnsmasq[744]: read /etc/hosts - 1 addresses
Mon Feb 25 10:07:21 2019 daemon.info dnsmasq[744]: read /tmp/hosts/dhcp.cfg01411c.1130 - 0 addresses
Mon Feb 25 10:07:21 2019 daemon.info dnsmasq[744]: read /tmp/hosts/odhcpd - 1 addresses
Mon Feb 25 10:07:21 2019 daemon.info dnsmasq[744]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Mon Feb 25 10:07:21 2019 daemon.info dnsmasq[744]: exiting on receipt of SIGTERM
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: started, version 2.80 cachesize 150
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: DNS service limited to local subnets
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect inotify dumpfile
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq-dhcp[1407]: DHCP, IP range 192.168.8.100 -- 192.168.8.249, lease time 12h
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: using local addresses only for domain test
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: using local addresses only for domain onion
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: using local addresses only for domain localhost
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: using local addresses only for domain local
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: using local addresses only for domain invalid
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: using local addresses only for domain bind
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: using local addresses only for domain lan
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: reading /tmp/resolv.conf.auto
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: using local addresses only for domain test
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: using local addresses only for domain onion
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: using local addresses only for domain localhost
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: using local addresses only for domain local
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: using local addresses only for domain invalid
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: using local addresses only for domain bind
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: using local addresses only for domain lan
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: using nameserver 192.168.1.1#53
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: read /etc/hosts - 1 addresses
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: read /tmp/hosts/odhcpd - 1 addresses
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq-dhcp[1407]: read /etc/ethers - 0 addresses
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: read /etc/hosts - 1 addresses
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: read /tmp/hosts/odhcpd - 1 addresses
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq[1407]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Mon Feb 25 10:07:22 2019 daemon.info dnsmasq-dhcp[1407]: read /etc/ethers - 0 addresses
Mon Feb 25 10:07:24 2019 daemon.info hostapd: wlan0: STA 00:18:de:6e:1c:66 IEEE 802.11: authenticated
Mon Feb 25 10:07:24 2019 daemon.info hostapd: wlan0: STA 00:18:de:6e:1c:66 IEEE 802.11: associated (aid 1)
Mon Feb 25 10:07:24 2019 daemon.notice hostapd: wlan0: AP-STA-CONNECTED 00:18:de:6e:1c:66
Mon Feb 25 10:07:24 2019 daemon.info hostapd: wlan0: STA 00:18:de:6e:1c:66 WPA: pairwise key handshake completed (RSN)
Mon Feb 25 10:07:25 2019 daemon.info odhcpd[860]: Using a RA lifetime of 0 seconds on br-lan
Mon Feb 25 10:07:26 2019 daemon.notice odhcpd[860]: Got DHCPv6 request
Mon Feb 25 10:07:26 2019 daemon.warn odhcpd[860]: DHCPV6 CONFIRM IA_NA from 000496f7799bee5e4d0c1d09e6b7af698e42 on br-lan: not on-link
Mon Feb 25 10:07:26 2019 daemon.notice odhcpd[860]: Got DHCPv6 request
Mon Feb 25 10:07:26 2019 daemon.warn odhcpd[860]: DHCPV6 SOLICIT IA_NA from 000496f7799bee5e4d0c1d09e6b7af698e42 on br-lan: ok fdf8:514b:e97a::367/128
Mon Feb 25 10:07:27 2019 daemon.info dnsmasq-dhcp[1407]: DHCPDISCOVER(br-lan) 192.168.8.172 00:18:de:6e:1c:66
Mon Feb 25 10:07:27 2019 daemon.info dnsmasq-dhcp[1407]: DHCPOFFER(br-lan) 192.168.8.172 00:18:de:6e:1c:66
Mon Feb 25 10:07:27 2019 daemon.notice odhcpd[860]: Got DHCPv6 request
Mon Feb 25 10:07:27 2019 daemon.warn odhcpd[860]: DHCPV6 REQUEST IA_NA from 000496f7799bee5e4d0c1d09e6b7af698e42 on br-lan: ok fdf8:514b:e97a::367/128
Mon Feb 25 10:07:30 2019 authpriv.info dropbear[1454]: Child connection from fdf8:514b:e97a::aa7:43476
Mon Feb 25 10:07:30 2019 daemon.info dnsmasq-dhcp[1407]: DHCPDISCOVER(br-lan) 192.168.8.208 00:16:36:9a:49:c5
Mon Feb 25 10:07:30 2019 daemon.info dnsmasq-dhcp[1407]: DHCPOFFER(br-lan) 192.168.8.208 00:16:36:9a:49:c5
Mon Feb 25 10:07:30 2019 daemon.info dnsmasq[1407]: read /etc/hosts - 1 addresses
Mon Feb 25 10:07:30 2019 daemon.info dnsmasq[1407]: read /tmp/hosts/odhcpd - 2 addresses
Mon Feb 25 10:07:30 2019 daemon.info dnsmasq[1407]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Mon Feb 25 10:07:30 2019 daemon.info dnsmasq-dhcp[1407]: read /etc/ethers - 0 addresses
Mon Feb 25 10:07:30 2019 daemon.info dnsmasq-dhcp[1407]: DHCPREQUEST(br-lan) 192.168.8.172 00:18:de:6e:1c:66
Mon Feb 25 10:07:30 2019 daemon.info dnsmasq-dhcp[1407]: DHCPACK(br-lan) 192.168.8.172 00:18:de:6e:1c:66 acer3043
Mon Feb 25 10:07:30 2019 daemon.info dnsmasq-dhcp[1407]: DHCPREQUEST(br-lan) 192.168.8.172 00:18:de:6e:1c:66
Mon Feb 25 10:07:30 2019 daemon.info dnsmasq-dhcp[1407]: DHCPACK(br-lan) 192.168.8.172 00:18:de:6e:1c:66 acer3043
Mon Feb 25 10:07:39 2019 authpriv.notice dropbear[1454]: Password auth succeeded for 'root' from fdf8:514b:e97a::aa7:43476
Mon Feb 25 10:08:05 2019 kern.notice kernel: [ 78.808586] random: crng init done
Mon Feb 25 10:08:06 2019 daemon.info dnsmasq-dhcp[1407]: DHCPDISCOVER(br-lan) 00:16:36:9a:49:c5
Mon Feb 25 10:08:06 2019 daemon.info dnsmasq-dhcp[1407]: DHCPOFFER(br-lan) 192.168.8.208 00:16:36:9a:49:c5
Mon Feb 25 10:08:06 2019 daemon.info dnsmasq-dhcp[1407]: DHCPREQUEST(br-lan) 192.168.8.208 00:16:36:9a:49:c5
Mon Feb 25 10:08:06 2019 daemon.info dnsmasq-dhcp[1407]: DHCPACK(br-lan) 192.168.8.208 00:16:36:9a:49:c5 acer3043

root@GL-AR150:~# dmesg
[ 0.000000] Linux version 4.9.152 (buildbot@builds-03.infra.lede-project.org) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7549-217219e) ) #0 Mon Jan 28 08:54:32 2019
[ 0.000000] MyLoader: sysp=a1a4a4a4, boardp=e5e4b5a5, parts=85a124a5
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[ 0.000000] SoC: Atheros AR9330 rev 1
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 04000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] On node 0 totalpages: 16384
[ 0.000000] free_area_init_node: node 0, pgdat 8044a204, node_mem_map 81000020
[ 0.000000] Normal zone: 128 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 16384 pages, LIFO batch:3
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=132768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
[ 0.000000] Kernel command line: board=GL-AR150 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,16000k(firmware),64k(art)ro console=ttyATH0,115200 rootfstype=squashfs noinitrd
[ 0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 60028K/65536K available (3388K kernel code, 175K rwdata, 448K rodata, 268K init, 211K bss, 5508K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:51
[ 0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[ 0.000014] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[ 0.007585] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[ 0.088756] pid_max: default: 32768 minimum: 301
[ 0.093346] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.099512] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.110350] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.118389] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.126124] NET: Registered protocol family 16
[ 0.131127] MIPS: machine is GL.iNet GL-AR150
[ 0.656269] Can't analyze schedule() prologue at 803ab684
[ 0.678678] clocksource: Switched to clocksource MIPS
[ 0.683647] NET: Registered protocol family 2
[ 0.687874] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.693233] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.699288] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.705467] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.710954] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.717204] NET: Registered protocol family 1
[ 0.721120] PCI: CLS 0 bytes, default 32
[ 0.726263] Crashlog allocated RAM at address 0x3f00000
[ 0.731589] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[ 0.746786] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.751039] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.773570] io scheduler noop registered
[ 0.775940] io scheduler deadline registered (default)
[ 0.781508] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.791012] ar933x-uart: ttyATH0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a AR933X UART
[ 0.798858] console [ttyATH0] enabled
[ 0.805642] bootconsole [early0] disabled
[ 0.822054] m25p80 spi0.0: found w25q128, expected m25p80
[ 0.836940] m25p80 spi0.0: w25q128 (16384 Kbytes)
[ 0.840259] 4 cmdlinepart partitions found on MTD device spi0.0
[ 0.846095] Creating 4 MTD partitions on "spi0.0":
[ 0.850916] 0x000000000000-0x000000040000 : "u-boot"
[ 0.858619] 0x000000040000-0x000000050000 : "u-boot-env"
[ 0.865504] 0x000000050000-0x000000ff0000 : "firmware"
[ 0.887436] 2 uimage-fw partitions found on MTD device firmware
[ 0.891977] 0x000000050000-0x0000001b0000 : "kernel"
[ 0.899072] 0x0000001b0000-0x000000ff0000 : "rootfs"
[ 0.905016] mtd: device 4 (rootfs) set to be root filesystem
[ 0.909346] 1 squashfs-split partitions found on MTD device rootfs
[ 0.915399] 0x000000400000-0x000000ff0000 : "rootfs_data"
[ 0.923861] 0x000000ff0000-0x000001000000 : "art"
[ 0.931592] libphy: Fixed MDIO Bus: probed
[ 0.954535] libphy: ag71xx_mdio: probed
[ 1.580396] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd041, driver=Generic PHY]
[ 1.589185] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[ 2.220161] ag71xx-mdio.1: Found an AR7240/AR9330 built-in switch
[ 2.262280] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[ 2.269486] NET: Registered protocol family 10
[ 2.277791] NET: Registered protocol family 17
[ 2.280949] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[ 2.293914] 8021q: 802.1Q VLAN Support v1.8
[ 2.300379] hctosys: unable to open rtc device (rtc0)
[ 2.310576] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[ 2.318237] Freeing unused kernel memory: 268K
[ 2.321280] This architecture does not have kernel memory protection.
[ 2.538694] random: fast init done
[ 3.185487] init: Console is alive
[ 3.187760] init: - watchdog -
[ 4.406216] kmodloader: loading kernel modules from /etc/modules-boot.d/

[ 4.495067] usbcore: registered new interface driver usbfs
[ 4.499330] usbcore: registered new interface driver hub
[ 4.504539] usbcore: registered new device driver usb
[ 4.517118] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 4.524476] ehci-platform: EHCI generic platform driver
[ 4.528370] ehci-platform ehci-platform: EHCI Host Controller
[ 4.534120] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[ 4.544062] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[ 4.578732] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[ 4.584875] hub 1-0:1.0: USB hub found
[ 4.587725] hub 1-0:1.0: 1 port detected
[ 4.592472] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 4.609129] init: - preinit -
[ 5.567562] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 7.691291] eth0: link up (100Mbps/Full duplex)
[ 7.694417] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 8.971058] jffs2: notice: (397) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[ 8.987808] mount_root: switching to jffs2 overlay
[ 9.031937] urandom-seed: Seeding with /etc/urandom.seed
[ 9.312744] eth0: link down
[ 9.332255] procd: - early -
[ 9.333820] procd: - watchdog -
[ 10.023062] procd: - watchdog -
[ 10.025158] procd: - ubus -
[ 10.168622] random: ubusd: uninitialized urandom read (4 bytes read)
[ 10.177067] random: ubusd: uninitialized urandom read (4 bytes read)
[ 10.182692] random: ubusd: uninitialized urandom read (4 bytes read)
[ 10.189760] procd: - init -
[ 10.846238] kmodloader: loading kernel modules from /etc/modules.d/*
[ 10.858294] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 10.878875] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[ 10.885425] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[ 10.896442] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 10.912859] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[ 10.988460] usbcore: registered new interface driver usbserial
[ 10.993104] usbcore: registered new interface driver usbserial_generic
[ 10.999542] usbserial: USB Serial support registered for generic
[ 11.032383] xt_time: kernel timezone is -0000
[ 11.109304] usbcore: registered new interface driver pl2303
[ 11.113558] usbserial: USB Serial support registered for pl2303
[ 11.124655] PPP generic driver version 2.4.2
[ 11.131248] NET: Registered protocol family 24
[ 11.190177] ath: EEPROM regdomain: 0x0
[ 11.190191] ath: EEPROM indicates default country code should be used
[ 11.190196] ath: doing EEPROM country->regdmn map search
[ 11.190217] ath: country maps to regdmn code: 0x3a
[ 11.190225] ath: Country alpha2 being used: US
[ 11.190230] ath: Regpair used: 0x3a
[ 11.202188] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 11.208321] ieee80211 phy0: Atheros AR9330 Rev:1 mem=0xb8100000, irq=2
[ 11.251934] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 12.952349] urandom_read: 5 callbacks suppressed
[ 12.952361] random: jshn: uninitialized urandom read (4 bytes read)
[ 13.072732] random: ubusd: uninitialized urandom read (4 bytes read)
[ 26.754774] br-lan: port 1(eth1) entered blocking state
[ 26.758554] br-lan: port 1(eth1) entered disabled state
[ 26.764414] device eth1 entered promiscuous mode
[ 26.828954] br-lan: port 1(eth1) entered blocking state
[ 26.832741] br-lan: port 1(eth1) entered forwarding state
[ 26.838364] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[ 26.901696] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 27.854373] br-lan: port 1(eth1) entered disabled state
[ 28.389995] eth1: link up (1000Mbps/Full duplex)
[ 28.393227] br-lan: port 1(eth1) entered blocking state
[ 28.398386] br-lan: port 1(eth1) entered forwarding state
[ 28.498975] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 28.970283] eth0: link up (100Mbps/Full duplex)
[ 28.973401] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 32.072841] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[ 32.094353] br-lan: port 2(wlan0) entered blocking state
[ 32.098220] br-lan: port 2(wlan0) entered disabled state
[ 32.104221] device wlan0 entered promiscuous mode
[ 33.421666] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 33.426833] br-lan: port 2(wlan0) entered blocking state
[ 33.431962] br-lan: port 2(wlan0) entered forwarding state
[ 78.808586] random: crng init done

@openwrt-bot
Copy link
Author

rezder:

I have had more time to look at the problem.
dnsmasq is first run during boot with the BOOT variable sat to 1. No network configuration can take place as the network daemon is not running.

Then it gets a sigHUB signal from procd and run again. The signal is probably do to the trigger on the lan interface added in dnsmasq.
This run tries to configure the dhcp but it fails to do so because of
line 485 in dnsmasq
the dhcp_check on br-lan fails because it detects a another dhcp server.

When you reload dnsmasq it also fails same reason.
The trigger code is:
reload_service() {
rc_procd start_service "$@"
procd_send_signal dnsmasq "$@"
}
so it starts a new service before it kills the old I am tempted to try
switching the to lines. Why is the order like that.

Anyway when you stop the dnsmasq service with dnsmasq stop a sigTERM is send and when you start it again it works as the
dhcp_check on br-lan does not fail.

@openwrt-bot
Copy link
Author

l3u:

I have filed a bug report about this very issue apparently at the same time as you did, containing further information at https://bugs.openwrt.org/index.php?do=details&task_id=2145

And also started a forum thread with the goal of at least fixing this for now at https://forum.openwrt.org/t/gl-ar150-no-dhcp-if-lan-cable-is-not-plugged-during-boot/32349 – maybe you want to join the thread so we can track this down?

@openwrt-bot
Copy link
Author

rezder:

How many login do I have to create 3?, anyway I joined as rezder. I do have a work around. A service the stops and starts dnsmasq two calls and I notices the you have to disconnect and connect on the other machine to get the ipv4.

As I see it the reload service creates a race problem with the dhcp check so maybe change the order and sleep between them will work. I will look in to it tomorrow.

@openwrt-bot
Copy link
Author

rezder:

I currently use in init.d/dnsmasq

reload_service() {
procd_send_signal dnsmasq "$@"
sleep 5
rc_procd start_service "$@"
}
This result in a sigHUB and sigTERM being send, which looking very close to what happens when the cable is pluged in, but I do not think that is what was intended in both cases.

Anyway it works for now.

I used strace to trace signal calls to dnsmasq some time procd looks a little wild send many sigHUB and one sigINT to dnsmasq during start up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant