Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Adding mapping with lifetime 0 #78

Open
DigDugFTW opened this issue May 31, 2018 · 1 comment
Open

Adding mapping with lifetime 0 #78

DigDugFTW opened this issue May 31, 2018 · 1 comment

Comments

@DigDugFTW
Copy link

Adding a mapping with lifetime 0 works once mapped, but when the mapping collection is enumerated it throws an "ArgumentOutOfRangeException" stating that lifetime was out of range of valid values.

I created a mapping a couple of hours ago, the mapping doesn't last infinitely and can be over written.

I only created a mapping with lifetime 0 because intellisense stated that for the lifetime parameter setting it to 0 would be permanent or infinite.

@lontivero
Copy link
Owner

I created a mapping a couple of hours ago, (1) the mapping doesn't last infinitely and (2) can be over written.

(1) Open.Nat doesn't control what your router does, your router's software does it. The library simple performs a request to your router's http server for opening a port, how it handles the request and what it does after that is out of the library control and is different from router to router. The spec says that a lifetime=0 should keep the port opened.

(2) Yes, it can be over written, otherwise client software would never extend the expiration date or remove mappings once they are not needed any more.

Adding a mapping with lifetime 0 works once mapped, but when the mapping collection is enumerated it throws an "ArgumentOutOfRangeException" stating that lifetime was out of range of valid values.

Ummm... this looks like a defect. Could you share the log file please? In case you don't know how enable the tracing, take a look at this config file: https://github.com/lontivero/Open.NAT/blob/master/Open.Nat.ConsoleTest/app.config

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants