Date: Thu, 17 Aug 2017 21:40:57 +0000 From: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> To: "Gopakumar Pillai" <gpillai@vmware.com> Cc: "freebsd-net@FreeBSD.org" <freebsd-net@FreeBSD.org> Subject: Re: Only last IP frag sent if ARP entry absent Message-ID: <43CC3432-DB42-4170-B3E7-E305561973F3@lists.zabbadoz.net> In-Reply-To: <F9ABB88D-108D-4EF0-8962-091662F488FD@vmware.com> References: <F9ABB88D-108D-4EF0-8962-091662F488FD@vmware.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 17 Aug 2017, at 21:16, Gopakumar Pillai wrote: > Hi FreeBSD Networking Gurus, > I came across an issue with an old version of FreeBSD and looking at > the latest FreeBSD code, seems it exists even now. I am assuming that > this issue is not reported. > > Observation: > When a ping was performed with larger payload than MTU, the first ping > failed when the ARP entry was absent for that IP. That is because ping/ICMP has no retransmit. > Noticed on the wire that the last IP fragment was sent for the first > request and then the subsequent requests were fine. > > Root Cause: > * ip_output fragments the packets and loops through the fragments to > send them to ether_output. > * ether_output does an arpresolve and if there is no existing ARP > entry it'll return EWOULDBLOCK after sending ARP Request. > * ether_output ignores the error and propagates success to ip_output > and it continues to send the remaining fragments. > * llentry keeps only one mbuf and the last fragment is retained when > the ARP Reply comes and the fragment is sent. Yes, according to the spec (RFC) we are supposed to throw the packet away entirely and simply report that to the next upper layer. However over the years people realised that this sucks for a TCP SYN packet with a retransmit timer and hence we store one of them. A large UDP packet would btw see the same behaviour to your ping. There’s no guarantee any of these packets will not be dropped anywhere on the network, so we can as well. Just my 2ct /bz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43CC3432-DB42-4170-B3E7-E305561973F3>