Non-Understood Message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear All,

Can someone help?

I find this message in dmesg:

MYTARGET.0 target: invalid size 65540 (kernel) != (user) 4

I've recompiled everything in site: kernel, iptables, xtables-addons,
MYTARGET, to no avail. I really cannot see what's wrong. I think it
means that there's a mismatch in size of between what the user-space
passes and what the kernel-space expects.

Many thanks

Nicole

here are some code snippets:

from libxt_MYTARGET.c

static struct xtables_target mytarget_tg_reg[] = {
    {
        .version       = XTABLES_VERSION,
        .name          = "MYTARGET",
        .revision      = 0,
        .family        = NFPROTO_IPV4,
        .size          = XT_ALIGN(sizeof(struct xt_mytarget_tginfo)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_mytarget_tginfo)),
	...
    },
#ifdef WITH_IPV6
    {
        .version       = XTABLES_VERSION,
        .name          = "MYTARGET",
        .revision      = 0,
        .family        = NFPROTO_IPV6,
        .size          = XT_ALIGN(sizeof(struct xt_mytarget_tginfo)),
        .userspacesize = XT_ALIGN(sizeof(struct xt_mytarget_tginfo)),
        ...
    },
#endif
};

from xt_MYTARGET.c

static struct xt_target mytarget_tg_reg[] __read_mostly = {
    {
        .name       = "MYTARGET",
        .revision   = 0,
        .family     = NFPROTO_IPV4,
        .table      = "mangle",
        .target     = mytarget_tg,
        .checkentry = mytarget_tg_check,
        .destroy    = mytarget_tg_destroy,
        .targetsize = XT_ALIGN(sizeof(struct xt_mytarget_tginfo)),
        .me         = THIS_MODULE,
    },
#ifdef WITH_IPV6
    {
        .name       = "MYTARGET",
        .revision   = 0,
        .family     = NFPROTO_IPV6,
        .table      = "mangle",
        .target     = mytarget_tg,
        .checkentry = mytarget_tg_check,
        .destroy    = mytarget_tg_destroy,
        .targetsize = XT_ALIGN(sizeof(struct xt_mytarget_tginfo)),
        .me         = THIS_MODULE,
    },
#endif
};

from xt_MYTARGET.h

struct xt_mytarget_tginfo {
    __u8    value;

    __u8    mode;

    bool    final;

    bool    set_value;

    __u8    by_port[USHRT_MAX];
};
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux