git: libc/resolve: Fix broken EDNS option

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Tue Oct 20 18:13:44 PDT 2015


commit 3484c4aa8f394b9ac6147d925d119ffb4cd9edb6
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Tue Oct 20 20:40:52 2015 +0800

    libc/resolve: Fix broken EDNS option
    
    EDNS option broken with unbound.  struct querybuf in net/gethnamaddr.c
    defines MAXPACKET to 64K.  This in turn gets passed down until it
    reached res_nopt(..., answer, anslen), where the size of the buffer
    must fit in 16 bits.  Unfortunately we end up being one more than the
    max so we end up sending a 0 as the size and unbound does not like
    that. Instead we clip now to 64K - 1, and everyone is happy.
    
    Obtained-from: NetBSD
    DragonFly-bug: http://bugs.dragonflybsd.org/issues/2846

Summary of changes:
 lib/libc/resolv/res_mkquery.c | 2 ++
 1 file changed, 2 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/3484c4aa8f394b9ac6147d925d119ffb4cd9edb6


-- 
DragonFly BSD source repository


More information about the Commits mailing list