Shivani Bhardwaj <shivanib134@xxxxxxxxx> wrote: > > I think that this would make it a bit clearer and > > it also avoids the v3/v2/v1 stacking. > > > Sure. > Just to make sure I get this right, should I be using two objects of > structures xt_NFQ_info_v3 and xt_NFQ_info_v2 (since v3 does not have > bypass) and make switch cases accordingly in v3? I meant something like this (untested): diff --git a/extensions/libxt_NFQUEUE.c b/extensions/libxt_NFQUEUE.c index 8115457..9750ce0 100644 --- a/extensions/libxt_NFQUEUE.c +++ b/extensions/libxt_NFQUEUE.c @@ -108,11 +108,14 @@ static void NFQUEUE_parse_v3(struct xt_option_call *cb) { struct xt_NFQ_info_v3 *info = cb->data; - NFQUEUE_parse_v2(cb); + NFQUEUE_parse_v1(cb); switch (cb->entry->id) { case O_QUEUE_CPU_FANOUT: info->flags |= NFQ_FLAG_CPU_FANOUT; break; + case O_QUEUE_BYPASS: + info->flags |= NFQ_FLAG_BYPASS; + break; } } > Should I be doing this for all the functions (save, xlate, print) > since the same stacking is there too? Hmm, I think it would make sense to disentangle this as well (as a 2nd cleanup patch). The ->bypass/->flag overloading works but its not really obvious... I don't have a strong opinion however, if you think your v1 patch is ok I'm fine with it as well. -- 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