These are chat archives for CZ-NIC/knot-resolver

2nd
Feb 2018
Honza Mikulasek
@mikulasek_twitter
Feb 02 2018 16:50
Hello. Do you know how to get source IP of a DNS packet inside a knot resolver module? kn_context context->request->qsource.addr seems invalid.
Vladimír Čunát
@vcunat
Feb 02 2018 16:50
Yes, for some requests it's NULL.
That's for those that are originated inside knot-resolver.
For others it should be a pointer to valid sockaddr.
Honza Mikulasek
@mikulasek_twitter
Feb 02 2018 17:21
Ah, makes sense. I didn't check for NULL, Now it works, Vlada, thanks for quick help.
Vladimír Čunát
@vcunat
Feb 02 2018 17:22
@mikulasek_twitter you're welcome. I now added a comment to the struct field, so that its meaning is clearer.
We have worse descriptions that I would like, in some places.