Cited commit added a new attribute before the existing group reference count attribute, thereby changing its value and breaking existing applications on new kernels. Before: # psample -l libpsample ERROR psample_group_foreach: failed to recv message: Operation not supported After: # psample -l Group Num Refcount Group Seq 1 1 0 Fix by restoring the value of the old attribute and remove the misleading comments from the enumerator to avoid future bugs.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -3,7 +3,6 @@ · 2 unmodified lines | |||
| 3 | #define __UAPI_PSAMPLE_H | 3 | #define __UAPI_PSAMPLE_H |
| 4 | 4 | ||
| 5 | enum { | 5 | enum { |
| 6 | /* sampled packet metadata */ | ||
| 7 | PSAMPLE_ATTR_IIFINDEX, | 6 | PSAMPLE_ATTR_IIFINDEX, |
| 8 | PSAMPLE_ATTR_OIFINDEX, | 7 | PSAMPLE_ATTR_OIFINDEX, |
| 9 | PSAMPLE_ATTR_ORIGSIZE, | 8 | PSAMPLE_ATTR_ORIGSIZE, |
| @@ -11,10 +10,8 @@ enum { · 1 unmodified line | |||
| 11 | PSAMPLE_ATTR_GROUP_SEQ, | 10 | PSAMPLE_ATTR_GROUP_SEQ, |
| 12 | PSAMPLE_ATTR_SAMPLE_RATE, | 11 | PSAMPLE_ATTR_SAMPLE_RATE, |
| 13 | PSAMPLE_ATTR_DATA, | 12 | PSAMPLE_ATTR_DATA, |
| 14 | PSAMPLE_ATTR_TUNNEL, | ||
| 15 | |||
| 16 | /* commands attributes */ | ||
| 17 | PSAMPLE_ATTR_GROUP_REFCOUNT, | 13 | PSAMPLE_ATTR_GROUP_REFCOUNT, |
| 14 | PSAMPLE_ATTR_TUNNEL, | ||
| 18 | 15 | ||
| 19 | __PSAMPLE_ATTR_MAX | 16 | __PSAMPLE_ATTR_MAX |
| 20 | }; | 17 | }; |