Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 273517
b: refs/heads/master
c: 0ad92ad
h: refs/heads/master
i:
  273515: 1ae0af7
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 2, 2011
1 parent 3c062a7 commit 14dd83d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 501e89d3aef10f9a5b79137fbb0bcd5bf9cac2ac
refs/heads/master: 0ad92ad03aa444b312bd318b0341011a8be09d13
8 changes: 5 additions & 3 deletions trunk/net/ipv4/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,8 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
nf_reset(skb);

if (up->encap_type) {
int (*encap_rcv)(struct sock *sk, struct sk_buff *skb);

/*
* This is an encapsulation socket so pass the skb to
* the socket's udp_encap_rcv() hook. Otherwise, just
Expand All @@ -1409,11 +1411,11 @@ int udp_queue_rcv_skb(struct sock *sk, struct sk_buff *skb)
*/

/* if we're overly short, let UDP handle it */
if (skb->len > sizeof(struct udphdr) &&
up->encap_rcv != NULL) {
encap_rcv = ACCESS_ONCE(up->encap_rcv);
if (skb->len > sizeof(struct udphdr) && encap_rcv != NULL) {
int ret;

ret = (*up->encap_rcv)(sk, skb);
ret = encap_rcv(sk, skb);
if (ret <= 0) {
UDP_INC_STATS_BH(sock_net(sk),
UDP_MIB_INDATAGRAMS,
Expand Down

0 comments on commit 14dd83d

Please sign in to comment.