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