diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-06-05 00:52:30 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-06-05 00:52:49 +0200 |
commit | 27ca8d7a250915b290cf89c195e383a8abab35d5 (patch) | |
tree | 7b3bc82a9aa2ead56f56bb0f08f895666d77bde4 /src/socket-util.c | |
parent | 46018844bca3abf16ac38bdf0af8e48ee95d03f2 (diff) |
socket: verify socket type properly when desrializing
Diffstat (limited to 'src/socket-util.c')
-rw-r--r-- | src/socket-util.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/socket-util.c b/src/socket-util.c index 0c9fc9f999..4a1b3d8b51 100644 --- a/src/socket-util.c +++ b/src/socket-util.c @@ -443,7 +443,7 @@ bool socket_address_equal(const SocketAddress *a, const SocketAddress *b) { return true; } -bool socket_address_is(const SocketAddress *a, const char *s) { +bool socket_address_is(const SocketAddress *a, const char *s, int type) { struct SocketAddress b; assert(a); @@ -452,6 +452,8 @@ bool socket_address_is(const SocketAddress *a, const char *s) { if (socket_address_parse(&b, s) < 0) return false; + b.type = type; + return socket_address_equal(a, &b); } |