From owner-freebsd-net@FreeBSD.ORG Tue Apr 13 13:30:50 2010 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 279641065675 for ; Tue, 13 Apr 2010 13:30:50 +0000 (UTC) (envelope-from jacques.fourie@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id B7B4B8FC22 for ; Tue, 13 Apr 2010 13:30:49 +0000 (UTC) Received: by wyb28 with SMTP id 28so1420024wyb.13 for ; Tue, 13 Apr 2010 06:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:received:message-id :subject:from:to:content-type; bh=YjKs5JgxHLWUH2GfeM0bxOzSGK8TyWSEYuW9EOzYuz0=; b=IdRzqOrCB2WxJ6PDLxDNcws1l/cJwRnHGg3NFGvjKy2LdaYMi1n1WXgkVqq+jZ7DqZ bhxRQ6VH/CJKHzwG7R12EiISlijcRw4XjBhWR9o/tHTWhzx2qZA0yBTvWI953WUMynD+ t/VnIbp8BzVCDHJ/+bQ33Rhi3Hg+/ctjoHY7U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=LGabtBI7W0l7UjUp43myOVob6kpRfBma+Qd7skZQvmXQiFCgFTUbWGX5TQTgdogMcB GcWWGz/EkNHEonhEZXVLApdcxeWtKY4VzVrAKVDXDQI1EEFrunYRzNvSODau97qljvsK oEO5aCnSE+OTCrsR13nfsDxgWsMCgNUK1wrIc= MIME-Version: 1.0 Received: by 10.216.12.78 with HTTP; Tue, 13 Apr 2010 06:30:42 -0700 (PDT) Date: Tue, 13 Apr 2010 15:30:42 +0200 Received: by 10.216.90.141 with SMTP id e13mr3372955wef.166.1271165446311; Tue, 13 Apr 2010 06:30:46 -0700 (PDT) Message-ID: From: Jacques Fourie To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: m_copymdata() bug? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2010 13:30:50 -0000 It seems as if the m_copymdata() function defined in uipc_mbuf.c has a bug. It uses m_apply to copy data from the source mbuf to the target but in the callback function m_bcopyxxx() the arguments are interpreted in the wrong order. Swapping the 's' and 't' arguments in the declaration of m_bcopyxxx() fixes the problem for me.