Login  Register

Router mode - hotfix 160210 breaks router image

Posted by harpss1ngh on Jun 29, 2016; 11:53pm
URL: https://itus.accessinnov.com/Router-mode-hotfix-160210-breaks-router-image-tp1066.html

I decided to switch to router mode and have been trying for days to apply the hotfixes. This hotfix doesn't work in router mode. When i install the hotfix and reboot, the shield stops at: "NET: Registered orotocol family 24" and the network interfaces don't initialise. I can see the shell but I can't get the network up and running. Ifconfig shows no ip addresses on any interface.

At that point I have to factory reset again.

I see this repeated error in logread:

illegal repeated keyword at line 13 of /var/etc/dnsmasq.conf
FAILED to start up


Also under /tmp I see a lot of nobody:nogroup file permissions. Running chown -R root:root doesn't work as afterwards I tried rebooting and the permissions changed back.

I tried rebooting dnsmasq:

/etc/init.d/dnsmasq stop
/etc/init.d/dnsmasq start

Then i got this:
uci: Entry not found
sh: 10.10.10.11: unknown operand
uci: Entry not found


After inspecting the config files it appears the hotfix is tailored for bridge mode? dhcp, network and dnsmasq files appear to be for a bridged interface. I will apply the hotfix and revert the files to what they should be.


For reference: changing the hotfix files to these for router mode fixes the issue:

/etc/config/dnsmasq.conf
# auto-generated config file from /etc/config/dhcp
conf-file=/etc/dnsmasq.conf
dhcp-authoritative
domain-needed
log-queries
localise-queries
read-ethers
bogus-priv
expand-hosts
local-service
domain=lan
server=/lan/
dhcp-leasefile=/tmp/dhcp.leases
resolv-file=/tmp/resolv.conf.auto
addn-hosts=/tmp/hosts
conf-dir=/tmp/dnsmasq.d
stop-dns-rebind
rebind-localhost-ok
dhcp-broadcast=tag:needs-broadcast




dhcp-range=lan,10.10.10.100,10.10.10.254,255.255.255.0,12h
no-dhcp-interface=eth0









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

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '250'
        option leasetime '12h'
        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'



root@Shield:/etc/config# cat network
config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'
        option auto '1'
        option enabled '1'

config globals 'globals'
        option ula_prefix 'fd47:1ab7:5b77::/48'

config interface 'wan'
        option ifname 'eth0'
        option proto 'dhcp'
        option auto '1'
        option enabled '1'

config interface 'lan'
        option ifname 'eth1 eth2'
        option force_link '1'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '10.10.10.10'
        option auto '1'
        option enabled '1'

config interface 'blockdomain'
        option ifname 'br-lan'
        option proto 'static'
        option ipaddr '10.10.10.11'
        option netmask '255.255.255.0'


After reverting these files I can get connectivity again.

However, after installing the 160309 and 160528 hotfixes, i get the error about line 13 again so I have to factory reset and try again.

Maybe there should be a script that checks what mode you are running and then patches correctly for that mode....something to think about for future hotfixes