#33 JmmDNS wasn't requesting on loopback

pending-fixed
Pierre Frisch
None
5
2012-06-10
2012-06-07
Trejkaz
No

Updating to JmDNS 3.x broke our test case where the server is advertised on the loopback address. This patch makes that work again.

Discussion

  • Trejkaz
    Trejkaz
    2012-06-07

    patch

     
    Attachments
  • Pierre Frisch
    Pierre Frisch
    2012-06-07

    Are you sure we should include the loopback in the default behavior? The loopback is useful during tests but can create a bit of noise in normal use. Why not implement a TestNetworkDiscovery as documented and use it for the tests? This was supposed to be very simple the default looks a bit scary because of Android API being a bit old.

    Pierre

     
  • Pierre Frisch
    Pierre Frisch
    2012-06-07

    • assigned_to: nobody --> spearway
    • status: open --> open-accepted
     
  • Even in production we have users who set their server to listen on 127.0.0.1, so whatever happens, it has to work over there too. The test in question is just to catch the library breaking functionality.

    I guess it could be an optional setting though.

     
  • Pierre Frisch
    Pierre Frisch
    2012-06-07

    I was trying to get some of the JmmDNS unit test working and if I add the loopback it goes berserk. This may be unrelated and due to the network I am on at the moment. Could you try the unit test are commented out in the committed file but it would be nice to get them going and get better stability.

    Pierre

     
  • Trejkaz
    Trejkaz
    2012-06-08

    Which test in particular? (I'm doing all this from the command-line, so it isn't so easy to quickly browse through things...)

    I checked the ones which are enabled and they at least pass with this change.

     
  • Trejkaz
    Trejkaz
    2012-06-08

    You're right about chattiness though, I get a lot of "fatal" log messages despite everything seeming to work correctly.

    SEVERE: bad domain name: possible circular name detected. Bad offset: 0x3fff at 0x7d
    WARNING: Could not find record class for index: 65535
    SEVERE: Could not find record type for index: 65535
    SEVERE: Could not find record type.

    I seem to get most of these on the IPv6 version of the loopback address. Maybe the IPv4 one is totally quiet... sort of hard to tell.

     
  • Trejkaz
    Trejkaz
    2012-06-08

    Interestingly if you only exclude addresses where it's an instance of Inet6Address, the warnings go away but things still work in our tests, because the IPv4 loopback stuff appears to work fine.

    IPv6 loopback might be the only problem?

     
  • Pierre Frisch
    Pierre Frisch
    2012-06-08

    Thanks, I have found one bug that now open another one. The hostname increment function was busted and was adding "-1" at each increment instead of incrementing this lead to a name length overflow. This is fixed.

    However I have another issue as now the IPv6 looback does not recognize its own packet and try to resolve a non existent conflict.

    Pierre

     
  • Pierre Frisch
    Pierre Frisch
    2012-06-10

    • status: open-accepted --> pending-fixed
     
  • Pierre Frisch
    Pierre Frisch
    2012-06-10

    Ok I have integrated it and fixed a few other bugs, This should be much better I still have an issue with unregistering services in JmmDNS.

    Pierre