mirror of
https://github.com/troglobit/finit.git
synced 2026-10-14 10:19:36 +00:00
inetd: remove ntoh on proto
getprotobyname() returns p_proto in host endian, so it should not be converted with ntoh. (Note: getservbyname() on the other hand does return s_port in network endian) Signed-off-by: Petrus Hellgren <petrus.hellgren@westermo.se>
This commit is contained in:
1 parent
06d3161ffe
commit
fafeaf661a
1 file changed
+1
-1
+1
-1
@@ -573,7 +573,7 @@ int inetd_match(inetd_t *inetd, char *service, char *proto)
|
||||
if (getent(service, proto, &sv, &pv))
|
||||
return 0;
|
||||
|
||||
if (inetd->proto == ntohs(pv->p_proto) &&
|
||||
if (inetd->proto == pv->p_proto &&
|
||||
inetd->port == ntohs(sv->s_port))
|
||||
return 1;
|
||||
|
||||
|
||||
Reference in new issue
Block a user