[UDP]: Cleanup UDP encapsulation code
This cleanup fell out after adding L2TP support where a new encap_rcv funcptr was added to struct udp_sock. Have XFRM use the new encap_rcv funcptr, which allows us to move the XFRM encap code from udp.c into xfrm4_input.c. Make xfrm4_rcv_encap() static since it is no longer called externally. Signed-off-by: James Chapman <jchapman@katalix.com> Acked-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
93cce3d365
commit
067b207b28
@@ -1003,7 +1003,7 @@ extern int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb,
|
||||
u8 **prevhdr);
|
||||
|
||||
#ifdef CONFIG_XFRM
|
||||
extern int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type);
|
||||
extern int xfrm4_udp_encap_rcv(struct sock *sk, struct sk_buff *skb);
|
||||
extern int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen);
|
||||
extern int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsigned short family);
|
||||
#else
|
||||
@@ -1012,12 +1012,13 @@ static inline int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optv
|
||||
return -ENOPROTOOPT;
|
||||
}
|
||||
|
||||
static inline int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type)
|
||||
static inline int xfrm4_udp_encap_rcv(struct sock *sk, struct sk_buff *skb)
|
||||
{
|
||||
/* should not happen */
|
||||
kfree_skb(skb);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsigned short family)
|
||||
{
|
||||
return -EINVAL;
|
||||
|
Reference in New Issue
Block a user