|
@@ -6068,9 +6068,9 @@ static bool tcp_syn_flood_action(const struct sock *sk,
|
|
const struct sk_buff *skb,
|
|
const struct sk_buff *skb,
|
|
const char *proto)
|
|
const char *proto)
|
|
{
|
|
{
|
|
|
|
+ struct request_sock_queue *queue = &inet_csk(sk)->icsk_accept_queue;
|
|
const char *msg = "Dropping request";
|
|
const char *msg = "Dropping request";
|
|
bool want_cookie = false;
|
|
bool want_cookie = false;
|
|
- struct listen_sock *lopt;
|
|
|
|
|
|
|
|
#ifdef CONFIG_SYN_COOKIES
|
|
#ifdef CONFIG_SYN_COOKIES
|
|
if (sysctl_tcp_syncookies) {
|
|
if (sysctl_tcp_syncookies) {
|
|
@@ -6081,10 +6081,9 @@ static bool tcp_syn_flood_action(const struct sock *sk,
|
|
#endif
|
|
#endif
|
|
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPREQQFULLDROP);
|
|
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_TCPREQQFULLDROP);
|
|
|
|
|
|
- lopt = inet_csk(sk)->icsk_accept_queue.listen_opt;
|
|
|
|
- if (!lopt->synflood_warned &&
|
|
|
|
|
|
+ if (!queue->synflood_warned &&
|
|
sysctl_tcp_syncookies != 2 &&
|
|
sysctl_tcp_syncookies != 2 &&
|
|
- xchg(&lopt->synflood_warned, 1) == 0)
|
|
|
|
|
|
+ xchg(&queue->synflood_warned, 1) == 0)
|
|
pr_info("%s: Possible SYN flooding on port %d. %s. Check SNMP counters.\n",
|
|
pr_info("%s: Possible SYN flooding on port %d. %s. Check SNMP counters.\n",
|
|
proto, ntohs(tcp_hdr(skb)->dest), msg);
|
|
proto, ntohs(tcp_hdr(skb)->dest), msg);
|
|
|
|
|