From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23828 invoked by alias); 10 Jun 2015 08:48:52 -0000 Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org Received: (qmail 23800 invoked by uid 89); 10 Jun 2015 08:48:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: mail.ecoscentric.com Received: from albus.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.200) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 10 Jun 2015 08:48:48 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id A5A06A831BA for ; Wed, 10 Jun 2015 09:48:44 +0100 (BST) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (albus.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id klsclllo7mBX; Wed, 10 Jun 2015 09:48:43 +0100 (BST) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001656] FreeBSD: add AF_PACKET socket familiy Date: Wed, 10 Jun 2015 08:48:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: bernd.edlinger@hotmail.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: high X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-06/txt/msg00000.txt.bz2 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001656 --- Comment #22 from Bernd Edlinger --- Created attachment 2598 --> http://bugs.ecos.sourceware.org/attachment.cgi?id=2598&action=edit Bug-Fixes for Achilles Test Hi, I have been doing some Testing with an Achilles System here on an eCos / eCosPro Target recently. See http://www.wurldtech.com I was able to fix a few anomalies that were found in these tests. The attached patch file is meant to be applied in addition to the previous patches. Here are some explanations, what this patch does: * src/sys/netinet/ip_icmp.c: - fix crash in Achilles UDP Fuzzer test. This test sent an UDP packet with maximum size IP header. The bsd stack tried to send an ICMP unreachable response. But it triggered this panic, in the icmp_error handler: if (m->m_data - sizeof(struct ip) < m->m_pktdat) panic("icmp len"); That is because the maximum payload of a MBUF with m_hdr and pkthdr is MHLEN = 128-20-24 = 84 bytes, but the ICMP response should contain an 8 bytes ICMP header, plus the original IP header and up to 8 bytes of the original UDP header, and of course the minimum IP header in front: That can be up to 20 + 8 + 60 + 8 = 96 bytes. This patch throws this packet away, instead of crashing. * src/sys/netinet/tcp_input.c: - fix the Achilles test cases: - TCP SYN Storm from Broadcast (L2) - TCP Data Grammar (L2) M_BCAST/M_MCAST is only set if ethernet header is a BCAST address ff:ff:ff:ff:ff:ff. but Achilles sends UNICAST ethernet header with network local broad cast 172.17.255.255 addresses in the IP header source address field, and the bsd_stack sent back to the unicast ethernet address with IP bcast address in IP destination field. This avoids sending SYN/ACK and RST packets to broadcast addresses. I have no idea what do to about the "normal" TCP SYN Storm Test: This is still failing, because we do not have tcp_syncookies. * include/net/if.h, src/sys/netinet/if_ether.c: - increase IFQ_MAXLEN to 1024 - and use it also for the ARP request queue This is necessary to pass the UDP Data Grammar tests, which send 64KB UDP packets (which has 46 fragments) and if the IFQ_MAXLEN is at 50 this leaves too little headroom for additional ICMP and UDP packets, which must be handled to pass the test. In order to pass the ICMP and ARP storm tests, you have to allocate _many_ (>3000) MBUFs, and using a too small IFQ_MAXLEN would throw away some important packets, which may cause the test to fail. -- You are receiving this mail because: You are on the CC list for the bug.