From owner-freebsd-net@FreeBSD.ORG Tue Nov 13 06:18:03 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 563BECDF for ; Tue, 13 Nov 2012 06:18:03 +0000 (UTC) (envelope-from s.khanchi@gmail.com) Received: from mail-ia0-f182.google.com (mail-ia0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 1982A8FC0C for ; Tue, 13 Nov 2012 06:18:02 +0000 (UTC) Received: by mail-ia0-f182.google.com with SMTP id x2so531906iad.13 for ; Mon, 12 Nov 2012 22:18:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:from:date:x-google-sender-auth:message-id :subject:to:content-type; bh=gvovs2lpmGrMFaa7zxsAZQTd5BSjcLR3qGEqx0nrB1U=; b=kCkuOwJ70j7Nnv6P2Fwcb15U6GMexeqz5I76YbtBdgZkRUtvqlTyW4/uBTo6KymPCX VOjvDeKwn+eZWJx2LvgPgLVHadLncWmO5oMmlMhOeYKtccRE57oNQ0ICqKt0yxvRsW3l POcmVq2Y6pQc/pvswdIRGttb3SjJ4Ssex53pDJ5UJ6L8xwXc2Q+fA+vwWuGifdqCfrjz kXJYubQNanrZv63iEYFp1GmpN2r7xdejIxs5HQFo8PXtpD3TPvmCLZ8AeXsBNsSrciuG 0d8DLuesqjtjC41MwJyhjbNNwn6k/GoTsFyBvyxef3C9Jmt+/b1orNfp1A3tLzq0ZYDW Pl3Q== Received: by 10.50.183.167 with SMTP id en7mr10004350igc.49.1352787482342; Mon, 12 Nov 2012 22:18:02 -0800 (PST) MIME-Version: 1.0 Sender: s.khanchi@gmail.com Received: by 10.64.101.40 with HTTP; Mon, 12 Nov 2012 22:17:42 -0800 (PST) From: h bagade Date: Tue, 13 Nov 2012 09:47:42 +0330 X-Google-Sender-Auth: De_X42azwPtP4JhPdqkCY4HOwws Message-ID: Subject: setting ToS byte using ng_patch doesn't works well! To: freebsd-net@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 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 Nov 2012 06:18:03 -0000 Hi all, I've encountered a problem using ng_patch which I don't know how to find out the cause to solve it. I hope you could help me to find in what aspects I should focus! The problem is that in some cases the ng_patch works well for setting ToS byte but sometime it doesn't. for example: netgraph settings: kldload ng_ipfw ngctl mkpeer ipfw: patch 300 in ngctl name ipfw:300 tos ngctl msg tos: setconfig {count=1 csum_flags=1 ops=[ {mode=1 value=0x05 length=1 offset=1}]} -------------------------------- ipfw rule: ipfw add 20 netgraph 300 icmp from any to any by the above settings I've got several results. I've checked the settings on different hardwares and different FreeBSD versions! In some configurations it works well but on others, I have one-way ping connection or no ping connection at all! when changing the rule to set ToS to zero, all configurations works well! I've done these different tests to find out which factors impacts on ng_patch functionality but couldn't find out a fixed reason! Can you suggest me some factors to be taken in to consideration when I'm testing ToS setting?