VServer 1.9.2 (patch-2.6.8.1-vs1.9.2.diff)
[linux-2.6.git] / net / ipv4 / netfilter / ip_tables.c
index 2d433b6..f24f17b 100644 (file)
@@ -1458,7 +1458,7 @@ tcp_find_option(u_int8_t option,
                int *hotdrop)
 {
        /* tcp.doff is only 4 bits, ie. max 15 * 4 bytes */
-       char opt[60 - sizeof(struct tcphdr)];
+       u_int8_t opt[60 - sizeof(struct tcphdr)];
        unsigned int i;
 
        duprintf("tcp_match: finding option\n");
@@ -1731,6 +1731,15 @@ static inline int print_name(const char *i,
        return 0;
 }
 
+static inline int print_target(const struct ipt_target *t,
+                               off_t start_offset, char *buffer, int length,
+                               off_t *pos, unsigned int *count)
+{
+       if (t == &ipt_standard_target || t == &ipt_error_target)
+               return 0;
+       return print_name((char *)t, start_offset, buffer, length, pos, count);
+}
+
 static int ipt_get_tables(char *buffer, char **start, off_t offset, int length)
 {
        off_t pos = 0;
@@ -1757,7 +1766,7 @@ static int ipt_get_targets(char *buffer, char **start, off_t offset, int length)
        if (down_interruptible(&ipt_mutex) != 0)
                return 0;
 
-       LIST_FIND(&ipt_target, print_name, void *,
+       LIST_FIND(&ipt_target, print_target, struct ipt_target *,
                  offset, buffer, length, &pos, &count);
        
        up(&ipt_mutex);