* [PATCH] xfrm: ifdef setsockopt(UDP_ENCAP_ESPINUDP/UDP_ENCAP_ESPINUDP_NON_IKE)
@ 2019-10-03 21:21 Alexey Dobriyan
2019-10-10 10:23 ` Steffen Klassert
0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2019-10-03 21:21 UTC (permalink / raw
To: davem, steffen.klassert, herbert; +Cc: netdev
If IPsec is not configured, there is no reason to delay the inevitable.
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---
include/net/xfrm.h | 7 -------
net/ipv4/udp.c | 2 ++
2 files changed, 2 insertions(+), 7 deletions(-)
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1613,13 +1613,6 @@ static inline int xfrm_user_policy(struct sock *sk, int optname, u8 __user *optv
{
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
struct dst_entry *__xfrm_dst_lookup(struct net *net, int tos, int oif,
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -2520,9 +2520,11 @@ int udp_lib_setsockopt(struct sock *sk, int level, int optname,
case UDP_ENCAP:
switch (val) {
case 0:
+#ifdef CONFIG_XFRM
case UDP_ENCAP_ESPINUDP:
case UDP_ENCAP_ESPINUDP_NON_IKE:
up->encap_rcv = xfrm4_udp_encap_rcv;
+#endif
/* FALLTHROUGH */
case UDP_ENCAP_L2TPINUDP:
up->encap_type = val;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] xfrm: ifdef setsockopt(UDP_ENCAP_ESPINUDP/UDP_ENCAP_ESPINUDP_NON_IKE)
2019-10-03 21:21 [PATCH] xfrm: ifdef setsockopt(UDP_ENCAP_ESPINUDP/UDP_ENCAP_ESPINUDP_NON_IKE) Alexey Dobriyan
@ 2019-10-10 10:23 ` Steffen Klassert
0 siblings, 0 replies; 2+ messages in thread
From: Steffen Klassert @ 2019-10-10 10:23 UTC (permalink / raw
To: Alexey Dobriyan; +Cc: davem, herbert, netdev
On Fri, Oct 04, 2019 at 12:21:57AM +0300, Alexey Dobriyan wrote:
> If IPsec is not configured, there is no reason to delay the inevitable.
>
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Applied to ipsec-next, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-10 10:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-03 21:21 [PATCH] xfrm: ifdef setsockopt(UDP_ENCAP_ESPINUDP/UDP_ENCAP_ESPINUDP_NON_IKE) Alexey Dobriyan
2019-10-10 10:23 ` Steffen Klassert
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.