|
@@ -1972,13 +1972,20 @@ ip_vs_in(struct netns_ipvs *ipvs, unsigned int hooknum, struct sk_buff *skb, int
|
|
if (cp->dest && !(cp->dest->flags & IP_VS_DEST_F_AVAILABLE)) {
|
|
if (cp->dest && !(cp->dest->flags & IP_VS_DEST_F_AVAILABLE)) {
|
|
/* the destination server is not available */
|
|
/* the destination server is not available */
|
|
|
|
|
|
- if (sysctl_expire_nodest_conn(ipvs)) {
|
|
|
|
|
|
+ __u32 flags = cp->flags;
|
|
|
|
+
|
|
|
|
+ /* when timer already started, silently drop the packet.*/
|
|
|
|
+ if (timer_pending(&cp->timer))
|
|
|
|
+ __ip_vs_conn_put(cp);
|
|
|
|
+ else
|
|
|
|
+ ip_vs_conn_put(cp);
|
|
|
|
+
|
|
|
|
+ if (sysctl_expire_nodest_conn(ipvs) &&
|
|
|
|
+ !(flags & IP_VS_CONN_F_ONE_PACKET)) {
|
|
/* try to expire the connection immediately */
|
|
/* try to expire the connection immediately */
|
|
ip_vs_conn_expire_now(cp);
|
|
ip_vs_conn_expire_now(cp);
|
|
}
|
|
}
|
|
- /* don't restart its timer, and silently
|
|
|
|
- drop the packet. */
|
|
|
|
- __ip_vs_conn_put(cp);
|
|
|
|
|
|
+
|
|
return NF_DROP;
|
|
return NF_DROP;
|
|
}
|
|
}
|
|
|
|
|