Skip to content

Commit

Permalink
refactor: Update add_tsig_to_message function to accept fudge as an o…
Browse files Browse the repository at this point in the history
…ptional parameter
  • Loading branch information
Litr0 committed Aug 7, 2024
1 parent e397f46 commit 8b3e3d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/async_resolver/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,9 @@ 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: u16, mac_request: Vec<u8>) {
pub fn add_tsig_to_message(&self, message: &mut DnsMessage, fudge: Option<u16>, mac_request: Vec<u8>) {
if self.tsig {
message.add_tsig(self.key.clone(), self.algorithm.clone(), fudge, 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);
}
}
}
Expand Down

0 comments on commit 8b3e3d9

Please sign in to comment.