diff options
| author | Roy Marples <roy@marples.name> | 2016-09-06 14:58:33 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2016-09-06 14:58:33 +0000 |
| commit | 5c74cceb9bdcfd79534d925c6d6e422f36124765 (patch) | |
| tree | bb6ffef0e501d922bf3942286f4bbd6642fcca8a /if-bsd.c | |
| parent | 7ea9fe0f6ac92bac80980e85eae633863001ae13 (diff) | |
| download | dhcpcd-5c74cceb9bdcfd79534d925c6d6e422f36124765.tar.xz | |
Don't dispatch 0 bytes.
Diffstat (limited to 'if-bsd.c')
| -rw-r--r-- | if-bsd.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1530,15 +1530,16 @@ int if_handlelink(struct dhcpcd_ctx *ctx) { struct msghdr msg; - ssize_t bytes; + ssize_t len; memset(&msg, 0, sizeof(msg)); msg.msg_iov = ctx->iov; msg.msg_iovlen = 1; - if ((bytes = recvmsg_realloc(ctx->link_fd, &msg, 0)) == -1) + if ((len = recvmsg_realloc(ctx->link_fd, &msg, 0)) == -1) return -1; - if_dispatch(ctx, ctx->iov[0].iov_base); + if (len != 0) + if_dispatch(ctx, ctx->iov[0].iov_base); return 0; } |
