Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Nov 2012 09:47:42 +0330
From:      h bagade <bagadeh@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   setting ToS byte using ng_patch doesn't works well!
Message-ID:  <CAARSjE3AyLwEk0ZD_mdKL-mQZLWL6qBJ%2BgH%2BsnqrR8zpF2QwaA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAARSjE3AyLwEk0ZD_mdKL-mQZLWL6qBJ%2BgH%2BsnqrR8zpF2QwaA>