diff options
author | Tom Gundersen <teg@jklm.no> | 2015-06-24 21:22:46 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-07-14 12:03:04 +0200 |
commit | a0166609f782da91710dea9183d1bf138538db37 (patch) | |
tree | 766e80f1d02801a548faafb98f4c4148198e51f6 /src/resolve/resolved-dns-scope.c | |
parent | ff89f8b917a83a3fc0dc3ad0961c3bc953f78e8f (diff) |
resolved: packet - ensure there is space for IP+UDP headers
Currently we only make sure our links can handle the size of the payload witohut
taking the headers into account.
Diffstat (limited to 'src/resolve/resolved-dns-scope.c')
-rw-r--r-- | src/resolve/resolved-dns-scope.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resolve/resolved-dns-scope.c b/src/resolve/resolved-dns-scope.c index 25392d21d7..e01e97be35 100644 --- a/src/resolve/resolved-dns-scope.c +++ b/src/resolve/resolved-dns-scope.c @@ -160,7 +160,7 @@ int dns_scope_emit(DnsScope *s, DnsPacket *p) { if (p->size > DNS_PACKET_UNICAST_SIZE_MAX) return -EMSGSIZE; - if (p->size > mtu) + if (p->size + UDP_PACKET_HEADER_SIZE > mtu) return -EMSGSIZE; if (family == AF_INET) |