Commit 870a2df4 authored by Nicolas Dichtel's avatar Nicolas Dichtel Committed by Steffen Klassert

xfrm: rename struct xfrm_filter

iproute2 already defines a structure with that name, let's use another one to
avoid any conflict.

CC: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
parent e50287be
...@@ -121,7 +121,7 @@ struct xfrm_state_walk { ...@@ -121,7 +121,7 @@ struct xfrm_state_walk {
u8 dying; u8 dying;
u8 proto; u8 proto;
u32 seq; u32 seq;
struct xfrm_filter *filter; struct xfrm_address_filter *filter;
}; };
/* Full description of state of transformer. */ /* Full description of state of transformer. */
...@@ -1423,7 +1423,7 @@ static inline void xfrm_sysctl_fini(struct net *net) ...@@ -1423,7 +1423,7 @@ static inline void xfrm_sysctl_fini(struct net *net)
#endif #endif
void xfrm_state_walk_init(struct xfrm_state_walk *walk, u8 proto, void xfrm_state_walk_init(struct xfrm_state_walk *walk, u8 proto,
struct xfrm_filter *filter); struct xfrm_address_filter *filter);
int xfrm_state_walk(struct net *net, struct xfrm_state_walk *walk, int xfrm_state_walk(struct net *net, struct xfrm_state_walk *walk,
int (*func)(struct xfrm_state *, int, void*), void *); int (*func)(struct xfrm_state *, int, void*), void *);
void xfrm_state_walk_done(struct xfrm_state_walk *walk, struct net *net); void xfrm_state_walk_done(struct xfrm_state_walk *walk, struct net *net);
......
...@@ -299,7 +299,7 @@ enum xfrm_attr_type_t { ...@@ -299,7 +299,7 @@ enum xfrm_attr_type_t {
XFRMA_REPLAY_ESN_VAL, /* struct xfrm_replay_esn */ XFRMA_REPLAY_ESN_VAL, /* struct xfrm_replay_esn */
XFRMA_SA_EXTRA_FLAGS, /* __u32 */ XFRMA_SA_EXTRA_FLAGS, /* __u32 */
XFRMA_PROTO, /* __u8 */ XFRMA_PROTO, /* __u8 */
XFRMA_FILTER, /* struct xfrm_filter */ XFRMA_ADDRESS_FILTER, /* struct xfrm_address_filter */
__XFRMA_MAX __XFRMA_MAX
#define XFRMA_MAX (__XFRMA_MAX - 1) #define XFRMA_MAX (__XFRMA_MAX - 1)
...@@ -476,7 +476,7 @@ struct xfrm_user_mapping { ...@@ -476,7 +476,7 @@ struct xfrm_user_mapping {
__be16 new_sport; __be16 new_sport;
}; };
struct xfrm_filter { struct xfrm_address_filter {
xfrm_address_t saddr; xfrm_address_t saddr;
xfrm_address_t daddr; xfrm_address_t daddr;
__u16 family; __u16 family;
......
...@@ -1799,7 +1799,7 @@ static void pfkey_dump_sa_done(struct pfkey_sock *pfk) ...@@ -1799,7 +1799,7 @@ static void pfkey_dump_sa_done(struct pfkey_sock *pfk)
static int pfkey_dump(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs) static int pfkey_dump(struct sock *sk, struct sk_buff *skb, const struct sadb_msg *hdr, void * const *ext_hdrs)
{ {
u8 proto; u8 proto;
struct xfrm_filter *filter = NULL; struct xfrm_address_filter *filter = NULL;
struct pfkey_sock *pfk = pfkey_sk(sk); struct pfkey_sock *pfk = pfkey_sk(sk);
if (pfk->dump.dump != NULL) if (pfk->dump.dump != NULL)
......
...@@ -1598,7 +1598,7 @@ int xfrm_alloc_spi(struct xfrm_state *x, u32 low, u32 high) ...@@ -1598,7 +1598,7 @@ int xfrm_alloc_spi(struct xfrm_state *x, u32 low, u32 high)
EXPORT_SYMBOL(xfrm_alloc_spi); EXPORT_SYMBOL(xfrm_alloc_spi);
static bool __xfrm_state_filter_match(struct xfrm_state *x, static bool __xfrm_state_filter_match(struct xfrm_state *x,
struct xfrm_filter *filter) struct xfrm_address_filter *filter)
{ {
if (filter) { if (filter) {
if ((filter->family == AF_INET || if ((filter->family == AF_INET ||
...@@ -1657,7 +1657,7 @@ int xfrm_state_walk(struct net *net, struct xfrm_state_walk *walk, ...@@ -1657,7 +1657,7 @@ int xfrm_state_walk(struct net *net, struct xfrm_state_walk *walk,
EXPORT_SYMBOL(xfrm_state_walk); EXPORT_SYMBOL(xfrm_state_walk);
void xfrm_state_walk_init(struct xfrm_state_walk *walk, u8 proto, void xfrm_state_walk_init(struct xfrm_state_walk *walk, u8 proto,
struct xfrm_filter *filter) struct xfrm_address_filter *filter)
{ {
INIT_LIST_HEAD(&walk->all); INIT_LIST_HEAD(&walk->all);
walk->proto = proto; walk->proto = proto;
......
...@@ -904,7 +904,7 @@ static int xfrm_dump_sa(struct sk_buff *skb, struct netlink_callback *cb) ...@@ -904,7 +904,7 @@ static int xfrm_dump_sa(struct sk_buff *skb, struct netlink_callback *cb)
if (!cb->args[0]) { if (!cb->args[0]) {
struct nlattr *attrs[XFRMA_MAX+1]; struct nlattr *attrs[XFRMA_MAX+1];
struct xfrm_filter *filter = NULL; struct xfrm_address_filter *filter = NULL;
u8 proto = 0; u8 proto = 0;
int err; int err;
...@@ -915,12 +915,12 @@ static int xfrm_dump_sa(struct sk_buff *skb, struct netlink_callback *cb) ...@@ -915,12 +915,12 @@ static int xfrm_dump_sa(struct sk_buff *skb, struct netlink_callback *cb)
if (err < 0) if (err < 0)
return err; return err;
if (attrs[XFRMA_FILTER]) { if (attrs[XFRMA_ADDRESS_FILTER]) {
filter = kmalloc(sizeof(*filter), GFP_KERNEL); filter = kmalloc(sizeof(*filter), GFP_KERNEL);
if (filter == NULL) if (filter == NULL)
return -ENOMEM; return -ENOMEM;
memcpy(filter, nla_data(attrs[XFRMA_FILTER]), memcpy(filter, nla_data(attrs[XFRMA_ADDRESS_FILTER]),
sizeof(*filter)); sizeof(*filter));
} }
...@@ -2334,7 +2334,7 @@ static const struct nla_policy xfrma_policy[XFRMA_MAX+1] = { ...@@ -2334,7 +2334,7 @@ static const struct nla_policy xfrma_policy[XFRMA_MAX+1] = {
[XFRMA_REPLAY_ESN_VAL] = { .len = sizeof(struct xfrm_replay_state_esn) }, [XFRMA_REPLAY_ESN_VAL] = { .len = sizeof(struct xfrm_replay_state_esn) },
[XFRMA_SA_EXTRA_FLAGS] = { .type = NLA_U32 }, [XFRMA_SA_EXTRA_FLAGS] = { .type = NLA_U32 },
[XFRMA_PROTO] = { .type = NLA_U8 }, [XFRMA_PROTO] = { .type = NLA_U8 },
[XFRMA_FILTER] = { .len = sizeof(struct xfrm_filter) }, [XFRMA_ADDRESS_FILTER] = { .len = sizeof(struct xfrm_address_filter) },
}; };
static const struct xfrm_link { static const struct xfrm_link {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment