[Nfd-dev] Incorrect handling of exclude filter in CS lookup

Wentao Shang wentaoshang at gmail.com
Fri Mar 20 00:02:20 PDT 2015


Hi Junxiao,

I found this problem on iOS using an "incorrect" implementation of the
FaceStatus Dataset consumer. I'm not sure how to reproduce this error on
normal computers yet. But here is a dump of log messages from NFD (this is
the best I can get to describe the problem...):


2015-03-19 23:49:20.532 NFD[5139:69230] TRACE: [TcpLocalFace]
[id=257,local=tcp4://127.0.0.1:6363,remote=tcp4://127.0.0.1:51868]
Received: 63 bytes

2015-03-19 23:49:20.532 NFD[5139:69230] DEBUG: [Forwarder]
onIncomingInterest face=257
interest=/localhost/nfd/faces/list?ndn.ChildSelector=1&ndn.InterestLifetime=1000&ndn.Nonce=1313767654&ndn.Exclude=...,%FD%00%00%01L5%F1K%21


2015-03-19 23:49:20.533 NFD[5139:69230] DEBUG: [ContentStore] find
/localhost/nfd/faces/list R

2015-03-19 23:49:20.533 NFD[5139:69230] TRACE: [ContentStore]
find-under-prefix /localhost/nfd/faces/list/%FD%00%00%01L5%F1K%21

2015-03-19 23:49:20.533 NFD[5139:69230] TRACE: [ContentStore]
find-under-prefix /localhost/nfd/faces/list/%FD%00%00%01L5%F1%3D%BF

2015-03-19 23:49:20.533 NFD[5139:69230] DEBUG: [ContentStore] matching
/localhost/nfd/faces/list/%FD%00%00%01L5%F1%3D%BF/%00%00

2015-03-19 23:49:20.533 NFD[5139:69230] DEBUG: [Forwarder] onOutgoingData
face=257 data=/localhost/nfd/faces/list/%FD%00%00%01L5%F1%3D%BF/%00%00

2015-03-19 23:49:20.534 NFD[5139:69230] TRACE: [TcpLocalFace]
[id=257,local=tcp4://127.0.0.1:6363,remote=tcp4://127.0.0.1:51868] sendData

2015-03-19 23:49:20.534 NFD[5139:69230] TRACE: [TcpLocalFace]
[id=257,local=tcp4://127.0.0.1:6363,remote=tcp4://127.0.0.1:51868]
Successfully sent: 724 bytes

2015-03-19 23:49:20.637 NFD[5139:69230] DEBUG: [Forwarder]
onInterestFinalize interest=/localhost/nfd/faces/list satisfied

You can see that I sent an Interest with exclude filter of [ANY,
%FD%00%00%01L5%F1K%21]. But somehow NFD decided to match this interest to
the data with suffix "%FD%00%00%01L5%F1%3D%BF/%00%00". Note that
"%FD%00%00%01L5%F1K%21" is larger than "%FD%00%00%01L5%F1%3D%BF" because
'K' == 0x4B. So this data should have been filtered out...

Thanks,
Wentao

On Thu, Mar 19, 2015 at 10:49 PM Junxiao Shi <shijunxiao at email.arizona.edu>
wrote:

> Hi Wentao
>
> As of NFD:commit:eab7249b74d4819f9dc32e2f2d12d392f36acdc1:
>
>    - Cs::find returns an Entry only if Entry::canSatisfy returns true;
>    this condition is checked in both Cs::findLeftmost and
>    Cs::findRightmostAmongExact.
>    - Entry::canSatisfy returns true only if Interest::matchesData returns
>    true.
>    - Interest::matchesData evaluates the Exclude Selector.
>
>
> If you have a problematic case, please open a Bug on NFD Redmine site.
> The Bug report should contain a concise code snippet or tcpdump trace that
> reproduces the problem.
>
> Yours, Junxiao
>
> On Thu, Mar 19, 2015 at 10:28 PM, Wentao Shang <wentaoshang at gmail.com>
> wrote:
>
>> Hi team,
>>
>> When I was testing NFD on iOS, I noticed that NFD doesn't seem to handle
>> Exclude filter correctly in CS lookup. I looked into the code and noticed
>> that in ./daemon/table/cs.cpp, the Cs::find method only handles the child
>> selector but never checks the exclude filter. And I suspect this is a bug.
>> Can someone verify whether this is a real issue or the exclude filter is
>> actually checked somewhere else? If it's a "feature not a bug", I wonder
>> what is the reason behind the design decision to leave out exclude filter
>> in CS lookup.
>>
>> Thanks,
>> Wentao
>>
>> _______________________________________________
>> Nfd-dev mailing list
>> Nfd-dev at lists.cs.ucla.edu
>> http://www.lists.cs.ucla.edu/mailman/listinfo/nfd-dev
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/nfd-dev/attachments/20150320/8bd02f97/attachment.html>


More information about the Nfd-dev mailing list