Closed Vagabond closed 6 years ago
That was a convenient wrapper. Rereading the spec I think we should rather default to 0 when no duration is given instead of deleting it. Same for upnv v2 . Thoughts?
I'm torn, I hate things littering up my router with infinite leases, but infinite timeouts seem to work more consistently.
Certainly we need a way to be able to request infinite timeouts, at least. Maybe add a new clause where you can pass infinity
as a timeout value?
I have created a PR #8 for this.
My home router, a linksys nighthawk R700P only supports permanent leases:
However, when I try to get an infinite lease using a timeout of 0, the nat code tries to do a delete instead:
https://github.com/benoitc/erlang-nat/blob/master/src/natupnp_v1.erl#L129
Is this intentional? How can I obtain an infinite lease?