]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211: fix miscounting of ttl-dropped frames
authorBob Copeland <me@bobcopeland.com>
Thu, 17 Jan 2019 21:32:42 +0000 (16:32 -0500)
committerJohannes Berg <johannes.berg@intel.com>
Sat, 19 Jan 2019 08:11:44 +0000 (09:11 +0100)
commit757f915ae70aa6873ca0c67848faea0596ab49b7
tree12bcd45b0320ced690b34d47a591e33da05ba076
parentb2ce5b8a115b4781a3d1e69ed0f44b13d28c182b
mac80211: fix miscounting of ttl-dropped frames

In ieee80211_rx_h_mesh_fwding, we increment the 'dropped_frames_ttl'
counter when we decrement the ttl to zero.  For unicast frames
destined for other hosts, we stop processing the frame at that point.

For multicast frames, we do not rebroadcast it in this case, but we
do pass the frame up the stack to process it on this STA.  That
doesn't match the usual definition of "dropped," so don't count
those as such.

With this change, something like `ping6 -i0.2 ff02::1%mesh0` from a
peer in a ttl=1 network no longer increments the counter rapidly.

Signed-off-by: Bob Copeland <bobcopeland@fb.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/rx.c