/* Copyright (C) 2011-2017 B.A.T.M.A.N. contributors: * * Marek Lindner, Linus Lüssing * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General Public * License as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, see . */ #ifndef _NET_BATMAN_ADV_BAT_V_H_ #define _NET_BATMAN_ADV_BAT_V_H_ #include "main.h" #ifdef CONFIG_BATMAN_ADV_BATMAN_V int batadv_v_init(void); void batadv_v_hardif_init(struct batadv_hard_iface *hardif); int batadv_v_mesh_init(struct batadv_priv *bat_priv); void batadv_v_mesh_free(struct batadv_priv *bat_priv); #else static inline int batadv_v_init(void) { return 0; } static inline void batadv_v_hardif_init(struct batadv_hard_iface *hardif) { } static inline int batadv_v_mesh_init(struct batadv_priv *bat_priv) { return 0; } static inline void batadv_v_mesh_free(struct batadv_priv *bat_priv) { } #endif /* CONFIG_BATMAN_ADV_BATMAN_V */ #endif /* _NET_BATMAN_ADV_BAT_V_H_ */ r> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorYotam Gigi <yotamg@mellanox.com>2017-01-31 15:14:29 +0200
committerDavid S. Miller <davem@davemloft.net>2017-02-01 11:57:33 -0500
commitfd62d9f5c575f0792f150109f1fd24a0d4b3f854 (patch)
treed040d634401cf38fcb447c13aff26d0f492a82a1 /net
parent4993b39ab04b083ff6ee1147e7e7f120feb6bf7f (diff)
net/sched: matchall: Fix configuration race
In the current version, the matchall internal state is split into two structs: cls_matchall_head and cls_matchall_filter. This makes little sense, as matchall instance supports only one filter, and there is no situation where one exists and the other does not. In addition, that led to some races when filter was deleted while packet was processed. Unify that two structs into one, thus simplifying the process of matchall creation and deletion. As a result, the new, delete and get callbacks have a dummy implementation where all the work is done in destroy and change callbacks, as was done in cls_cgroup. Fixes: bf3994d2ed31 ("net/sched: introduce Match-all classifier") Reported-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Yotam Gigi <yotamg@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sched/cls_matchall.c127
1 files changed, 45 insertions, 82 deletions
diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c