google / packetdrill

The official Google release of packetdrill
GNU General Public License v2.0
887 stars 220 forks source link

packetdrill: fix compilation/runtime error for linux 3.x #34

Closed nealcardwell closed 4 years ago

nealcardwell commented 4 years ago

For linux 3.10, TCP_CC_INFO and SO_MEMINFO are not supported. When we define HAVE_SO_MEMINFO / HAVE_TCP_CC_INFO as 0, functions like write_tcp_bbr_cc_info and write_so_meminfo will not be accessed. So wrap them with #ifdef and #endif.

Also, for lower linux version, tcp_info option value has less fields(e.g. 120 bytes). So remove the size assert.

This commit is based on the following packetdrill upstream pull request, with a slightly tweaked commit description: https://github.com/google/packetdrill/pull/13

Signed-off-by: Neal Cardwell ncardwell@google.com Change-Id: I2f4f8cea7357356f2041eabed044b6f7616d4e91

googlebot commented 4 years ago

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.