From patchwork Wed Mar 5 22:38:44 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Chia-Yu Chang (Nokia)" X-Patchwork-Id: 14003545 X-Patchwork-Delegate: kuba@kernel.org Received: from OSPPR02CU001.outbound.protection.outlook.com (mail-norwayeastazon11013000.outbound.protection.outlook.com [40.107.159.0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0C7D826739A; Wed, 5 Mar 2025 22:39:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.159.0 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741214348; cv=fail; b=NE1F+QLhzF7U0vLXR3dK2XBy9wLsmq0XLbpQt18fTO8/Zh7GzEEXm+czTkg6Sa476V1irLGV3403U4PFYPA04j2L6YEJYE841OFj0mxcFiMQ2LNVAYw6jgeJ7TG3JP8QO09rr1SZfLv+auH9HgIsu4Mt8LdylGqFsagLxhXof9A= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741214348; c=relaxed/simple; bh=bA19Bgpx59I0ZPvtfckmXShS5/xeaVVN/XJQwYHkm2Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version:Content-Type; b=mgf5fkSfzs8voa1yfUzaej5ZB47H1So0S1ofBnrH5NRW4y2AekwBnhmlxAC57MfXv6KRTIExsq6DK85XcbhKjET05hUxmxEumBrgUAVQs/DQN2b9f2Oo7eDEmHCnUnCYDIaGuJVn+IYR+MhqTJQlR5K+XbGSZTe4lf0H3tOhSLo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nokia-bell-labs.com; spf=fail smtp.mailfrom=nokia-bell-labs.com; dkim=pass (2048-bit key) header.d=nokia-bell-labs.com header.i=@nokia-bell-labs.com header.b=fQyGm0tK; arc=fail smtp.client-ip=40.107.159.0 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nokia-bell-labs.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nokia-bell-labs.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nokia-bell-labs.com header.i=@nokia-bell-labs.com header.b="fQyGm0tK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Bn4fTNZ7icvs2UW3Foh36sYuwLWnUNcPgWpxngh65w8ugLn0AQtKtN7W6r7VaAz3k9FVepUL7IMaq2bw10CHpnB/y1KgC9nklSpzJv1YvlpwWRkrbrdzyYnSWBfTMfcztUNM6zwbe9C79rcVgOGm0Wb3pZQ7pqRqMjsX16PqSIRU5poERkg5MA62yVM0O9t5xWguY3nXIcpy0CYvLPbfMJsnrmxWNlXE7g0ITbyvH5gWi0H5IE72LGn2oxlwvk3ABDc1LRcMeaCPWSSFeRC/qQ8OacPjH08nH8pF/1wGLTWQZ0rbsCuDcMhT2iZsVR3D30osmd/EVNDG7fEqp7Cuyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uc9vVUPhzHEVD79jRHb5BVINbtRTTLDxS7wnK+13uWE=; b=RCCZ1xwMi9N1CvojwsnaeiU9GGCbSl69GaAGMtjHcTXyqn98+mkdLU0tXWuoF6Mg8bowm7e5s2FWVhBoSPqBQb9ditB9TC5+bCSMO8a9lofUF9wf7VhzhnG/nj0w72jP1zdl9VcUO6pFyMOIlzKl15NXCFaQEkbReECw0LfakTGiRZ+PGR8WMBqF1leAX4iCmF5vOPvGFmpZ1P8WYg0L3aBS2uRZYyg9eudeBko1/dfh/LGns3sytG5rJhPr4kxACPfHYNEKq2LzlAm3bV8U5bHXZp267AfuvJpr+E3E5bLxnUOpEOxknFlXFpgnq+eoX/3OsWgU6dpb+uixCWs/fQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 131.228.2.20) smtp.rcpttodomain=amazon.com smtp.mailfrom=nokia-bell-labs.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nokia-bell-labs.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia-bell-labs.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uc9vVUPhzHEVD79jRHb5BVINbtRTTLDxS7wnK+13uWE=; b=fQyGm0tKNsl078fOtWKFhcGsg5wor3yySk9FaY2d7Ba3z3Tvq448F5izcOpt98uaa86MA4msLi9kO66kTVEhdjgmGRzIYx1coXsCqgZUUa9/xcdoRU0cgjCIJIWzTPTieZ7QT7ECdqSa6COBOwaytpzwHAas86QDvWuH4H+PIr9M98hBRHwpUF2lbnS7XKCAqDt0DINiYa8JkX88XFU+tW6CH/m7ftyzV/MlkGtyUtmQj+OhOe7g4ch1oIChMLrVgoVXfct13bqRSw48M6Fy+W32epS6b8WmLXteSPU4h/x+JaFND3Ez8tVWlrobg8I4zFkqZrDca5dErvHvgPhMug== Received: from AM8P191CA0020.EURP191.PROD.OUTLOOK.COM (2603:10a6:20b:21a::25) by PAXPR07MB8388.eurprd07.prod.outlook.com (2603:10a6:102:22a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8511.16; Wed, 5 Mar 2025 22:39:01 +0000 Received: from AM2PEPF0001C70C.eurprd05.prod.outlook.com (2603:10a6:20b:21a:cafe::f0) by AM8P191CA0020.outlook.office365.com (2603:10a6:20b:21a::25) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8489.29 via Frontend Transport; Wed, 5 Mar 2025 22:39:01 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 131.228.2.20) smtp.mailfrom=nokia-bell-labs.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nokia-bell-labs.com; Received-SPF: Pass (protection.outlook.com: domain of nokia-bell-labs.com designates 131.228.2.20 as permitted sender) receiver=protection.outlook.com; client-ip=131.228.2.20; helo=fihe3nok0734.emea.nsn-net.net; pr=C Received: from fihe3nok0734.emea.nsn-net.net (131.228.2.20) by AM2PEPF0001C70C.mail.protection.outlook.com (10.167.16.200) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8511.15 via Frontend Transport; Wed, 5 Mar 2025 22:39:00 +0000 Received: from sarah.nbl.nsn-rdnet.net (sarah.nbl.nsn-rdnet.net [10.0.73.150]) by fihe3nok0734.emea.nsn-net.net (Postfix) with ESMTP id 1E70A251D4; Thu, 6 Mar 2025 00:38:59 +0200 (EET) From: chia-yu.chang@nokia-bell-labs.com To: netdev@vger.kernel.org, dsahern@gmail.com, davem@davemloft.net, edumazet@google.com, dsahern@kernel.org, pabeni@redhat.com, joel.granados@kernel.org, kuba@kernel.org, andrew+netdev@lunn.ch, horms@kernel.org, pablo@netfilter.org, kadlec@netfilter.org, netfilter-devel@vger.kernel.org, coreteam@netfilter.org, kory.maincent@bootlin.com, bpf@vger.kernel.org, kuniyu@amazon.com, andrew@lunn.ch, ij@kernel.org, ncardwell@google.com, koen.de_schepper@nokia-bell-labs.com, g.white@CableLabs.com, ingemar.s.johansson@ericsson.com, mirja.kuehlewind@ericsson.com, cheshire@apple.com, rs.ietf@gmx.at, Jason_Livingood@comcast.com, vidhi_goel@apple.com Cc: Chia-Yu Chang Subject: [PATCH v7 net-next 04/12] tcp: extend TCP flags to allow AE bit/ACE field Date: Wed, 5 Mar 2025 23:38:44 +0100 Message-Id: <20250305223852.85839-5-chia-yu.chang@nokia-bell-labs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250305223852.85839-1-chia-yu.chang@nokia-bell-labs.com> References: <20250305223852.85839-1-chia-yu.chang@nokia-bell-labs.com> Precedence: bulk X-Mailing-List: bpf@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM2PEPF0001C70C:EE_|PAXPR07MB8388:EE_ X-MS-Office365-Filtering-Correlation-Id: 370b80e7-0bc8-413a-0e9b-08dd5c36865a X-LD-Processed: 5d471751-9675-428d-917b-70f44f9630b0,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|1800799024|7416014|376014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?ZCvtC7rFYfImCEUO1wfa/ajgwhTDcVf?= =?utf-8?q?XGckErh9/uhc245HrPrY1CCy7OClpZwIckmKNLdA9W82Ee5f+VoiBlZ5YrEn911xI?= =?utf-8?q?DA719PJC7NJV3MzUtqUKiI6KzhC8Fx6XuD8Lu6nq5KKL/CvdKb+TOydZxVJ+MiPTl?= =?utf-8?q?dp4h7iyMjhxlZcKZSfcV8u+fnFecInJrlFpWtaxE0oI5zuuOUQe8b5SEX38F8mAEx?= =?utf-8?q?V5kL5hMoxS/0LEKpNh6IcQX8vEO7BJhcEzR/2RQcAKyYSkOu7xtlEACE1AkFUtAx+?= =?utf-8?q?MxSznv//vJm7569DkvPvNzqgdpc2FE24lc/HAqpu2WF/gBDOkYi2MmDUb3YfonJfX?= =?utf-8?q?9kjsi317N8NLLFpSuPnA2oRb4JdzU6ahZAuIt16Bc532TDXf5+yJxD2jd3nTsCffX?= =?utf-8?q?YNRay+TOPwOEU0vLQ3do3X4LakhrX5cTNtWnqVwJeUroBPtBWBWYTOqvM8AYelsNx?= =?utf-8?q?XM5K5ZvhA5DpTmNVikXewOS2Q7ewzi4rMWxqyWfavPzGylC3mLCrjcb/wsAOkYTfN?= =?utf-8?q?AcvgRBwYUtDRNPv7cR1rwVaQozXF54Kj/W5MKx/ly891YJ4QGAgxcj5da0++QRSQj?= =?utf-8?q?OWzTXAZyd5uc4M7vWm/NQeneEvkSu3VRoNBMtkdDuJB6OHcz5D9hdZRzTloDSImuX?= =?utf-8?q?X2q+7ZpvxnexqZwaFVoWT8fgT7wWrd6me17BVHG8Zqup0BYCtWfCApmvNFIHT4aSD?= =?utf-8?q?XJN+wYAg4kBvNWvZOsQnhhCcCrDMADl8Y1iYAGa/yo3WWdh1StbITRO135TQqzcIK?= =?utf-8?q?PaIA9dS6tVkOWfnjxwioLdtvA3kmtvTl5n+qLds/3H3fyatny8MO9psr32CVDkm3M?= =?utf-8?q?CsTNu20EA8mFcaCRDr/jDyhdc79a18AvPcrudTGS6UfOiRAjsrAjR4OuKqbvpkcHj?= =?utf-8?q?rx8tn37v4R6L+X7L8TnxHKX2R9xpeiNJ5kM/cnFnKASNEbuqBVslCwAm0WeCSo5LH?= =?utf-8?q?7OeMCNf42BoeSlb8mSJqrgGoOsYVamMtLlXk0XfhtIqdG5P7wT2U/R4R68j+9T/p6?= =?utf-8?q?uAEFfCjtJhoY6qpWa1gQ65pC4uBj+3idyTOKl2Uz8YzHn8ek3D6x/AFF4F83Snxgc?= =?utf-8?q?J6S2psK4QbP8xwpoHbtLjjO633o9vjRam7L/94ow63c2xQF7O1ssftOfVjCIpVtYA?= =?utf-8?q?t98WG56T6uHDUogul29t+bMjq2HZCk/upFy4K6grXp/YM3Heo+QNWi1JSYUInTz4S?= =?utf-8?q?w5opg3pmVc30F/9klftT7S5lrIAix5pfSseqOBTqTW2Lv3xhC9TMuVVB2RW1xx+OE?= =?utf-8?q?6oAOj/P2uSB1KfDwfLemPaBCCgCF3p8g6bBwt7BToGESP6Dvz4FfCqfMw4kNt4RGY?= =?utf-8?q?1I8/VjVc+RHOMalUPt5ugKqKjC885Vxot0gaIlmHrkedY6QEOnsu+qugkJMbl8/3U?= =?utf-8?q?iDLHPjqcBOCOMAIGf07CiEkip2V1qD5UIk/cZqs+KhwTi1d53Eo3/k=3D?= X-Forefront-Antispam-Report: CIP:131.228.2.20;CTRY:FI;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:fihe3nok0734.emea.nsn-net.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(36860700013)(82310400026)(1800799024)(7416014)(376014)(921020);DIR:OUT;SFP:1101; X-OriginatorOrg: nokia-bell-labs.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2025 22:39:00.7735 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 370b80e7-0bc8-413a-0e9b-08dd5c36865a X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0;Ip=[131.228.2.20];Helo=[fihe3nok0734.emea.nsn-net.net] X-MS-Exchange-CrossTenant-AuthSource: AM2PEPF0001C70C.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR07MB8388 X-Patchwork-Delegate: kuba@kernel.org From: Ilpo Järvinen With AccECN, there's one additional TCP flag to be used (AE) and ACE field that overloads the definition of AE, CWR, and ECE flags. As tcp_flags was previously only 1 byte, the byte-order stuff needs to be added to it's handling. Signed-off-by: Ilpo Järvinen Signed-off-by: Chia-Yu Chang Reviewed-by: Eric Dumazet --- include/net/tcp.h | 11 +++++++++-- include/uapi/linux/tcp.h | 9 ++++++--- net/ipv4/tcp_ipv4.c | 2 +- net/ipv4/tcp_output.c | 8 ++++---- net/ipv6/tcp_ipv6.c | 2 +- net/netfilter/nf_log_syslog.c | 8 +++++--- 6 files changed, 26 insertions(+), 14 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index 71754d5916f3..49b66b499429 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -943,7 +943,14 @@ static inline u32 tcp_rsk_tsval(const struct tcp_request_sock *treq) #define TCPHDR_URG BIT(5) #define TCPHDR_ECE BIT(6) #define TCPHDR_CWR BIT(7) - +#define TCPHDR_AE BIT(8) +#define TCPHDR_FLAGS_MASK (TCPHDR_FIN | TCPHDR_SYN | TCPHDR_RST | \ + TCPHDR_PSH | TCPHDR_ACK | TCPHDR_URG | \ + TCPHDR_ECE | TCPHDR_CWR | TCPHDR_AE) +#define tcp_flags_ntohs(th) (ntohs(*(__be16 *)&tcp_flag_word(th)) & \ + TCPHDR_FLAGS_MASK) + +#define TCPHDR_ACE (TCPHDR_ECE | TCPHDR_CWR | TCPHDR_AE) #define TCPHDR_SYN_ECN (TCPHDR_SYN | TCPHDR_ECE | TCPHDR_CWR) /* State flags for sacked in struct tcp_skb_cb */ @@ -978,7 +985,7 @@ struct tcp_skb_cb { u16 tcp_gso_size; }; }; - __u8 tcp_flags; /* TCP header flags. (tcp[13]) */ + __u16 tcp_flags; /* TCP header flags (tcp[12-13])*/ __u8 sacked; /* State flags for SACK. */ __u8 ip_dsfield; /* IPv4 tos or IPv6 dsfield */ diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h index 32a27b4a5020..92a2e79222ea 100644 --- a/include/uapi/linux/tcp.h +++ b/include/uapi/linux/tcp.h @@ -28,7 +28,8 @@ struct tcphdr { __be32 seq; __be32 ack_seq; #if defined(__LITTLE_ENDIAN_BITFIELD) - __u16 res1:4, + __u16 ae:1, + res1:3, doff:4, fin:1, syn:1, @@ -40,7 +41,8 @@ struct tcphdr { cwr:1; #elif defined(__BIG_ENDIAN_BITFIELD) __u16 doff:4, - res1:4, + res1:3, + ae:1, cwr:1, ece:1, urg:1, @@ -70,6 +72,7 @@ union tcp_word_hdr { #define tcp_flag_word(tp) (((union tcp_word_hdr *)(tp))->words[3]) enum { + TCP_FLAG_AE = __constant_cpu_to_be32(0x01000000), TCP_FLAG_CWR = __constant_cpu_to_be32(0x00800000), TCP_FLAG_ECE = __constant_cpu_to_be32(0x00400000), TCP_FLAG_URG = __constant_cpu_to_be32(0x00200000), @@ -78,7 +81,7 @@ enum { TCP_FLAG_RST = __constant_cpu_to_be32(0x00040000), TCP_FLAG_SYN = __constant_cpu_to_be32(0x00020000), TCP_FLAG_FIN = __constant_cpu_to_be32(0x00010000), - TCP_RESERVED_BITS = __constant_cpu_to_be32(0x0F000000), + TCP_RESERVED_BITS = __constant_cpu_to_be32(0x0E000000), TCP_DATA_OFFSET = __constant_cpu_to_be32(0xF0000000) }; diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index d9405b012dff..fab684221bf7 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -2159,7 +2159,7 @@ static void tcp_v4_fill_cb(struct sk_buff *skb, const struct iphdr *iph, TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin + skb->len - th->doff * 4); TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq); - TCP_SKB_CB(skb)->tcp_flags = tcp_flag_byte(th); + TCP_SKB_CB(skb)->tcp_flags = tcp_flags_ntohs(th); TCP_SKB_CB(skb)->ip_dsfield = ipv4_get_dsfield(iph); TCP_SKB_CB(skb)->sacked = 0; TCP_SKB_CB(skb)->has_rxtstamp = diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 24e56bf96747..efd3cb5e1ded 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -403,7 +403,7 @@ static void tcp_ecn_send(struct sock *sk, struct sk_buff *skb, /* Constructs common control bits of non-data skb. If SYN/FIN is present, * auto increment end seqno. */ -static void tcp_init_nondata_skb(struct sk_buff *skb, u32 seq, u8 flags) +static void tcp_init_nondata_skb(struct sk_buff *skb, u32 seq, u16 flags) { skb->ip_summed = CHECKSUM_PARTIAL; @@ -1395,7 +1395,7 @@ static int __tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, th->seq = htonl(tcb->seq); th->ack_seq = htonl(rcv_nxt); *(((__be16 *)th) + 6) = htons(((tcp_header_size >> 2) << 12) | - tcb->tcp_flags); + (tcb->tcp_flags & TCPHDR_FLAGS_MASK)); th->check = 0; th->urg_ptr = 0; @@ -1616,8 +1616,8 @@ int tcp_fragment(struct sock *sk, enum tcp_queue tcp_queue, struct sk_buff *buff; int old_factor; long limit; + u16 flags; int nlen; - u8 flags; if (WARN_ON(len > skb->len)) return -EINVAL; @@ -2171,7 +2171,7 @@ static int tso_fragment(struct sock *sk, struct sk_buff *skb, unsigned int len, { int nlen = skb->len - len; struct sk_buff *buff; - u8 flags; + u16 flags; /* All of a TSO frame must be composed of paged data. */ DEBUG_NET_WARN_ON_ONCE(skb->len != skb->data_len); diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 85c4820bfe15..a2fcc317a88e 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -1731,7 +1731,7 @@ static void tcp_v6_fill_cb(struct sk_buff *skb, const struct ipv6hdr *hdr, TCP_SKB_CB(skb)->end_seq = (TCP_SKB_CB(skb)->seq + th->syn + th->fin + skb->len - th->doff*4); TCP_SKB_CB(skb)->ack_seq = ntohl(th->ack_seq); - TCP_SKB_CB(skb)->tcp_flags = tcp_flag_byte(th); + TCP_SKB_CB(skb)->tcp_flags = tcp_flags_ntohs(th); TCP_SKB_CB(skb)->ip_dsfield = ipv6_get_dsfield(hdr); TCP_SKB_CB(skb)->sacked = 0; TCP_SKB_CB(skb)->has_rxtstamp = diff --git a/net/netfilter/nf_log_syslog.c b/net/netfilter/nf_log_syslog.c index 58402226045e..86d5fc5d28e3 100644 --- a/net/netfilter/nf_log_syslog.c +++ b/net/netfilter/nf_log_syslog.c @@ -216,7 +216,9 @@ nf_log_dump_tcp_header(struct nf_log_buf *m, /* Max length: 9 "RES=0x3C " */ nf_log_buf_add(m, "RES=0x%02x ", (u_int8_t)(ntohl(tcp_flag_word(th) & TCP_RESERVED_BITS) >> 22)); - /* Max length: 32 "CWR ECE URG ACK PSH RST SYN FIN " */ + /* Max length: 35 "AE CWR ECE URG ACK PSH RST SYN FIN " */ + if (th->ae) + nf_log_buf_add(m, "AE "); if (th->cwr) nf_log_buf_add(m, "CWR "); if (th->ece) @@ -516,7 +518,7 @@ dump_ipv4_packet(struct net *net, struct nf_log_buf *m, /* Proto Max log string length */ /* IP: 40+46+6+11+127 = 230 */ - /* TCP: 10+max(25,20+30+13+9+32+11+127) = 252 */ + /* TCP: 10+max(25,20+30+13+9+35+11+127) = 255 */ /* UDP: 10+max(25,20) = 35 */ /* UDPLITE: 14+max(25,20) = 39 */ /* ICMP: 11+max(25, 18+25+max(19,14,24+3+n+10,3+n+10)) = 91+n */ @@ -526,7 +528,7 @@ dump_ipv4_packet(struct net *net, struct nf_log_buf *m, /* (ICMP allows recursion one level deep) */ /* maxlen = IP + ICMP + IP + max(TCP,UDP,ICMP,unknown) */ - /* maxlen = 230+ 91 + 230 + 252 = 803 */ + /* maxlen = 230+ 91 + 230 + 255 = 806 */ } static noinline_for_stack void