geoip: trigger CNAME chain resolution
As briefly discussed on the mailing list, when returning a CNAME in the geoip module, this CNAME does not get resolved any further, even if it is within knot's authority, forcing clients to issue another request.
The resolution is to update the qdata
when the module returns a CNAME and return KNOT_IN_STATE_FOLLOW
instead of KNOT_IN_STATE_HIT
, so that knot keeps processing like it would for a regular (non-module) CNAME result. This is also summarized in the second commit's commit message.
Please note that while implementing this I found that the geoip module allows for some rather surprising configurations, with basically no validity checks on input and only some on output. The first commit hence adds some restrictions as to what the plugin accepts as valid configuration, see the commit message for more details. I am not sure if I am missing a valid use case there, but my guess would be that most people will have avoided such configurations anyways.