Limit UDP payload size for EDNS0 to 0xffff, not use lower 16bit value.
Obtained from: KAME
This commit is contained in:
parent
d594cee0e0
commit
08c89c65eb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103320
@ -229,6 +229,8 @@ res_opt(n0, buf, buflen, anslen)
|
||||
|
||||
__putshort(T_OPT, cp); /* TYPE */
|
||||
cp += INT16SZ;
|
||||
if (anslen > 0xffff)
|
||||
anslen = 0xffff; /* limit to 16bit value */
|
||||
__putshort(anslen & 0xffff, cp); /* CLASS = UDP payload size */
|
||||
cp += INT16SZ;
|
||||
*cp++ = NOERROR; /* extended RCODE */
|
||||
|
Loading…
Reference in New Issue
Block a user