From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1921) id 333293857825; Mon, 11 Jul 2022 11:54:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 333293857825 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Sebastian Huber To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] pf: syncookie support X-Act-Checkin: newlib-cygwin X-Git-Author: Kristof Provost X-Git-Refname: refs/heads/master X-Git-Oldrev: b89c5a3e88c6ba876dd0d4ffedc49b17040c903c X-Git-Newrev: 5260d10c985fd87e1d1aaed3c437cf272af024e0 Message-Id: <20220711115445.333293857825@sourceware.org> Date: Mon, 11 Jul 2022 11:54:45 +0000 (GMT) X-BeenThere: newlib-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib GIT logs List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jul 2022 11:54:45 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D5260d10c985= fd87e1d1aaed3c437cf272af024e0 commit 5260d10c985fd87e1d1aaed3c437cf272af024e0 Author: Kristof Provost Date: Thu May 20 11:54:41 2021 +0200 pf: syncookie support =20 Import OpenBSD's syncookie support for pf. This feature help pf resist TCP SYN floods by only creating states once the remote host completes the TCP handshake rather than when the initial SYN packet is received. =20 This is accomplished by using the initial sequence numbers to encode a cookie (hence the name) in the SYN+ACK response and verifying this on receipt of the client ACK. =20 Reviewed by: kbowling Obtained from: OpenBSD MFC after: 1 week Sponsored by: Modirum MDPay Differential Revision: https://reviews.freebsd.org/D31138 Diff: --- newlib/libc/sys/rtems/include/netinet/tcp.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/newlib/libc/sys/rtems/include/netinet/tcp.h b/newlib/libc/sys/= rtems/include/netinet/tcp.h index 45bece9fa..a79dbeaad 100644 --- a/newlib/libc/sys/rtems/include/netinet/tcp.h +++ b/newlib/libc/sys/rtems/include/netinet/tcp.h @@ -105,6 +105,8 @@ struct tcphdr { #define TCPOPT_FAST_OPEN 34 #define TCPOLEN_FAST_OPEN_EMPTY 2 =20 +#define MAX_TCPOPTLEN 40 /* Absolute maximum TCP options len */ + /* Miscellaneous constants */ #define MAX_SACK_BLKS 6 /* Max # SACK blocks stored at receiver side */ #define TCP_MAX_SACK 4 /* MAX # SACKs sent in any segment */