Re: Re: [PATCH V4 0/3] Add mark target

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

 




>From: netfilter-devel-owner
>Date: 2015-04-02
>To: pablo@xxxxxxxxxxxxx
>Subject: Re: Re: [PATCH V4 0/3] Add mark target
>
>
>
>>From: Pablo Neira Ayuso
>>Date: 2015-04-02
>>To: Zhang, Chunyu/章 春宇
>>Subject: Re: [PATCH V4 0/3] Add mark target
>>
>>On Sun, Mar 29, 2015 at 10:35:45PM -0400, Zhang Chunyu wrote:
>>> v1:
>>>   add mark target for arptables
>>> 
>>> v2:
>>>   add --and-mark
>>>   add --or-mark
>>>   add revision for common api
>>> 
>>> v3:
>>>   fold 2/4, 3/4 and 4/4 patch into one single patch
>>>   use C99 initialization
>>>   change some format
>>> 
>>> V4:
>>>   resubmit the kernel patch
>>
>>net/netfilter/xt_mark.c is missing a small change, you have to add
>>MODULE_ALIAS("arpt_MARK").
>>
>>And after that, I hitting here:
>>
>># arptables -I OUTPUT -j MARK --set-mark 1
>>arptables: Protocol wrong type for socket
>
>i will add MODULE_ALIAS("arpt_MARK"). 
>will test and answer again
net/netfilter/xt_mark.c  will add :
1.  MODULE_ALIAS("arpt_MARK").
2. 
static struct xt_target mark_tg_reg[] __read_mostly = {
    {
	    .name           = "MARK",
	    .revision       = 2,
	    .family         = NFPROTO_UNSPEC,
	    .target         = mark_tg,
	    .targetsize     = sizeof(struct xt_mark_tginfo2),
	    .me             = THIS_MODULE,
    },
    {
	    .name           = "MARK",
	    .revision       = 2,
	    .family         = NFPROTO_ARP,                < === here !
	    .target         = mark_tg,
	    .targetsize     = sizeof(struct xt_mark_tginfo2),
	    .me             = THIS_MODULE,
    }
};

i will fix it in v5 
>
>now i use :
># modprobe xt_mark
># ./arptables  -I OUTPUT -j MARK --set-mark 1
># ./arptables --list
>Chain INPUT (policy ACCEPT)
>
>Chain OUTPUT (policy ACCEPT)
>-j MARK --set-mark 1
>
>Chain FORWARD (policy ACCEPT)
>
>
>>
>>With my arptables patches applied in first place, so I suspect the
>>right revision is not being set in what we send to the kernel from
>>userspace.�{.n�+�������+%��lzwm��b�맲��r��zw�~)mz�^��b��^n�r���z���h����&���G���h�(�階�ݢj"���m�����z�ޖ���f���h���~�m���.n��������+%������w��{.n����z��׫���n�r������&��z�ޗ�zf���h���~����������_��+v���)ߣ�


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

  Powered by Linux