Skip to content

Commit

Permalink
assert public ip is ipv4
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalu committed Jan 24, 2024
1 parent c2b0a64 commit 036336b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions transaction-relayer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,13 @@ fn main() {
response.parse().unwrap()
};
info!("public ip: {:?}", public_ip);
assert!(
public_ip.is_ipv4(),
"Your public IP address needs to be IPV4 but is currently listed as {}. \
If you are seeing this error and not passing in --public-ip, \
please find your public ip address and pass it in on the command line",
public_ip
);

// Supporting IPV6 addresses is a DOS vector since they are cheap and there's a much larger amount of them.
// The DOS is specifically with regards to the challenges queue filling up and starving other legitimate
Expand Down

0 comments on commit 036336b

Please sign in to comment.