Fixed invalid fix for bug #30402 (CHECKSUM_GEN_IP_INLINE does not add IP options)

This commit is contained in:
goldsimon 2010-07-21 12:11:22 +00:00
parent 960fb14bf5
commit 3c5723e49d
2 changed files with 5 additions and 1 deletions

View File

@ -229,6 +229,10 @@ HISTORY
++ Bugfixes:
2010-07-21: Simon Goldschmidt
* ip.c: Fixed invalid fix for bug #30402 (CHECKSUM_GEN_IP_INLINE does not
add IP options)
2010-07-16: Kieran Mansley
* msg_in.c: Fixed SNMP ASN constant defines to not use ! operator

View File

@ -625,7 +625,7 @@ err_t ip_output_if_opt(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest,
memset(((char*)p->payload) + optlen, 0, optlen_aligned - optlen);
}
#if CHECKSUM_GEN_IP_INLINE
for (i = 0; i < optlen_aligned; i += sizeof(u16_t)) {
for (i = 0; i < optlen_aligned/2; i++) {
chk_sum += ((u16_t*)p->payload)[i];
}
#endif /* CHECKSUM_GEN_IP_INLINE */