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

inet_addr_of_string "255.255.255.255" #2796

Closed
vicuna opened this issue Jun 18, 2001 · 3 comments
Closed

inet_addr_of_string "255.255.255.255" #2796

vicuna opened this issue Jun 18, 2001 · 3 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Jun 18, 2001

Original bug ID: 394
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Raoul Bhoedjang
Version: 3.01
OS: Linux 2.4.2-2
Submission from: syr-66-24-49-102.twcny.rr.com (66.24.49.102)

Problem: Unix.inet_addr_of_string "255.255.255.255" raises an exception.
Cause: the implementation uses inet_addr instead of inet_aton;
inet_addr is obsolete and cannot handle the broadcast address
255.255.255.255.

@vicuna
Copy link
Author

vicuna commented Jun 19, 2001

Comment author: administrator

Problem: Unix.inet_addr_of_string "255.255.255.255" raises an
exception.
Cause: the implementation uses inet_addr instead of inet_aton;
inet_addr is obsolete and cannot handle the broadcast address
255.255.255.255.

I didn't know about the inet_aton alternative.  Too bad it's not part
of the Unix98 spec.  At any rate, I've added code to use inet_aton()
instead of inet_addr() whenever the former is available.

If inet_aton is not available, then I would add an explicit test for
255.255.255.255. (It is the only case for which inet_addr won't work.)
This address is used quite a bit and I don't know of another way to
construct it in Ocaml, because inet_addr is opaque.

Thanks for your prompt response,

Raoul

@vicuna
Copy link
Author

vicuna commented Jun 19, 2001

Comment author: administrator

Problem: Unix.inet_addr_of_string "255.255.255.255" raises an exception.
Cause: the implementation uses inet_addr instead of inet_aton;
inet_addr is obsolete and cannot handle the broadcast address
255.255.255.255.

I didn't know about the inet_aton alternative. Too bad it's not part
of the Unix98 spec. At any rate, I've added code to use inet_aton()
instead of inet_addr() whenever the former is available.

Thanks for the suggestion,

  • Xavier Leroy

@vicuna
Copy link
Author

vicuna commented Jun 19, 2001

Comment author: administrator

Fixed 2001-06-19 by Xavier (use inet_aton() when available).

@vicuna vicuna closed this as completed Jun 19, 2001
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant