/* Ignore messages we sent. */
#ifdef PRIVSEP
- if (ctx->ps_root_pid != 0 &&
- nlm->nlmsg_pid == (uint32_t)ctx->ps_root_pid)
+ if (ctx->ps_root != NULL &&
+ nlm->nlmsg_pid == (uint32_t)ctx->ps_root->psp_pid)
return 0;
#endif
priv = (struct priv *)ctx->priv;
* We need to process address flag changes though. */
if (nlm->nlmsg_type == RTM_DELADDR) {
#ifdef PRIVSEP
- if (ctx->ps_root_pid != 0 &&
- nlm->nlmsg_pid == (uint32_t)ctx->ps_root_pid)
+ if (ctx->ps_root != NULL &&
+ nlm->nlmsg_pid == (uint32_t)ctx->ps_root->psp_pid)
return 0;
#endif
priv = (struct priv*)ctx->priv;
ps_root_sendnetlink(struct dhcpcd_ctx *ctx, int protocol, struct msghdr *msg)
{
- if (ps_sendmsg(ctx, ctx->ps_root_fd, PS_ROUTE,
+ if (ps_sendmsg(ctx, ctx->ps_root->psp_fd, PS_ROUTE,
(unsigned long)protocol, msg) == -1)
return -1;
return ps_root_readerror(ctx, NULL, 0);
.psr_ctx = ctx,
};
- if (eloop_event_add(ctx->ps_eloop, ctx->ps_root_fd, ELE_READ,
+ if (eloop_event_add(ctx->ps_eloop, ctx->ps_root->psp_fd, ELE_READ,
ps_root_mreaderrorcb, &psr_ctx) == -1)
return -1;