After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 336941 - DNS lookup of text information is truncated
DNS lookup of text information is truncated
Status: RESOLVED FIXED
Product: gnome-nettool
Classification: Applications
Component: Tools
1.4.x
Other All
: Normal minor
: ---
Assigned To: Germán Poo-Caamaño
Rodrigo Moya
Depends on:
Blocks:
 
 
Reported: 2006-04-02 17:14 UTC by Sam Morris
Modified: 2006-04-04 13:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
Fix bogus defines (571 bytes, patch)
2006-04-04 06:38 UTC, Alejandro Andrés
none Details | Review
Fix bad formed defines (982 bytes, patch)
2006-04-04 10:19 UTC, Alejandro Andrés
none Details | Review
Fixes bad format defines (982 bytes, patch)
2006-04-04 10:23 UTC, Alejandro Andrés
committed Details | Review

Description Sam Morris 2006-04-02 17:14:09 UTC
Please describe the problem:
The result of performing a "Text Information" (TXT) DNS lookup is truncated.

Steps to reproduce:
Do a TXT lookup for the domain "blueyonder.co.uk"

Actual results:
The result shows up as: "v=spf1

Expected results:
The actual result is: "v=spf1 a:mailq1.blueyonder.co.uk ip4:195.188.0.0/16
ip4:213.48.0.0/16 ip4:80.192.0.0/14 ip4:82.32.0.0/12 ip4:62.30.0.0/15 ?all"

Does this happen every time?
Yes

Other information:
Comment 1 Germán Poo-Caamaño 2006-04-03 04:05:43 UTC
Certainly it is a bug in src/lookup.c (strip_line) which read only the first string and forget the rest of the line.

I have added the keyword gnome-love.
Comment 2 Alejandro Andrés 2006-04-03 21:05:46 UTC
Solved by modifying LOOKUP_FORMAT and LOOKUP_FORMAT_MX in lookup.h. You were rigth, the problem was in sscanf :)

--- lookup.h.old	2006-04-03 22:38:11.000000000 +0200
+++ lookup.h	2006-04-03 22:37:32.000000000 +0200
@@ -26,6 +26,6 @@
 
 #define LOOKUP_OPTIONS "+nocomments +search +nocmd +nostats +noadditional"
-#define LOOKUP_FORMAT "%s %d %s %s %s"
-#define LOOKUP_FORMAT_MX "%s %d %s MX %s %s]"
+#define LOOKUP_FORMAT "%s %d %s %s %[^\n]"
+#define LOOKUP_FORMAT_MX "%s %d %s MX %s %[^\n]"
 #define LOOKUP_NUM_ARGS 5
 
Comment 3 Germán Poo-Caamaño 2006-04-03 21:16:48 UTC
Excelent Alejandro.  It is only missing a ChangeLog entry.  May you add a ChangeLog entry and upload the new patch?

For more information take a look at http://live.gnome.org/GnomeLove/SubmittingPatches
Comment 4 Alejandro Andrés 2006-04-04 06:38:34 UTC
Created attachment 62713 [details] [review]
Fix bogus defines

Ok, thanks for the help, this was my first "hack" :p

-- ChangeLog
2006-4-4  Alejandro Andrés <fuzzy.alej@gmail.com>

       * src/lookup.h
       Fixed bogus LOOKUP_FORMAT and LOOKUP_FORMAT_MX defines.
Comment 5 Alejandro Andrés 2006-04-04 10:19:11 UTC
Created attachment 62724 [details] [review]
Fix bad formed defines

Finally I get to know how to make patches :p
Thanks for the help
Comment 6 Alejandro Andrés 2006-04-04 10:23:58 UTC
Created attachment 62725 [details] [review]
Fixes bad format defines

The hell with the patches!
No more submitting, I swear :/
Comment 7 Germán Poo-Caamaño 2006-04-04 13:40:29 UTC
Much better, but the format of the date is YYYY-MM-DD, so, it should be 2006-04-04 instead of 2006-4-4.

On the other hand, it is useful (not always, but almost everytime) cooking patches using the CVS version (for the stable and/or development branch); because some patches could be applied before than yours.

Think about it next time :-)

Your first patch has been submitted in CVS stable and CVS HEAD.

Thanks you.