uint8_t d_extRCode, d_version;
[[nodiscard]] vector<pair<uint16_t, string>>::const_iterator getFirstOption(uint16_t optionCode) const;
+ [[nodiscard]] uint16_t getCombinedERCode(uint8_t rcode) const
+ {
+ return (static_cast<uint16_t>(d_extRCode) << 4) | rcode;
+ }
};
//! Convenience function that fills out EDNS0 options, and returns true if there are any
}
found->setSupport(CookieEntry::Support::Supported, now.tv_sec);
// check extended error code
- uint16_t ercode = (edo.d_extRCode << 4) | lwr.d_rcode;
+ uint16_t ercode = edo.getCombinedERCode(lwr.d_rcode);
if (ercode == ERCode::BADCOOKIE) {
lwr.d_validpacket = true;
++t_Counters.at(rec::Counter::cookieRetry);