Do not fragment a packet with hardware assistance if it has the DF

bit set.

Reviewed by:	sam (mentor)
This commit is contained in:
andre 2003-11-12 23:35:40 +00:00
parent c6fd0f8803
commit 39849f80f8

View File

@ -1011,7 +1011,8 @@ pass:
* If small enough for interface, or the interface will take
* care of the fragmentation for us, can just send directly.
*/
if (ip->ip_len <= ifp->if_mtu || ifp->if_hwassist & CSUM_FRAGMENT) {
if (ip->ip_len <= ifp->if_mtu || (ifp->if_hwassist & CSUM_FRAGMENT &&
((ip->ip_off & IP_DF) == 0))) {
ip->ip_len = htons(ip->ip_len);
ip->ip_off = htons(ip->ip_off);
ip->ip_sum = 0;