aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/ipv4/udp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 131d8a720086..ab0966df1e2a 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1397,6 +1397,8 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
1397 nf_reset(skb); 1397 nf_reset(skb);
1398 1398
1399 if (up->encap_type) { 1399 if (up->encap_type) {
1400 int (*encap_rcv)(struct sock *sk, struct sk_buff *skb);
1401
1400 /* 1402 /*
1401 * This is an encapsulation socket so pass the skb to 1403 * This is an encapsulation socket so pass the skb to
1402 * the socket's udp_encap_rcv() hook. Otherwise, just 1404 * the socket's udp_encap_rcv() hook. Otherwise, just
@@ -1409,11 +1411,11 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
1409 */ 1411 */
1410 1412
1411 /* if we're overly short, let UDP handle it */ 1413 /* if we're overly short, let UDP handle it */
1412 if (skb->len > sizeof(struct udphdr) && 1414 encap_rcv = ACCESS_ONCE(up->encap_rcv);
1413 up->encap_rcv != NULL) { 1415 if (skb->len > sizeof(struct udphdr) && encap_rcv != NULL) {
1414 int ret; 1416 int ret;
1415 1417
1416 ret = (*up->encap_rcv)(sk, skb); 1418 ret = encap_rcv(sk, skb);
1417 if (ret <= 0) { 1419 if (ret <= 0) {
1418 UDP_INC_STATS_BH(sock_net(sk), 1420 UDP_INC_STATS_BH(sock_net(sk),
1419 UDP_MIB_INDATAGRAMS, 1421 UDP_MIB_INDATAGRAMS,