Re: [PATCH 02/13] IP set core support

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

 



On 01.02.2011 22:28, Jozsef Kadlecsik wrote:
> On Tue, 1 Feb 2011, Jozsef Kadlecsik wrote:
> 
>>>> I guess you're relying on that the original message is appended to a
>>>> nlmsgerr message. That doesn't seem right though, if you want to return
>>>> something to userspace, you should construct a new message.
>>>
>>> The message we are processing here carried multiple commands (each having 
>>> an attribute with the line number of the given command) and one failed 
>>> from some reason. We have to notify the userspace which command, at what 
>>> line failed. For this reason the multi-command messages have got an 
>>> attribute, which can be filled out with the line number - that happens 
>>> here. The attribute is already there, the message is not enlarged, just
>>> the empty value is overwritten with the proper value.
>>>
>>> The line number reporting works this way, tested in the testsuite too.
>>>
>>> If I had to construct a completely new message and sent it, that'd be more 
>>> or less the duplication of netlink_ack. Additionally I had to suppress 
>>> netlink from sending an errmsg/ack too.
>>
>> Hm, if I lie -EINTR to netlink, then I can construct and send the error 
>> message manually and keep NLM_F_ACK at the same time. What do you think?
>> Please have a look at the attached patch.
> 
> Oops, mistypeing fixed, here follow the hopefully good version.

This looks fine to me. A comment about why it returns -EINTR would
probably be a good idea though.
--
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