map: ignore insignificant PSID bits

Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46804
master
Steven Barth 9 years ago
parent 8ac42ac28b
commit 7af30b4cef
  1. 2
      package/network/ipv6/map/Makefile
  2. 4
      package/network/ipv6/map/src/mapcalc.c

@ -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

@ -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]);

Loading…
Cancel
Save