map: fix psidlen becoming negative (FS#1430)
authorHans Dedecker <dedeckeh@gmail.com>
Thu, 29 Mar 2018 14:25:14 +0000 (16:25 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Thu, 29 Mar 2018 20:19:18 +0000 (22:19 +0200)
commit479aaf6375e1823c484e2251f11eee5b911c48e7
treecd83d063f13f10c701264ef6520e1baacec7f8f4
parentd9da0387f47fce77e16d7c60222e61f3aa72a94e
map: fix psidlen becoming negative (FS#1430)

Fix psidlen becomes negative in case embedded address bit lenght is smaller than
IPv4 suffix length.
While at it improve parameter checking making the code more logical and
easier to read.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
package/network/ipv6/map/Makefile
package/network/ipv6/map/src/mapcalc.c