Hello,
While troubleshooting racoon's behavior with multiple clients behind a same NAT gateway, I was experimenting with pf's nat capabilities.
Upon that occasion, I noticed that UDP source port 500 is never translated by pf.
Looking in xnu-2782.40.9, I found this one at line 3235 of bsd/net/pf.c:
/--- Never float IKE source port ---*/
if (ntohs(sxport->port) == PF_IKE_PORT) {
nxport->port = sxport->port;
return (0);
}
According to the surrounding code, this is the only exception for UDP packets, and it is a hard-coded one.
Is that code ("pf.c") the one in use for compiling the kernel?
If yes, what's the rationale for such an hardcoded exception?
TIA,
Axel