summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/netinet/udp_usrreq.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
index 4479a50..f63fd0b 100644
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -542,11 +542,13 @@ udp_input(struct mbuf *m, int off)
* Check the minimum TTL for socket.
*/
INP_RLOCK(inp);
- if (inp->inp_ip_minttl && inp->inp_ip_minttl > ip->ip_ttl)
- goto badheadlocked;
+ INP_INFO_RUNLOCK(&udbinfo);
+ if (inp->inp_ip_minttl && inp->inp_ip_minttl > ip->ip_ttl) {
+ INP_RUNLOCK(inp);
+ goto badunlocked;
+ }
udp_append(inp, ip, m, iphlen + sizeof(struct udphdr), &udp_in);
INP_RUNLOCK(inp);
- INP_INFO_RUNLOCK(&udbinfo);
return;
badheadlocked:
OpenPOWER on IntegriCloud