1b49d7bbc1dd426bcd85b5da772d31ade67286a9
[packages.git] / net / quagga / patches / 007-drop-heuristic-ipv6-recognition.patch
1 --- a/lib/command.c
2 +++ b/lib/command.c
3 @@ -868,86 +868,7 @@ cmd_ipv6_match (const char *str)
4    if (ret == 1)
5      return exact_match;
6  
7 -  while (*str != '\0')
8 -    {
9 -      switch (state)
10 -       {
11 -       case STATE_START:
12 -         if (*str == ':')
13 -           {
14 -             if (*(str + 1) != ':' && *(str + 1) != '\0')
15 -               return no_match;
16 -             colons--;
17 -             state = STATE_COLON;
18 -           }
19 -         else
20 -           {
21 -             sp = str;
22 -             state = STATE_ADDR;
23 -           }
24 -
25 -         continue;
26 -       case STATE_COLON:
27 -         colons++;
28 -         if (*(str + 1) == ':')
29 -           state = STATE_DOUBLE;
30 -         else
31 -           {
32 -             sp = str + 1;
33 -             state = STATE_ADDR;
34 -           }
35 -         break;
36 -       case STATE_DOUBLE:
37 -         if (double_colon)
38 -           return no_match;
39 -
40 -         if (*(str + 1) == ':')
41 -           return no_match;
42 -         else
43 -           {
44 -             if (*(str + 1) != '\0')
45 -               colons++;
46 -             sp = str + 1;
47 -             state = STATE_ADDR;
48 -           }
49 -
50 -         double_colon++;
51 -         nums++;
52 -         break;
53 -       case STATE_ADDR:
54 -         if (*(str + 1) == ':' || *(str + 1) == '\0')
55 -           {
56 -             if (str - sp > 3)
57 -               return no_match;
58 -
59 -             nums++;
60 -             state = STATE_COLON;
61 -           }
62 -         if (*(str + 1) == '.')
63 -           state = STATE_DOT;
64 -         break;
65 -       case STATE_DOT:
66 -         state = STATE_ADDR;
67 -         break;
68 -       default:
69 -         break;
70 -       }
71 -
72 -      if (nums > 8)
73 -       return no_match;
74 -
75 -      if (colons > 7)
76 -       return no_match;
77 -
78 -      str++;
79 -    }
80 -
81 -#if 0
82 -  if (nums < 11)
83 -    return partly_match;
84 -#endif /* 0 */
85 -
86 -  return exact_match;
87 +  return no_match;
88  }
89  
90  static enum match_type