diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-11-05 15:40:53 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2021-02-14 23:12:22 +0100 |
commit | a9fd8837d42581ed9a72c92855c121f99e423e6f (patch) | |
tree | 2d7b200935d13cfd9c351018ae1ddfea3b726e0e /src/resolve/resolved-dns-packet.c | |
parent | resolved: rename manager_our_packet() → manager_packet_from_local_address() (diff) | |
download | systemd-a9fd8837d42581ed9a72c92855c121f99e423e6f.tar.xz systemd-a9fd8837d42581ed9a72c92855c121f99e423e6f.zip |
resolved: refuse packets looped back to us
Fixes: #17413
Diffstat (limited to 'src/resolve/resolved-dns-packet.c')
-rw-r--r-- | src/resolve/resolved-dns-packet.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/resolve/resolved-dns-packet.c b/src/resolve/resolved-dns-packet.c index 59be55a0eb..1bdea641e0 100644 --- a/src/resolve/resolved-dns-packet.c +++ b/src/resolve/resolved-dns-packet.c @@ -2535,6 +2535,10 @@ static int dns_packet_compare_func(const DnsPacket *x, const DnsPacket *y) { DEFINE_HASH_OPS(dns_packet_hash_ops, DnsPacket, dns_packet_hash_func, dns_packet_compare_func); +bool dns_packet_equal(const DnsPacket *a, const DnsPacket *b) { + return dns_packet_compare_func(a, b) == 0; +} + static const char* const dns_rcode_table[_DNS_RCODE_MAX_DEFINED] = { [DNS_RCODE_SUCCESS] = "SUCCESS", [DNS_RCODE_FORMERR] = "FORMERR", |