map: set ealen to psidlen for lw4over6
authorSteven Barth <cyrus@openwrt.org>
Sat, 16 May 2015 10:12:15 +0000 (10:12 +0000)
committerSteven Barth <cyrus@openwrt.org>
Sat, 16 May 2015 10:12:15 +0000 (10:12 +0000)
Signed-off-by: Steven Barth <steven@midlink.org>
SVN-Revision: 45689

package/network/ipv6/map/Makefile
package/network/ipv6/map/src/mapcalc.c

index 2a029f8fe8cbd021665054dc9347c665787411db..09ba523ec08ef75420662ce69cc8f5f4f3deb61d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=map
 PKG_VERSION:=3
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 PKG_LICENSE:=GPL-2.0
 
 include $(INCLUDE_DIR)/package.mk
index b4b3d736f006730c2fe56315c0d637e4cc42accf..b61e157fc39d073cfc5950d92dfe22900b806c5b 100644 (file)
@@ -226,6 +226,9 @@ int main(int argc, char *argv[])
                if (offset < 0)
                        offset = (lw4o6) ? 0 : (legacy) ? 4 : 6;
 
+               if (lw4o6 && ealen < 0 && psidlen >= 0)
+                       ealen = psidlen;
+
                // Find PD
                struct blob_attr *c, *cur;
                unsigned rem;