Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Octal and hexadecimal ipv4 address parsing #144

Closed
arnabanimesh opened this issue Aug 8, 2021 · 1 comment
Closed

Octal and hexadecimal ipv4 address parsing #144

arnabanimesh opened this issue Aug 8, 2021 · 1 comment

Comments

@arnabanimesh
Copy link

arnabanimesh commented Aug 8, 2021

Windows ping command use inet_addr standard which recognizes octal and hexadecimal ipv4 addresses
e.g. 0xC00002EB => 192.0.2.235; 011.012.013.014 => 9.10.11.12

It would be great if this app could maintain parity with the functionality of traditional ping apps.

This gist provides a good reference

@orf
Copy link
Owner

orf commented Jan 15, 2022

I'm going to close this because Rust doesn't support it, and according to this PR (rust-lang/rust#83652) it says:

This confusion can lead to many security vulnerabilities. Therefore, in
IETF RFC 6943, it suggests to disallow octal/hexadecimal format in Ipv4
string all together.

Which is also noted here: https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html#textual-representation

@orf orf closed this as completed Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants