]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP: Fix reading RENEW messages from inet socket origin/dhcpcd-8
authorRoy Marples <roy@marples.name>
Sun, 20 Dec 2020 07:08:08 +0000 (07:08 +0000)
committerRoy Marples <roy@marples.name>
Sun, 20 Dec 2020 07:08:08 +0000 (07:08 +0000)
It helps to use the correct buffer to store the control message ....

src/dhcp.c

index 6333c27c4c0c47850f66c36255ba1b02c3ee3275..84006a94dc7e77afd2a05ca0e6bbb18dbd2e908e 100644 (file)
@@ -3521,7 +3521,7 @@ dhcp_readudp(struct dhcpcd_ctx *ctx, struct interface *ifp)
        struct msghdr msg = {
            .msg_name = &from, .msg_namelen = sizeof(from),
            .msg_iov = &iov, .msg_iovlen = 1,
-           .msg_control = buf, .msg_controllen = sizeof(cmsgbuf.buf),
+           .msg_control = cmsgbuf.buf, .msg_controllen = sizeof(cmsgbuf.buf),
        };
        int s;
        ssize_t bytes;