diff options
-rw-r--r-- | src/platform/nm-linux-platform.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 268276d1cf..f2acf67dff 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -36,7 +36,6 @@ #include <linux/if_link.h> #include <linux/if_tun.h> #include <linux/if_tunnel.h> -#include <linux/tc_act/tc_defact.h> #include <netlink/netlink.h> #include <netlink/msg.h> #include <libudev.h> @@ -55,6 +54,29 @@ #include "nm-utils/unaligned.h" #include "nm-utils/nm-udev-utils.h" +/*****************************************************************************/ + +/* re-implement <linux/tc_act/tc_defact.h> to build against kernel + * headers that lack this. */ + +#include <linux/pkt_cls.h> + +struct tc_defact { + tc_gen; +}; + +enum { + TCA_DEF_UNSPEC, + TCA_DEF_TM, + TCA_DEF_PARMS, + TCA_DEF_DATA, + TCA_DEF_PAD, + __TCA_DEF_MAX +}; +#define TCA_DEF_MAX (__TCA_DEF_MAX - 1) + +/*****************************************************************************/ + #define VLAN_FLAG_MVRP 0x8 /* nm-internal error codes for libnl. Make sure they don't overlap. */ @@ -2923,7 +2945,7 @@ _add_action_simple (struct nl_msg *msg, if (!(act_options = nla_nest_start (msg, TCA_ACT_OPTIONS))) goto nla_put_failure; - NLA_PUT (msg, TCA_DEF_PARMS, sizeof(sel), &sel); + NLA_PUT (msg, TCA_DEF_PARMS, sizeof (sel), &sel); NLA_PUT_STRING (msg, TCA_DEF_DATA, simple->sdata); nla_nest_end (msg, act_options); |