]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Open right socket.
authorRoy Marples <roy@marples.name>
Thu, 13 Feb 2014 13:14:58 +0000 (13:14 +0000)
committerRoy Marples <roy@marples.name>
Thu, 13 Feb 2014 13:14:58 +0000 (13:14 +0000)
dhcp.c

diff --git a/dhcp.c b/dhcp.c
index 6a10b78119c134590e575e2086206407a2cda48e..56547fe3c13da927c099d54af9b13983ce4bb50a 100644 (file)
--- a/dhcp.c
+++ b/dhcp.c
@@ -1364,7 +1364,7 @@ dhcp_openudp(struct dhcpcd_ctx *ctx, struct interface *ifp)
        if ((s = socket(PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, IPPROTO_UDP)) == -1)
                return -1;
 #else
-       if ((s = socket(PF_INET6, SOCK_DGRAM, IPPROTO_UDP)) == -1)
+       if ((s = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1)
                return -1;
        if ((n = fcntl(s, F_GETFD, 0)) == -1 ||
            fcntl(s, F_SETFD, n | FD_CLOEXEC) == -1)