Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177380000
D7251.1794250021.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D7251.1794250021.diff
View Options
Index: head/sys/netinet/tcp_subr.c
===================================================================
--- head/sys/netinet/tcp_subr.c
+++ head/sys/netinet/tcp_subr.c
@@ -1950,11 +1950,7 @@
else if (V_icmp_may_rst && (cmd == PRC_UNREACH_ADMIN_PROHIB ||
cmd == PRC_UNREACH_PORT || cmd == PRC_TIMXCEED_INTRANS) && ip)
notify = tcp_drop_syn_sent;
- else if (PRC_IS_REDIRECT(cmd)) {
- /* signal EHOSTDOWN, as it flushes the cached route */
- in_pcbnotifyall(&V_tcbinfo, faddr, EHOSTDOWN, notify);
- return;
- }
+
/*
* Hostdead is ugly because it goes linearly through all PCBs.
* XXX: We never get this from ICMP, otherwise it makes an
@@ -1975,7 +1971,12 @@
INP_INFO_RLOCK(&V_tcbinfo);
inp = in_pcblookup(&V_tcbinfo, faddr, th->th_dport, ip->ip_src,
th->th_sport, INPLOOKUP_WLOCKPCB, NULL);
- if (inp != NULL) {
+ if (inp != NULL && PRC_IS_REDIRECT(cmd)) {
+ /* signal EHOSTDOWN, as it flushes the cached route */
+ inp = (*notify)(inp, EHOSTDOWN);
+ if (inp != NULL)
+ INP_WUNLOCK(inp);
+ } else if (inp != NULL) {
if (!(inp->inp_flags & INP_TIMEWAIT) &&
!(inp->inp_flags & INP_DROPPED) &&
!(inp->inp_socket == NULL)) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 9, 6:47 PM (23 h, 7 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41617894
Default Alt Text
D7251.1794250021.diff (1 KB)
Attached To
Mode
D7251: Avoid calling in_pcbnotifyall() to flush cached routes
Attached
Detach File
Event Timeline