diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-03-20 14:05:31 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2009-03-20 14:05:31 +0100 |
commit | f7b4b7bd19b16d11491f18891942f6d48c2fcf7e (patch) | |
tree | 800729577e679355b073709e35baaf094e6623a3 /src/udp.c | |
parent | 28255df51433846bad67cccb69bb285660ef1667 (diff) | |
download | conntrack-tools-f7b4b7bd19b16d11491f18891942f6d48c2fcf7e.tar.gz conntrack-tools-f7b4b7bd19b16d11491f18891942f6d48c2fcf7e.zip |
udp: fix missing scope_id in the socket creation
This patch fixes an EINVAL error returned by bind() when opening
an UDP server socket to propagate state-changes over the dedicated
link. This patch also includes the change of the example
configuration files in case that you want to use UDP over IPv6.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/udp.c')
-rw-r--r-- | src/udp.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; } |