From f8bde45ca00161227c52cfcacce7e0d45ce35aee Mon Sep 17 00:00:00 2001 From: Litr0 Date: Wed, 7 Aug 2024 13:20:55 -0400 Subject: [PATCH] refactor: Update add_tsig_to_message function to accept fudge as an optional parameter --- src/async_resolver/config.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/async_resolver/config.rs b/src/async_resolver/config.rs index 8d84d37d..5323b995 100644 --- a/src/async_resolver/config.rs +++ b/src/async_resolver/config.rs @@ -287,9 +287,10 @@ impl ResolverConfig { /// let message = Message::new(); /// resolver_config.add_tsig_to_message(&message, 300, vec![]); /// ``` - pub fn add_tsig_to_message(&self, message: &mut DnsMessage, fudge: Option, mac_request: Vec) { + pub fn add_tsig_to_message(&self, message: &mut DnsMessage, fudge: Option, mac_request: Option>) { if self.tsig { - message.add_tsig(self.key.clone(), self.algorithm.clone(), fudge.unwrap_or(300), self.key_name.clone(), mac_request); + message.add_tsig(self.key.clone(), self.algorithm.clone(), + fudge.unwrap_or(300), self.key_name.clone(), mac_request.unwrap_or(Vec::new())); } } }