Skip to content

Commit e464209

Browse files
idoschgregkh
authored andcommitted
psample: Fix user API breakage
commit e43accb upstream. 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. Cc: stable@vger.kernel.org Fixes: d8bed68 ("net: psample: Add tunnel support") Signed-off-by: Ido Schimmel <idosch@nvidia.com> Reported-by: Adiel Bidani <adielb@nvidia.com> Reviewed-by: Jiri Pirko <jiri@nvidia.com> Reviewed-by: Petr Machata <petrm@nvidia.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a4be7e4 commit e464209

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎include/uapi/linux/psample.h‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,15 @@
33
#define __UAPI_PSAMPLE_H
44

55
enum {
6-
/* sampled packet metadata */
76
PSAMPLE_ATTR_IIFINDEX,
87
PSAMPLE_ATTR_OIFINDEX,
98
PSAMPLE_ATTR_ORIGSIZE,
109
PSAMPLE_ATTR_SAMPLE_GROUP,
1110
PSAMPLE_ATTR_GROUP_SEQ,
1211
PSAMPLE_ATTR_SAMPLE_RATE,
1312
PSAMPLE_ATTR_DATA,
14-
PSAMPLE_ATTR_TUNNEL,
15-
16-
/* commands attributes */
1713
PSAMPLE_ATTR_GROUP_REFCOUNT,
14+
PSAMPLE_ATTR_TUNNEL,
1815

1916
__PSAMPLE_ATTR_MAX
2017
};

0 commit comments

Comments
 (0)