Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Three trivial overlapping conflicts. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
@@ -306,7 +306,8 @@ struct xfrm_replay {
|
||||
};
|
||||
|
||||
struct xfrm_if_cb {
|
||||
struct xfrm_if *(*decode_session)(struct sk_buff *skb);
|
||||
struct xfrm_if *(*decode_session)(struct sk_buff *skb,
|
||||
unsigned short family);
|
||||
};
|
||||
|
||||
void xfrm_if_register_cb(const struct xfrm_if_cb *ifcb);
|
||||
@@ -1335,6 +1336,23 @@ static inline int xfrm_state_kern(const struct xfrm_state *x)
|
||||
return atomic_read(&x->tunnel_users);
|
||||
}
|
||||
|
||||
static inline bool xfrm_id_proto_valid(u8 proto)
|
||||
{
|
||||
switch (proto) {
|
||||
case IPPROTO_AH:
|
||||
case IPPROTO_ESP:
|
||||
case IPPROTO_COMP:
|
||||
#if IS_ENABLED(CONFIG_IPV6)
|
||||
case IPPROTO_ROUTING:
|
||||
case IPPROTO_DSTOPTS:
|
||||
#endif
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* IPSEC_PROTO_ANY only matches 3 IPsec protocols, 0 could match all. */
|
||||
static inline int xfrm_id_proto_match(u8 proto, u8 userproto)
|
||||
{
|
||||
return (!userproto || proto == userproto ||
|
||||
|
Reference in New Issue
Block a user