aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/xfrm.h
diff options
context:
space:
mode:
authorJames Chapman <jchapman@katalix.com>2007-07-05 20:08:05 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-07-11 01:16:53 -0400
commit067b207b281db5e3f03f8d244286c20f61aa2343 (patch)
treea947ba1fdc03ca82fdb2c7d6f8334b995c1c5ab2 /include/net/xfrm.h
parent93cce3d3657bfb5d04789afcd5104f8c48700f32 (diff)
[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>
Diffstat (limited to 'include/net/xfrm.h')
-rw-r--r--include/net/xfrm.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index d3a898b18fb4..ae959e950174 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1003,7 +1003,7 @@ extern int xfrm6_find_1stfragopt(struct xfrm_state *x, struct sk_buff *skb,
1003 u8 **prevhdr); 1003 u8 **prevhdr);
1004 1004
1005#ifdef CONFIG_XFRM 1005#ifdef CONFIG_XFRM
1006extern int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type); 1006extern int xfrm4_udp_encap_rcv(struct sock *sk, struct sk_buff *skb);
1007extern int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen); 1007extern int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optval, int optlen);
1008extern int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsigned short family); 1008extern int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsigned short family);
1009#else 1009#else
@@ -1012,12 +1012,13 @@ static inline int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optv
1012 return -ENOPROTOOPT; 1012 return -ENOPROTOOPT;
1013} 1013}
1014 1014
1015static inline int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type) 1015static inline int xfrm4_udp_encap_rcv(struct sock *sk, struct sk_buff *skb)
1016{ 1016{
1017 /* should not happen */ 1017 /* should not happen */
1018 kfree_skb(skb); 1018 kfree_skb(skb);
1019 return 0; 1019 return 0;
1020} 1020}
1021
1021static inline int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsigned short family) 1022static inline int xfrm_dst_lookup(struct xfrm_dst **dst, struct flowi *fl, unsigned short family)
1022{ 1023{
1023 return -EINVAL; 1024 return -EINVAL;