summaryrefslogtreecommitdiffstats
path: root/src/config.y
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-12-13 18:02:39 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-12-13 18:02:39 +0100
commit766a0c145dad84b9af35b2bebc032be71509b3df (patch)
treea3fc10504338df57c208aa938b6db8b1d2c661b1 /src/config.y
parent505eb464948d32f9ae5d7f8d48d89dde98972930 (diff)
downloadfastd-766a0c145dad84b9af35b2bebc032be71509b3df.tar
fastd-766a0c145dad84b9af35b2bebc032be71509b3df.zip
Always convert v4-mapped IPv6 addresses to IPv4 addresses
Diffstat (limited to 'src/config.y')
-rw-r--r--src/config.y2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/config.y b/src/config.y
index d576b91..66912a2 100644
--- a/src/config.y
+++ b/src/config.y
@@ -347,6 +347,7 @@ peer_remote: TOK_ADDR4 port {
conf->peers->address.in.sin_family = AF_INET;
conf->peers->address.in.sin_addr = $1;
conf->peers->address.in.sin_port = htons($2);
+ fastd_peer_address_simplify(&conf->peers->address);
}
| TOK_ADDR6 port {
free(conf->peers->hostname);
@@ -355,6 +356,7 @@ peer_remote: TOK_ADDR4 port {
conf->peers->address.in6.sin6_family = AF_INET6;
conf->peers->address.in6.sin6_addr = $1;
conf->peers->address.in6.sin6_port = htons($2);
+ fastd_peer_address_simplify(&conf->peers->address);
}
| maybe_af TOK_STRING port maybe_float {
free(conf->peers->hostname);