Skip to content

Commit

Permalink
Correct missing htons() on port number for TCPop connect
Browse files Browse the repository at this point in the history
  • Loading branch information
nbriggs committed Jun 4, 2022
1 parent 60af445 commit b5f51d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/inet.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ LispPTR subr_TCP_ops(int op, LispPTR nameConn, LispPTR proto, LispPTR length, Li
sock = LispNumToCInt(proto);
result = socket(AF_INET, SOCK_STREAM, 0);
farend.sin_family = AF_INET;
farend.sin_port = sock;
farend.sin_port = htons(sock);
if (connect(result, (struct sockaddr *)&farend, sizeof farend) < 0) {
perror("TCP connect");
return (NIL);
Expand Down

0 comments on commit b5f51d5

Please sign in to comment.