Skip to content

Error in connect_to_net #576

@edwardalee

Description

@edwardalee

The function connect_to_net in lf_socket_support.c has a serious error that I think is new. It has this line:

  memcpy(priv->server_hostname, sock_params->server_hostname, INET_ADDRSTRLEN);

The constant INET_ADDRSTRLEN is 16. I tried to create a federation where I specify:

federated reactor at lf-mac.eecs.berkeley.edu { ...}

I get this error message:

Fed 1 (b_main): ERROR: No host matching given hostname: lf-mac.eecs.berk

Notice the host name truncated to 16 characters.
I think 16 characters will only work for IPv4 IP addresses.
But we need to support IPv6 and symbolic hostnames.
I think we should fix this before releasing the next LF version.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions