mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 15:33:54 +01:00
ircd::net::dns: Log an error for an unknown service port.
This commit is contained in:
parent
83b7e0b9b1
commit
59dea0c8bb
1 changed files with 8 additions and 0 deletions
|
@ -598,6 +598,14 @@ try
|
|||
assert(!ent || ent->s_port != 0);
|
||||
assert(!ent || name == ent->s_name);
|
||||
assert(!ent || !prot || prot == ent->s_proto);
|
||||
if(unlikely(!ent || !ent->s_port))
|
||||
log::error
|
||||
{
|
||||
log, "Uknown service %s/%s; please add port number to /etc/services",
|
||||
name,
|
||||
prot?: "*"_sv
|
||||
};
|
||||
|
||||
return ent?
|
||||
htons(ent->s_port):
|
||||
0U;
|
||||
|
|
Loading…
Reference in a new issue