diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2022-06-17 13:47:03 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2022-06-17 13:47:03 -0400 |
| commit | c08f56304b12a9d765d8ec80b9f145c1274fecd7 (patch) | |
| tree | ce8379e03eb2b69b745ad2863c610cd06529ad77 /lib/sockunion.c | |
| parent | 1e592331cb87ba5ca5cca5f6635c35acd8d74bba (diff) | |
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>
Diffstat (limited to 'lib/sockunion.c')
| -rw-r--r-- | lib/sockunion.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/sockunion.c b/lib/sockunion.c index 97b198c018..eff38798cc 100644 --- a/lib/sockunion.c +++ b/lib/sockunion.c @@ -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; } |
