diff options
| author | Alexander Motin <mav@FreeBSD.org> | 2008-07-27 20:48:22 +0000 |
|---|---|---|
| committer | Alexander Motin <mav@FreeBSD.org> | 2008-07-27 20:48:22 +0000 |
| commit | d185578a78beee17b1afca14ad06426f5129d845 (patch) | |
| tree | d14a3563a0fa5a1f78c45a7d7d46ed9a20b22def | |
| parent | b11e21ae804d3e073bfa3655074a6bdaba3b6e57 (diff) | |
Notes
| -rw-r--r-- | sys/netinet/ip_divert.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 158a9e7ad92d..a5091519f843 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -268,9 +268,9 @@ divert_packet(struct mbuf *m, int incoming) nport = htons((u_int16_t)divert_info(mtag)); INP_INFO_RLOCK(&divcbinfo); LIST_FOREACH(inp, &divcb, inp_list) { - INP_RLOCK(inp); /* XXX why does only one socket match? */ if (inp->inp_lport == nport) { + INP_RLOCK(inp); sa = inp->inp_socket; SOCKBUF_LOCK(&sa->so_rcv); if (sbappendaddr_locked(&sa->so_rcv, @@ -283,7 +283,6 @@ divert_packet(struct mbuf *m, int incoming) INP_RUNLOCK(inp); break; } - INP_RUNLOCK(inp); } INP_INFO_RUNLOCK(&divcbinfo); if (sa == NULL) { |
