File: 05_fix_priv_range.patch

package info (click to toggle)
asused 3.72-14
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 876 kB
  • sloc: perl: 3,437; sh: 7; makefile: 5
file content (15 lines) | stat: -rw-r--r-- 558 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
From: Jan Krajdl <spm@spamik.cz>
Subject: Fix detection of 10/8.
Forwarded: not-needed

--- a/ipv4pack/ipv4pack.pm
+++ b/ipv4pack/ipv4pack.pm
@@ -271,7 +271,7 @@ sub normalizerange ($) {
 
        # check for a valid range: no CLASS-D and upper (223-255), no 127/8 
        # and no private networks allowed (10/8)
-       return ("", $O_PRIVATERANGE) if ($1 =~ /^10|127$/);
+       return ("", $O_PRIVATERANGE) if ($1 eq "10" || $1 eq "127");
        return ("", $O_RESERVEDCLASS) if ($1 > 223);
 
        if ($3 eq '/') {	 # range is in format quad/prefix