[net-dns-users] Tracking intermediate packet status of queries
Robert Kuropkat
robert at kuropkat.com
Fri Jun 5 02:32:55 UTC 2015
All,
I'm new to Net::DNS and DNS as well so may well be missing something
obvious. I have some tests I want to do to validate results of RPZ
configurations. The problem is, the send() method seems to only return
the status of the final packet of a query. Unfortunately, the final
status for several tests appear the same, so there is no way to validate
the query in fact behaved as expected. When I set the debug flag, I see
the traffic I expect, but none of that data (except the last) is
retained for programmatic analysis.
Example: Setting RPZ policy action to TCP-ONLY. (sorry, doing this from
memory...)
* $resolver->send() (via UDP)
* Initial query is truncated (tc=1), status, unknown error
* query resent, forcing TCP connection
* query returns answer correctly. status NOERROR
I'd like to capture intermediate flag settings and resolver status to
validate each step executed as expected.
A quick walk through the Net::DNS code shows it **may** be as simple as
changing the $ans (return value) scaler to an array and saving each
intermediate packet. It's possible a flag could be set to default to
current behaviour and return only the last packet to maintain backwards
compatibility. It seems internally, there are only two or three methods
that would need to be modified as a result. However, I'm not familiar
enough with the framework to be sure that is all, or even be sure what I
want is not really there already.
Help or suggestions much appreciated. Requests for details will have to
wait until I am back in the office tomorrow...
Robert Kuropkat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nlnetlabs.nl/pipermail/net-dns-users/attachments/20150604/c6b7b885/attachment.htm>
More information about the net-dns-users
mailing list