ndisc: mark NMIcmpv6RouterPref enum as _nm_packed

We embed values of this type in structs. Let's pack it
to only use one byte.
This commit is contained in:
Thomas Haller 2021-01-21 08:56:43 +01:00
parent 8a3310043b
commit de9e570cb1
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -559,7 +559,7 @@ char * nm_utils_format_con_diff_for_audit(GHashTable *diff);
/* this enum is compatible with ICMPV6_ROUTER_PREF_* (from <linux/icmpv6.h>,
* the values for netlink attribute RTA_PREF) and "enum ndp_route_preference"
* from <ndp.h>. */
typedef enum {
typedef enum _nm_packed {
NM_ICMPV6_ROUTER_PREF_MEDIUM = 0x0, /* ICMPV6_ROUTER_PREF_MEDIUM */
NM_ICMPV6_ROUTER_PREF_LOW = 0x3, /* ICMPV6_ROUTER_PREF_LOW */
NM_ICMPV6_ROUTER_PREF_HIGH = 0x1, /* ICMPV6_ROUTER_PREF_HIGH */