• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NAT-PMP Broadcast Address?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NAT-PMP Broadcast Address?


  • Subject: Re: NAT-PMP Broadcast Address?
  • From: james woodyatt <email@hidden>
  • Date: Wed, 12 Sep 2007 12:48:10 -0700

On Sep 12, 2007, at 12:00, email@hidden wrote:

NAT-PMP does have a problem though, because it doesn't take into account that many processes share a machine. So the best I can really do is, try to get a port, and I might get into contention with another process, which will try to update it when half the lifetime is up. This is why there should have been a query command, to at least see if a port is in use by the machine. I guess that what will most likely happen is, both processes will get the port, with say external port 10000 mapped to internal port 5000 for process A, and port 20000 mapped to internal port 5000 for process B. If they both request the same port, they will get it, just with different lifetimes most likely, so no harm done. However, if my app tears down a mapping, it could close any TCP connections the other process is using on the port. I don't think there is any way to resolve this problem.

I don't see the problem you're describing. In the event two processes bind sockets to the same private port on the same machine, e.g. 5000/tcp, only one of them gets to put the socket into the LISTEN state. The other would normally get an EADDRINUSE error on the bind call, though it's possible that SO_REUSEPORT could override that. In any case, only one process will receive the incoming connections. This is true whether NAT-PMP is involved or not.



-- james woodyatt <email@hidden> member of technical staff, communications engineering


_______________________________________________ Do not post admin requests to the list. They will be ignored. Macnetworkprog mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >NAT-PMP Broadcast Address? (From: email@hidden)
 >Re: NAT-PMP Broadcast Address? (From: Matt Slot <email@hidden>)
 >Re: NAT-PMP Broadcast Address? (From: email@hidden)

  • Prev by Date: Re: NAT-PMP Broadcast Address?
  • Next by Date: Re: NAT-PMP Broadcast Address?
  • Previous by thread: Re: NAT-PMP Broadcast Address?
  • Next by thread: Re: NAT-PMP Broadcast Address?
  • Index(es):
    • Date
    • Thread