Merge pull request #429 from chris5560/master
authorChristian Schoenebeck <christian.schoenebeck@gmail.com>
Sat, 1 Aug 2015 14:17:11 +0000 (16:17 +0200)
committerChristian Schoenebeck <christian.schoenebeck@gmail.com>
Sat, 1 Aug 2015 14:17:11 +0000 (16:17 +0200)
ipkg.lua: new function compare_version()

contrib/package/community-profiles/files/etc/config/profile_hameln [new file with mode: 0644]
libs/luci-lib-nixio/src/address.c

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 (file)
index 0000000..f305b59
--- /dev/null
@@ -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'
index 4fd557d..8ab4fa8 100644 (file)
@@ -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__