2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-30 22:05:19 +00:00

dpif-netdev: Handle ECN bits when updating IP checksum.

When recalculating the checksum after a set ToS action, we were
not taking into account the ECN bits copied from the original header.
This commit is contained in:
Jean Tourrilhes
2010-12-08 22:05:07 -08:00
committed by Jesse Gross
parent 05abb769d3
commit 3d785a2421

View File

@@ -1089,7 +1089,7 @@ dp_netdev_set_nw_tos(struct ofpbuf *packet, struct flow *key,
uint8_t new = a->nw_tos | (nh->ip_tos & IP_ECN_MASK);
nh->ip_csum = recalc_csum16(nh->ip_csum, htons((uint16_t)*field),
htons((uint16_t)a->nw_tos));
htons((uint16_t) new));
*field = new;
}
}