X-Git-Url: https://git.distorted.org.uk/~mdw/yaid/blobdiff_plain/dd5e35da5f74e9ed3bbfb639c2bab927a12c634f..d817f2c3f8bbfcacd2a9cb255b66bf7d9d5dedfa:/linux.c diff --git a/linux.c b/linux.c index 8ed0396..ec4fe4e 100644 --- a/linux.c +++ b/linux.c @@ -434,6 +434,13 @@ void identify(struct query *q) !sockeq(q->ao, &s[i^1], &q->s[R])) continue; + /* As a trap for the unwary, this file contains unhelpful entries which + * just mirror the source/destination addresses. If this is one of + * those, we'll be stuck in a cycle talking to ourselves. + */ + if (sockeq(q->ao, &s[i], &s[i^3])) + continue; + /* We win. The remaining address must be the client host. We should * proxy this query. */