History

psample: Fix user API breakage

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.

Ido Schimmel committed 5 years ago

Commit e43accb1 parent bf459471 file · +1 −4Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/psample.h+1−4
@@ -3,7 +3,6 @@ · 2 unmodified lines
3#define __UAPI_PSAMPLE_H3#define __UAPI_PSAMPLE_H
4 4
5enum {5enum {
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_MAX16 __PSAMPLE_ATTR_MAX
20};17};

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t