summaryrefslogtreecommitdiff
path: root/package/network/ipv6
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2015-09-07 16:21:15 +0000
committerSteven Barth <cyrus@openwrt.org>2015-09-07 16:21:15 +0000
commit7af30b4cef9a64e357047234b5ec7e2d3b85677d (patch)
treea7b54b87ee5a31e0ad3a569055884be65792f9a5 /package/network/ipv6
parent8ac42ac28bc6be99ccb671ac89a93c9f5eb8d723 (diff)
downloadmtk-20170518-7af30b4cef9a64e357047234b5ec7e2d3b85677d.zip
mtk-20170518-7af30b4cef9a64e357047234b5ec7e2d3b85677d.tar.gz
mtk-20170518-7af30b4cef9a64e357047234b5ec7e2d3b85677d.tar.bz2
map: ignore insignificant PSID bits
Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 46804
Diffstat (limited to 'package/network/ipv6')
-rw-r--r--package/network/ipv6/map/Makefile2
-rw-r--r--package/network/ipv6/map/src/mapcalc.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/package/network/ipv6/map/Makefile b/package/network/ipv6/map/Makefile
index a45e9bc..1d42315 100644
--- a/package/network/ipv6/map/Makefile
+++ b/package/network/ipv6/map/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=map
PKG_VERSION:=4
-PKG_RELEASE:=3
+PKG_RELEASE:=4
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
diff --git a/package/network/ipv6/map/src/mapcalc.c b/package/network/ipv6/map/src/mapcalc.c
index b9fab4d..7aa28e5 100644
--- a/package/network/ipv6/map/src/mapcalc.c
+++ b/package/network/ipv6/map/src/mapcalc.c
@@ -314,7 +314,9 @@ int main(int argc, char *argv[])
psid = be16_to_cpu(psid16);
}
- psid16 = cpu_to_be16(psid >> (16 - psidlen));
+ psid = psid >> (16 - psidlen);
+ psid16 = cpu_to_be16(psid);
+ psid = psid << (16 - psidlen);
if (prefix4len < 0 || prefix6len < 0 || ealen < 0 || ealen < psidlen) {
fprintf(stderr, "Skipping invalid or incomplete rule: %s\n", argv[i]);