]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep: No need for ipv4state
authorRoy Marples <roy@marples.name>
Tue, 19 May 2020 16:13:06 +0000 (16:13 +0000)
committerRoy Marples <roy@marples.name>
Tue, 19 May 2020 16:13:06 +0000 (16:13 +0000)
src/privsep-bpf.c

index 5b52ddb92e7b6634199a88793981cd6e80b6c14e..43fee54b43c9803e551ad201bc7c779370eb2527 100644 (file)
@@ -171,7 +171,6 @@ ps_bpf_cmd(struct dhcpcd_ctx *ctx, struct ps_msghdr *psm, struct msghdr *msg)
        pid_t start;
        struct iovec *iov = msg->msg_iov;
        struct interface *ifp;
-       struct ipv4_state *istate;
 
        cmd = (uint16_t)(psm->ps_cmd & ~(PS_START | PS_STOP));
        psp = ps_findprocess(ctx, &psm->ps_id);
@@ -212,11 +211,6 @@ ps_bpf_cmd(struct dhcpcd_ctx *ctx, struct ps_msghdr *psm, struct msghdr *msg)
        ifp->options = NULL;
        memset(ifp->if_data, 0, sizeof(ifp->if_data));
 
-       if ((istate = ipv4_getstate(ifp)) == NULL) {
-               ps_freeprocess(psp);
-               return -1;
-       }
-
        memcpy(psp->psp_ifname, ifp->name, sizeof(psp->psp_ifname));
 
        switch (cmd) {