]> git.pld-linux.org Git - packages/iptables.git/blob - iptables-ipv6-icmp.patch
- allow build with -O0
[packages/iptables.git] / iptables-ipv6-icmp.patch
1 diff -ur iptables-1.2/extensions/libip6t_icmp.c iptables-1.2.icmp6/extensions/libip6t_icmp.c
2 --- iptables-1.2/extensions/libip6t_icmp.c      Sat Jul  1 10:19:16 2000
3 +++ iptables-1.2.icmp6/extensions/libip6t_icmp.c        Sun Feb 18 14:55:37 2001
4 @@ -231,7 +231,7 @@
5  {
6         const struct ip6t_icmp *icmp = (struct ip6t_icmp *)match->data;
7  
8 -       printf("icmp ");
9 +       printf("ipv6-icmp ");
10         print_icmptype(icmp->type, icmp->code[0], icmp->code[1],
11                        icmp->invflags & IP6T_ICMP_INV,
12                        numeric);
13 @@ -262,7 +262,7 @@
14  
15  struct ip6tables_match icmp
16  = { NULL,
17 -    "icmp",
18 +    "icmp6",
19      NETFILTER_VERSION,
20      IP6T_ALIGN(sizeof(struct ip6t_icmp)),
21      IP6T_ALIGN(sizeof(struct ip6t_icmp)),
22 diff -ur iptables-1.2.2/ip6tables.c iptables-1.2.2.icmp6/ip6tables.c
23 --- iptables-1.2.2/ip6tables.c  Mon May 21 03:17:20 2001
24 +++ iptables-1.2.2.icmp6/ip6tables.c    Mon May 21 03:15:14 2001
25 @@ -643,16 +643,24 @@
26  find_match(const char *name, enum ip6t_tryload tryload)
27  {
28         struct ip6tables_match *ptr;
29 +       char *mname;
30  
31 +       if (strstr(name, "icmp"))
32 +               mname = "icmp6";
33 +       else
34 +               mname = name;
35         for (ptr = ip6tables_matches; ptr; ptr = ptr->next) {
36 -               if (strcmp(name, ptr->name) == 0)
37 +               if (strcmp(mname, ptr->name) == 0)
38                         break;
39         }
40  
41         if (!ptr && tryload != DONT_LOAD) {
42                 char path[sizeof(IP6T_LIB_DIR) + sizeof("/libip6t_.so")
43                          + strlen(name)];
44 -               sprintf(path, IP6T_LIB_DIR "/libip6t_%s.so", name);
45 +               if (strstr(name, "icmp"))
46 +                       sprintf(path, IP6T_LIB_DIR "/libip6t_icmp.so");
47 +               else
48 +                       sprintf(path, IP6T_LIB_DIR "/libip6t_%s.so", name);
49                 if (dlopen(path, RTLD_NOW)) {
50                         /* Found library.  If it didn't register itself,
51                            maybe they specified target as match. */
This page took 0.044555 seconds and 3 git commands to generate.