summaryrefslogtreecommitdiff
path: root/src/udp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udp.c')
-rw-r--r--src/udp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/udp.c b/src/udp.c
index bad8db8..d9943a0 100644
--- a/src/udp.c
+++ b/src/udp.c
@@ -33,14 +33,15 @@ struct udp_sock *udp_server_create(struct udp_conf *conf)
case AF_INET:
m->addr.ipv4.sin_family = AF_INET;
m->addr.ipv4.sin_port = htons(conf->port);
- m->addr.ipv4.sin_addr.s_addr = conf->server.inet_addr.s_addr;
+ m->addr.ipv4.sin_addr = conf->server.ipv4.inet_addr;
m->sockaddr_len = sizeof(struct sockaddr_in);
break;
case AF_INET6:
m->addr.ipv6.sin6_family = AF_INET6;
m->addr.ipv6.sin6_port = htons(conf->port);
- m->addr.ipv6.sin6_addr = conf->server.inet_addr6;
+ m->addr.ipv6.sin6_addr = conf->server.ipv6.inet_addr6;
+ m->addr.ipv6.sin6_scope_id = conf->server.ipv6.scope_id;
m->sockaddr_len = sizeof(struct sockaddr_in6);
break;
}