Module Name:    src
Committed By:   christos
Date:           Fri Jan 22 22:31:11 UTC 2016

Modified Files:
        src/external/bsd/blacklist/libexec: blacklistd-helper

Log Message:
turned mapped v4 addresses to real v4 addresses so that they work.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/blacklist/libexec/blacklistd-helper

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/blacklist/libexec/blacklistd-helper
diff -u src/external/bsd/blacklist/libexec/blacklistd-helper:1.5 src/external/bsd/blacklist/libexec/blacklistd-helper:1.6
--- src/external/bsd/blacklist/libexec/blacklistd-helper:1.5	Tue Jun  2 10:02:39 2015
+++ src/external/bsd/blacklist/libexec/blacklistd-helper	Fri Jan 22 17:31:11 2016
@@ -17,7 +17,16 @@ add)
 	if [ -n "$6" ]; then
 		port="port $6"
 	fi
-	exec /sbin/npfctl rule $2 add block in final $proto from $4/$5 to any $port
+	addr=$4
+	mask=$5
+	case "$4" in
+	::ffff:*.*.*.*)
+		if [ "$5" = 128 ]; then
+			mask=32
+			addr=${4#::ffff:}
+		fi;;
+	esac
+	exec /sbin/npfctl rule $2 add block in final $proto from $addr/$mask to any $port
 	;;
 rem)
 	exec /sbin/npfctl rule $2 rem-id $7

Reply via email to