named-data / YaNFD

Yet another Named Data Networking Forwarding Daemon
https://pkg.go.dev/github.com/named-data/YaNFD
MIT License
12 stars 10 forks source link

YaNFD Route Issue #9

Closed zjkmxy closed 3 years ago

zjkmxy commented 3 years ago

TL;DR

When an application face is closed, YaNFD may fail to remove the corresponding route.

Steps to reproduce the error

  1. Start YaNFD: sudo ./YaNFD
  2. Run python-ndn sample producer: pipenv run python examples/producer.py
  3. Run python-ndn sample consumer: pipenv run python examples/consumer.py
  4. Observe that the producer receives the Interest, and the consumer receives the Data.
  5. Shut down the producer by Ctrl+C.
  6. Restart the producer: pipenv run python examples/producer.py
  7. Run the consumer again: pipenv run python examples/consumer.py

Actual results

The producer does not receive the Interest. Consequently, the consumer cannot receive any Data. The log of YaNFD is as follows:

  INFO[0000] [Main] Created UDP listener for fe80::7804:bb62:f6b7:cde9%utun1 on utun1
  INFO[0000] [Main] Created Unix stream listener for /var/run/nfd.sock
  INFO[0000] [UnixStreamListener, unix:///var/run/nfd.sock] Listening
  INFO[0006] [UnixStreamTransport, FaceID=0, RemoteURI=fd://1, LocalURI=unix:///var/run/nfd.sock] state: Down -> Up
  INFO[0006] [UnixStreamListener, unix:///var/run/nfd.sock] Accepting new Unix stream face fd://1
  INFO[0006] [RIBMgmt] Created route for Prefix=/example/testApp, FaceID=16, Origin=0, Cost=0, Flags=0x1
  INFO[0010] [UnixStreamTransport, FaceID=0, RemoteURI=fd://2, LocalURI=unix:///var/run/nfd.sock] state: Down -> Up
  INFO[0010] [UnixStreamListener, unix:///var/run/nfd.sock] Accepting new Unix stream face fd://2
  INFO[0010] [UnixStreamTransport, FaceID=17, RemoteURI=fd://2, LocalURI=unix:///var/run/nfd.sock] state: Up -> Down
  INFO[0010] [UnixStreamTransport, FaceID=17, RemoteURI=fd://2, LocalURI=unix:///var/run/nfd.sock] Closing Unix stream socket
  INFO[0015] [UnixStreamTransport, FaceID=16, RemoteURI=fd://1, LocalURI=unix:///var/run/nfd.sock] state: Up -> Down
  INFO[0015] [UnixStreamTransport, FaceID=16, RemoteURI=fd://1, LocalURI=unix:///var/run/nfd.sock] Closing Unix stream socket
  INFO[0021] [UnixStreamTransport, FaceID=0, RemoteURI=fd://3, LocalURI=unix:///var/run/nfd.sock] state: Down -> Up
  INFO[0021] [UnixStreamListener, unix:///var/run/nfd.sock] Accepting new Unix stream face fd://3
  INFO[0021] [RIBMgmt] Created route for Prefix=/example/testApp, FaceID=18, Origin=0, Cost=0, Flags=0x1
  INFO[0031] [UnixStreamTransport, FaceID=0, RemoteURI=fd://4, LocalURI=unix:///var/run/nfd.sock] state: Down -> Up
  INFO[0031] [UnixStreamListener, unix:///var/run/nfd.sock] Accepting new Unix stream face fd://4
 ERROR[0031] [FwThread-3] Non-existent nexthop FaceID=16 for Interest=/example/testApp/randomData/t=1625514215955 - DROP
  INFO[0037] [UnixStreamTransport, FaceID=19, RemoteURI=fd://4, LocalURI=unix:///var/run/nfd.sock] state: Up -> Down
  INFO[0037] [UnixStreamTransport, FaceID=19, RemoteURI=fd://4, LocalURI=unix:///var/run/nfd.sock] Closing Unix stream socket

FaceID 16 and 18 are producers, ID 17 and 19 are consumers.

Platform

Observed on MacOS Big Sur 11.4 and Windows 11 dev.