diff options
| author | Philippe Guibert <philippe.guibert@6wind.com> | 2021-02-17 11:43:52 +0100 | 
|---|---|---|
| committer | Philippe Guibert <philippe.guibert@6wind.com> | 2021-03-10 14:57:32 +0100 | 
| commit | ef524230a6baa5dd5dd337d723d47fe984d3e304 (patch) | |
| tree | b5eba1201fad225c2f0c69a7b09bea8d3916e2d3 /zebra/kernel_netlink.c | |
| parent | 5162e00045e1fe5ee4acd34d9e507e54f668e1e0 (diff) | |
zebra: move ipset and ipset_entry to zebra dplane contexts
like it has been done for iptable contexts, a zebra dplane context is
created for each ipset/ipset entry event. The zebra_dplane_ctx job is
then enqueued and processed by separate thread. Like it has been done
for zebra_pbr_iptable context, the ipset and ipset entry contexts are
encapsulated into an union of structures in zebra_dplane_ctx.
There is a specificity in that when storing ipset_entry structure, there
was a backpointer pointer to the ipset structure that is necessary
to get some complementary information before calling the hook. The
proposal is to use an ipset_entry_info structure next to the ipset_entry,
in the zebra_dplane context. That information is used for ipset_entry
processing. The ipset name and the ipset type are the only fields
 necessary.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'zebra/kernel_netlink.c')
| -rw-r--r-- | zebra/kernel_netlink.c | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c index 8dd0c14d5d..aa19b18089 100644 --- a/zebra/kernel_netlink.c +++ b/zebra/kernel_netlink.c @@ -1352,6 +1352,10 @@ static enum netlink_msg_status nl_put_msg(struct nl_batch *bth,  	case DPLANE_OP_IPTABLE_ADD:  	case DPLANE_OP_IPTABLE_DELETE: +	case DPLANE_OP_IPSET_ADD: +	case DPLANE_OP_IPSET_DELETE: +	case DPLANE_OP_IPSET_ENTRY_ADD: +	case DPLANE_OP_IPSET_ENTRY_DELETE:  		return FRR_NETLINK_ERROR;  	case DPLANE_OP_NONE:  | 
