Wireshark-bugs: [Wireshark-bugs] [Bug 12184] MATE AVPL match modes "Loose" and "Every" do not wo
Date: Sun, 18 Sep 2016 13:43:18 +0000
Comment # 5
on bug 12184
from Pavel Sindelka
(In reply to Peter Wu from comment #4) > What about adding this to > https://wiki.wireshark.org/Mate/Reference#Every_Match > >... > > The description on the wiki (while it might technically correct) is hard to > parse. Your comment is already an improvement, ... To the best of my memory, I was only changing the syntax of the examples, and replacing Luis' "operator" and "operand" names by "configuration AVP(L)" and "data AVP(L)" respectively. So I didn't dare to add my own examples or change the wording towards a more precise one back then, fearing that I didn't understand the author's intention deep enough. But luckily there is a better memory than mine - the wiki's own one.Revision 27 is the last one before I've started editing it. So I can see now that I may have shifted the meaning of Strict a bit. The original text was: >> A Strict match will return if and only if every AVP in the operator has at >> least one match in the operand and none fails. My edit has changed it to: >> A Strict match between AVPLs succeeds if and only if every AVP in the >> configuration AVPL has at least one counterpart in the data AVPL and none >> of the AVP matches fails. The result AVPL contains all the data AVPs that >> matched. My current understanding of how it should work is that for Strict to succeed, two (different from each other by definition) values of the same attribute may be present in the data AVPL, but it is enough that only one of them matches the condition associated to that attribute in configuration. The fact that the other value does not match the condition doesn't prevent Strict from succeeding, yet this instance of that attribute will not be part of the result AVPL. If this is also what the current code says, I will make the Wiki clear (and add some examples). The "and none fails" part makes me uncertain whether this was author's intention. But where two instances of the same attribute are part of GoP's key AVPL, each of the values in the GoP's key matches only one of the values in the candidate PDU's AVPL and the Strict match is still considered successful, so I guess such reading is correct. > ..., but for the comment in the source code I will be writing: > > There is a match if and only if for all conditions, either > (1) there are no data avps with the same attribute name or > (2) there exists a data avp with the same attribute name which matches. > (If there are no conditions, the result will be a match.) Especially the last line confirms that we share the some doubt in the Every case. The way Every is described on the Wiki, this statement is true. But while it is unlikely someone would use any type of match with an empty list of conditions, people might be surprised that condition (a=1,b=2) matches data (c=3,d=4,e=5) although it yields no result AVPL. So the question is whether an Every match with an empty result AVPL should really be considered successful or not. So yes, I will add more examples to the Wiki, but we must first be sure that they match the real behaviour.
You are receiving this mail because:
- You are watching all bug changes.
- Prev by Date: [Wireshark-bugs] [Bug 12907] Option 82 suboption 12 is displayed as Unknown in linux version of tshark
- Next by Date: [Wireshark-bugs] [Bug 12640] SSL Protocol Preferences do not save RSA key
- Previous by thread: [Wireshark-bugs] [Bug 12184] MATE AVPL match modes "Loose" and "Every" do not work correctly
- Next by thread: [Wireshark-bugs] [Bug 12184] MATE AVPL match modes "Loose" and "Every" do not work correctly
- Index(es):
- Get Wireshark
- Download
- Code of Conduct