mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 00:13:40 +00:00
lib: Add some extra error messages for when things go wrong
In sockunion.c let's eliminate the silent and unexpected failure mode to let the end operator figure out something is terribly wrong. Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
1e592331cb
commit
c08f56304b
@ -525,6 +525,11 @@ union sockunion *sockunion_getsockname(int fd)
|
||||
sockunion_normalise_mapped(su);
|
||||
return su;
|
||||
}
|
||||
|
||||
flog_err(
|
||||
EC_LIB_SOCKET,
|
||||
"Unexpected AFI received(%d) for sockunion_getsockname call for fd: %d",
|
||||
name.sa.sa_family, fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -561,6 +566,11 @@ union sockunion *sockunion_getpeername(int fd)
|
||||
sockunion_normalise_mapped(su);
|
||||
return su;
|
||||
}
|
||||
|
||||
flog_err(
|
||||
EC_LIB_SOCKET,
|
||||
"Unexpected AFI received(%d) for sockunion_getpeername call for fd: %d",
|
||||
name.sa.sa_family, fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user