• Miek Gieben's avatar
    request: re-adjust size for edns0 RR (#2007) · 62df2533
    Miek Gieben authored
    * Add regression test for broken DNS truncation
    
    With the latest changes to the implementation, request.Scrub() returns
    invalid response messages which are larger than the advertised buffer
    size. This commit adds a failing test for that.
    
    * Add benchmark for response truncation
    
    * request: re-adjust size for edns0 RR
    
    Cherry-picked the test and benchmark commits from #1962 and make the
    failing test not fail, by adding minimal fix in request.go.
    
    This makes size 12 bytes smaller if we need to add back the OPT RR in
    the message.
    
    Closes: #1962
    Signed-off-by: default avatarMiek Gieben <miek@miek.nl>
    
    * Scrub: correctly check for EDNS0, not only Do
    
    Make Scrub check for EDNS0, not only if the Do bit is set.
    Signed-off-by: default avatarMiek Gieben <miek@miek.nl>
    62df2533
request_test.go 6.95 KB