<div dir="ltr"><div dir="ltr">At Fri, 7 Dec 2018 08:48:36 -0800,<br>Warren Kumari <<a href="mailto:warren@kumari.net">warren@kumari.net</a>> wrote:<br><br>> > * Jakob Dhondt:<br>> ><br>> > > I have just noticed that when using dig (different versions) on Mac OS<br>> > > (High Sierra) over IPv6 the source port is not randomized.<br>> <br>> <br>> Hmmm. I’d never noticed that, but I certainly wouldn’t have expected it -<br>> I’m also wondering *how* it is doing this — to increment by 2 it sounds<br>> like there is state being kept - perhaps dig simply relies on the kernel<br>> for the source port and isn’t randomizing at all ( and so the difference is<br>> actually OS difference, and not dig differences?<br><br>dig directly uses a lower-level network API and handles anything above<br>it by itself (I guess that's because it wants to handle some invalid<br>cases like QID mismatch), so it's not surprising that it simply leaves<br>things like port randomization to the OS kernel.  I don't know if it<br>intentionally skips randomization, though - probably not, but that<br>doesn't matter much in practice either.<br><br>--<br>JINMEI, Tatuya<br></div></div>