mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 06:37:59 +00:00
xfrm: ifdef setsockopt(UDP_ENCAP_ESPINUDP/UDP_ENCAP_ESPINUDP_NON_IKE)
If IPsec is not configured, there is no reason to delay the inevitable. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
This commit is contained in:
parent
4361f5b611
commit
fd1ac07f3f
2 changed files with 2 additions and 7 deletions
|
@ -1613,13 +1613,6 @@ static inline int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optv
|
||||||
{
|
{
|
||||||
return -ENOPROTOOPT;
|
return -ENOPROTOOPT;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int xfrm4_udp_encap_rcv(struct sock *sk, struct sk_buff *skb)
|
|
||||||
{
|
|
||||||
/* should not happen */
|
|
||||||
kfree_skb(skb);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct dst_entry *__xfrm_dst_lookup(struct net *net, int tos, int oif,
|
struct dst_entry *__xfrm_dst_lookup(struct net *net, int tos, int oif,
|
||||||
|
|
|
@ -2520,9 +2520,11 @@ int udp_lib_setsockopt(struct sock *sk, int level, int optname,
|
||||||
case UDP_ENCAP:
|
case UDP_ENCAP:
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case 0:
|
case 0:
|
||||||
|
#ifdef CONFIG_XFRM
|
||||||
case UDP_ENCAP_ESPINUDP:
|
case UDP_ENCAP_ESPINUDP:
|
||||||
case UDP_ENCAP_ESPINUDP_NON_IKE:
|
case UDP_ENCAP_ESPINUDP_NON_IKE:
|
||||||
up->encap_rcv = xfrm4_udp_encap_rcv;
|
up->encap_rcv = xfrm4_udp_encap_rcv;
|
||||||
|
#endif
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
case UDP_ENCAP_L2TPINUDP:
|
case UDP_ENCAP_L2TPINUDP:
|
||||||
up->encap_type = val;
|
up->encap_type = val;
|
||||||
|
|
Loading…
Add table
Reference in a new issue