1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Please update DNSMASQ in Shibby Tomato

Discussion in 'Tomato Firmware' started by Kevin Darbyshire-Bryant, Feb 2, 2013.

  1. Kevin Darbyshire-Bryant

    Kevin Darbyshire-Bryant Networkin' Nut Member

    Hi Shibby,

    Could you please update dnsmasq to v2.65. The included version (2.61) has a few bugs related to IPv6 & also DNS caching that it would be good to fix.

    I use dnsmasq to provided dhcpv6 support to my home network, mainly so DNS lookups of both ipv4 & ipv6 names work, rather than using radvd. There are some bugs in the RA functionality of dnsmasq that have been fixed in later versions.

    I'd try to do this myself but I've no real idea as to where I'd even start!

    Many thanks,

    Kevin
     
  2. Kevin Darbyshire-Bryant

    Kevin Darbyshire-Bryant Networkin' Nut Member

    Ok, so I've tried to make some sort of start...and this is huge learning curve. Following instructions http://tomatousb.org/tut:how-to-build-and-rebuild-tomato-for-total-noobs I've got myself a Ubuntu 12.04 32-bit build environment in a virtualbox. I've cloned the git & checked-out origin/shibby-RT-N but I cannot get a successful compile of what I would have thought would be a last 'known good' config committed by shibby.

    It's currently failing as follows, appears to be missing a 'Makefile.in' in the build sub-dir of openvpn...and indeed it is missing. May I ask for some help? :)

    Code:
    checking for lzo/lzoutil.h... yes
    checking lzo/lzo1x.h usability... yes
    checking lzo/lzo1x.h presence... yes
    checking for lzo/lzo1x.h... yes
    checking for PKCS11_HELPER... no
    checking git checkout... no
    configure: creating ./config.status
    config.status: creating version.sh
    config.status: creating Makefile
    config.status: error: cannot find input file: `build/Makefile.in'
    make[4]: *** [openvpn/.conf] Error 1
    make[4]: Leaving directory `/home/kevin/tomato/release/src/router'
    make[3]: *** [all] Error 2
    make[3]: Leaving directory `/home/kevin/tomato/release/src-rt'
    make[2]: *** [bin] Error 2
    make[2]: Leaving directory `/home/kevin/tomato/release/src-rt'
    make[1]: *** [z] Error 2
    make[1]: Leaving directory `/home/kevin/tomato/release/src-rt'
    make: *** [v2z] Error 2
    
     
  3. koitsu

    koitsu Network Guru Member

  4. shibby20

    shibby20 Network Guru Member

    i didn`t send some Makefile.in files for openvpn to git (all *.in files was added to gitignore file). I will update git repository soon. Fo rnow just compile build without openvpn.
     
  5. leandroong

    leandroong Addicted to LI Member

    Shibby, i'm curious, do you have any plan to adapt to entware toolchain for your FW compilation?
     
  6. Kevin Darbyshire-Bryant

    Kevin Darbyshire-Bryant Networkin' Nut Member

    Thanks to all who've replied.

    Koitsu - I tried Ubuntu 11.04 but got the same/similar results (actually it didn't even get as far as before) I've subsequently re-installed 12.04 (to be honest I'm still having fun with the whole virtualbox concept!)

    Shibby - Thanks for the update - I'll keep an eye out for the git updates (like I even know what git is!)

    In the meantime I checked out the latest toastman-rt-n build and seem to have built a 'v2e' version - At some point I'll dare to try it on my router (brick coming up!) and if that works I'll trying updating dnsmasq - I just wish I really knew what I was doing :)
     
  7. Kevin Darbyshire-Bryant

    Kevin Darbyshire-Bryant Networkin' Nut Member

    As a quick update. Downloaded latest versions of dnsmasq & openvpn sources & replaced existing src/router/subdir with those versions. Much to my amazement the firmware has compiled! I'm away for a few days so won't be able to test my new firmware till then - hoping not to brick things, looks hopeful though, firmware file size is within 100 bytes of offical v105 firmware.

    The DNSMASQ fix is for 'on-link' RA ipv6 advertisements... I use dnsmasq for dhcpv6/DNS integration but it doesn't set the 'on-link' RA bit, so Windows 7 firewall doesn't know what the local subnet is and hence doesn't respond to ping requests.

    wish me luck!
     
    sarelc likes this.
  8. bmupton

    bmupton Serious Server Member

    By default, Windows 7 doesn't respond to pings even on IPV4 (this may also be part of your problem)
     
  9. Kevin Darbyshire-Bryant

    Kevin Darbyshire-Bryant Networkin' Nut Member

    May I be permitted to be very pleased with myself?

    I now have a shibby tomato with dnsmasq v2.65 integrated. This has fixed the lack of 'on-link' ipv6 RA announcements which now means that Windows now knows what the local ipv6 'subnet' is (ie: It knows the prefix length) and hence responds to ipv6 pings to hosts on the same prefix (assuming file & printer sharing is enable)

    Phew that was a learning curve! For the benefit of those wondering what the hell I'm doing, here are the additional lines in my dnsmasq.conf. I don't use radvd to advertise my ipv6 prefixes internally but rather dnsmasq.

    Code:
    local=/internal/
    dhcp-option=252,"\n"
    #filterwin2k
    bogus-priv
    domain-needed
    local-ttl=300
    dhcp-authoritative
    dhcp-range=2001:0470:1F09:FOOO::, 2001:0470:1F09:FOOO::FFFF, ra-names, 12h
    enable-ra
    #log-queries
    #log-dhcp
    Local defines the local DNS name and hence that we shouldn't forward queries to the root servers 'cos they won't know about my local internal domain and why bug them with the additional load.
    dhcp-option 252 - can't remember..something about stopping windows boxes asking for http proxy info all the time
    #filterwin2k - disabled at the mo, can't remember
    bogus-priv - any local hosts that we don't know about (via dhcp or /etc/hosts) are returned as 'no such domain' rather than forwarding to DNS root servers.
    domain-needed - again more stuff related to not forwarding unknown stuff up the tree
    local-ttl - set locally defined replies to 5 minute cacheable. reduces load on our server
    dhcp-authoritative - I *know* I'm the only dhcp server on the lan so avoid certain timeout procedures.
    dhcp-range - my ipv6 dhcp range - ra-names means I put this in my DNS cache as well so ipv6 lookups work too
    enable-ra - enable ipv6 router adverts
     
  10. Monk E. Boy

    Monk E. Boy Network Guru Member

    Good job!

    I believe that's Internet Explorer's "automatically discover proxy server" function, which is one of the first things I turn off when setting up a new Windows system.
     
  11. Kevin Darbyshire-Bryant

    Kevin Darbyshire-Bryant Networkin' Nut Member

    Ok, so more of an update. I realised that I hadn't spotted the Tomato specific dnsmasq lease code which helps the Device Status page, having now fixed that (merging the code into the very latest dnsmasq git (2.66 'alpha')) it would seem a waste for someone else to go through the work I've already done. The bleeding edge release seems stable to me.

    Shibby, would you be interested receiving the updated code? If so, how do I go about getting it to you?
     
  12. Mangix

    Mangix Networkin' Nut Member

    If only there were tomato on github... easiest way to do it like that is a pull request.

    Otherwise, posting a 'git diff' output would work...i don't know.
     
  13. koitsu

    koitsu Network Guru Member

    Kevin, the easiest way is to provide a patch generated by git diff as Mangix stated.

    Otherwise if you have two copies of the repo -- one with your changes and the other without -- then you can use diff -ruN tomato.orig tomato > dnsmasq.diff to make a patch.

    In the latter case, tomato.orig is a clean/untouched git checkout/pull directory from the repo, and tomato is the same except contains your changes/modified files.

    Then provide the dnsmasq.diff file here on the forum as an attachment.

    Be aware that if you built a firmware inside of the tomato directory, you may need to do make clean or make distclean otherwise things like object files, binaries, etc. will show up in the diff or git diff. You only care about the source code/Makefile changes you've done. Also sometimes make clean/distclean does not always delete everything, so be aware that you should review the diff/patch by hand/visually to make sure it correlates with all the stuff you modified.
     

Share This Page