From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTP id 5C31C5A004F for ; Sat, 20 Jul 2024 15:55:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1721483698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z5HA7r9E8eNPRrs7uU7y/aAIvS/7i456Jz7djJOKHW0=; b=TvWC0b3lDJks61m2m4MBrEqLrVw+7g5p7cwDZDV8ZZLgWHfm+QTILyg9WDIjHX/YG8QsNA HQY59KjowZRM9wFrlxOGHrRnj/IytbtP2CNLkfqh3fTceOflgsczEYtuhxh/8EjSDk1dQX yDR6KCF//SJrxghAI0GvRZ6H6US9hFU= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-500-qV23DHgYOimxfdDDX29ArA-1; Sat, 20 Jul 2024 09:54:56 -0400 X-MC-Unique: qV23DHgYOimxfdDDX29ArA-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2213A19560B3 for ; Sat, 20 Jul 2024 13:54:56 +0000 (UTC) Received: from jmaloy-thinkpadp16vgen1.rmtcaqc.csb (unknown [10.22.32.27]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7D0D81955D47; Sat, 20 Jul 2024 13:54:54 +0000 (UTC) From: Jon Maloy To: passt-dev@passt.top, sbrivio@redhat.com, lvivier@redhat.com, dgibson@redhat.com, jmaloy@redhat.com Subject: [PATCH] tcp: probe for SO_PEEK_OFF both in tcpv4 and tcp6 Date: Sat, 20 Jul 2024 09:54:53 -0400 Message-ID: <20240720135453.2694694-1-jmaloy@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Message-ID-Hash: 542WSGKWTAUOPRS2LBSLZTW7CQT4ZQC6 X-Message-ID-Hash: 542WSGKWTAUOPRS2LBSLZTW7CQT4ZQC6 X-MailFrom: jmaloy@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: VGhlIHJlY2VudGx5IGFkZGVkIHNvY2tldCBvcHRpb24gU09fUEVFS19PRkYgaXMgbm90IHN1cHBv cnRlZCBmb3INClRDUC9JUHY2IHNvY2tldHMuIFVudGlsIHdlIGdldCB0aGF0IHN1cHBvcnQgaW50 byB0aGUga2VybmVsIHdlIG5lZWQgdG8NCnRlc3QgZm9yIHN1cHBvcnQgaW4gYm90aCBwcm90b2Nv bHMgdG8gc2V0IHRoZSBnbG9iYWwgJ3BlZWtfb2Zmc2V0X2NhcMK0DQp0byB0cnVlLg0KDQpTaWdu ZWQtb2ZmLWJ5OiBKb24gTWFsb3kgPGptYWxveUByZWRoYXQuY29tPg0KLS0tDQogdGNwLmMgfCAz NiArKysrKysrKysrKysrKys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