diff options
-rw-r--r-- | contrib/package/community-profiles/files/etc/config/profile_hameln | 15 | ||||
-rw-r--r-- | libs/luci-lib-nixio/src/address.c | 4 |
2 files changed, 18 insertions, 1 deletions
diff --git a/contrib/package/community-profiles/files/etc/config/profile_hameln b/contrib/package/community-profiles/files/etc/config/profile_hameln new file mode 100644 index 000000000..f305b597a --- /dev/null +++ b/contrib/package/community-profiles/files/etc/config/profile_hameln @@ -0,0 +1,15 @@ +config 'community' 'profile' + option 'name' 'Hameln' + option 'homepage' 'http://freifunk-hameln.de' + option 'ssid' 'hameln.freifunk.net' + option 'suffix' 'ffhm' + option 'latitude' '52.1030706' + option 'longitude' '9.3514778' + option 'mesh_network' '10.31.0.0/16' + option 'splash_network' '10.104.0.0/16' + option 'splash_prefix' '27' + option 'vap' '1' + option adhoc_dhcp_when_vap '1' + +config 'defaults' 'interface' + option 'netmask' '255.255.0.0' diff --git a/libs/luci-lib-nixio/src/address.c b/libs/luci-lib-nixio/src/address.c index 4fd557d6a..8ab4fa89c 100644 --- a/libs/luci-lib-nixio/src/address.c +++ b/libs/luci-lib-nixio/src/address.c @@ -331,7 +331,9 @@ static int nixio_getnameinfo(lua_State *L) { nixio__addr_write(&addr, (struct sockaddr *)&saddr); - int res = getnameinfo((struct sockaddr *)&saddr, sizeof(saddr), + int res = getnameinfo((struct sockaddr *)&saddr, + (saddr.ss_family == AF_INET) + ? sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6), host, sizeof(host), NULL, 0, NI_NAMEREQD); #ifdef __linux__ |