diff --git a/include/ynl-c/devlink.h b/include/ynl-c/devlink.h index b54ee40..e08ff69 100644 --- a/include/ynl-c/devlink.h +++ b/include/ynl-c/devlink.h @@ -678,6 +678,7 @@ static inline void devlink_port_set_req_set_port_function_hw_addr(struct devlink_port_set_req *req, const void *hw_addr, size_t len) { + req->_present.port_function = 1; free(req->port_function.hw_addr); req->port_function._present.hw_addr_len = len; req->port_function.hw_addr = malloc(req->port_function._present.hw_addr_len); diff --git a/include/ynl-c/ethtool.h b/include/ynl-c/ethtool.h index ebaf14f..4342195 100644 --- a/include/ynl-c/ethtool.h +++ b/include/ynl-c/ethtool.h @@ -238,6 +238,7 @@ static inline void ethtool_strset_get_req_set_header_dev_name(struct ethtool_strset_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -257,6 +258,7 @@ __ethtool_strset_get_req_set_stringsets_stringset(struct ethtool_strset_get_req struct ethtool_stringset_ *stringset, unsigned int n_stringset) { + req->_present.stringsets = 1; free(req->stringsets.stringset); req->stringsets.stringset = stringset; req->stringsets.n_stringset = n_stringset; @@ -316,6 +318,7 @@ static inline void ethtool_strset_get_req_dump_set_header_dev_name(struct ethtool_strset_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -335,6 +338,7 @@ __ethtool_strset_get_req_dump_set_stringsets_stringset(struct ethtool_strset_get struct ethtool_stringset_ *stringset, unsigned int n_stringset) { + req->_present.stringsets = 1; free(req->stringsets.stringset); req->stringsets.stringset = stringset; req->stringsets.n_stringset = n_stringset; @@ -385,6 +389,7 @@ static inline void ethtool_linkinfo_get_req_set_header_dev_name(struct ethtool_linkinfo_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -455,6 +460,7 @@ static inline void ethtool_linkinfo_get_req_dump_set_header_dev_name(struct ethtool_linkinfo_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -531,6 +537,7 @@ static inline void ethtool_linkinfo_set_req_set_header_dev_name(struct ethtool_linkinfo_set_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -616,6 +623,7 @@ static inline void ethtool_linkmodes_get_req_set_header_dev_name(struct ethtool_linkmodes_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -695,6 +703,7 @@ static inline void ethtool_linkmodes_get_req_dump_set_header_dev_name(struct ethtool_linkmodes_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -779,6 +788,7 @@ static inline void ethtool_linkmodes_set_req_set_header_dev_name(struct ethtool_linkmodes_set_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -819,6 +829,8 @@ __ethtool_linkmodes_set_req_set_ours_bits_bit(struct ethtool_linkmodes_set_req * struct ethtool_bitset_bit *bit, unsigned int n_bit) { + req->_present.ours = 1; + req->ours._present.bits = 1; free(req->ours.bits.bit); req->ours.bits.bit = bit; req->ours.bits.n_bit = n_bit; @@ -842,6 +854,8 @@ __ethtool_linkmodes_set_req_set_peer_bits_bit(struct ethtool_linkmodes_set_req * struct ethtool_bitset_bit *bit, unsigned int n_bit) { + req->_present.peer = 1; + req->peer._present.bits = 1; free(req->peer.bits.bit); req->peer.bits.bit = bit; req->peer.bits.n_bit = n_bit; @@ -924,6 +938,7 @@ static inline void ethtool_linkstate_get_req_set_header_dev_name(struct ethtool_linkstate_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -997,6 +1012,7 @@ static inline void ethtool_linkstate_get_req_dump_set_header_dev_name(struct ethtool_linkstate_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -1051,6 +1067,7 @@ static inline void ethtool_debug_get_req_set_header_dev_name(struct ethtool_debug_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -1112,6 +1129,7 @@ static inline void ethtool_debug_get_req_dump_set_header_dev_name(struct ethtool_debug_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -1179,6 +1197,7 @@ static inline void ethtool_debug_set_req_set_header_dev_name(struct ethtool_debug_set_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -1212,6 +1231,8 @@ __ethtool_debug_set_req_set_msgmask_bits_bit(struct ethtool_debug_set_req *req, struct ethtool_bitset_bit *bit, unsigned int n_bit) { + req->_present.msgmask = 1; + req->msgmask._present.bits = 1; free(req->msgmask.bits.bit); req->msgmask.bits.bit = bit; req->msgmask.bits.n_bit = n_bit; @@ -1250,6 +1271,7 @@ static inline void ethtool_wol_get_req_set_header_dev_name(struct ethtool_wol_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -1313,6 +1335,7 @@ static inline void ethtool_wol_get_req_dump_set_header_dev_name(struct ethtool_wol_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -1381,6 +1404,7 @@ static inline void ethtool_wol_set_req_set_header_dev_name(struct ethtool_wol_set_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -1413,6 +1437,8 @@ __ethtool_wol_set_req_set_modes_bits_bit(struct ethtool_wol_set_req *req, struct ethtool_bitset_bit *bit, unsigned int n_bit) { + req->_present.modes = 1; + req->modes._present.bits = 1; free(req->modes.bits.bit); req->modes.bits.bit = bit; req->modes.bits.n_bit = n_bit; @@ -1461,6 +1487,7 @@ static inline void ethtool_features_get_req_set_header_dev_name(struct ethtool_features_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -1529,6 +1556,7 @@ static inline void ethtool_features_get_req_dump_set_header_dev_name(struct ethtool_features_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -1603,6 +1631,7 @@ static inline void ethtool_features_set_req_set_header_dev_name(struct ethtool_features_set_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -1636,6 +1665,8 @@ __ethtool_features_set_req_set_hw_bits_bit(struct ethtool_features_set_req *req, struct ethtool_bitset_bit *bit, unsigned int n_bit) { + req->_present.hw = 1; + req->hw._present.bits = 1; free(req->hw.bits.bit); req->hw.bits.bit = bit; req->hw.bits.n_bit = n_bit; @@ -1659,6 +1690,8 @@ __ethtool_features_set_req_set_wanted_bits_bit(struct ethtool_features_set_req * struct ethtool_bitset_bit *bit, unsigned int n_bit) { + req->_present.wanted = 1; + req->wanted._present.bits = 1; free(req->wanted.bits.bit); req->wanted.bits.bit = bit; req->wanted.bits.n_bit = n_bit; @@ -1682,6 +1715,8 @@ __ethtool_features_set_req_set_active_bits_bit(struct ethtool_features_set_req * struct ethtool_bitset_bit *bit, unsigned int n_bit) { + req->_present.active = 1; + req->active._present.bits = 1; free(req->active.bits.bit); req->active.bits.bit = bit; req->active.bits.n_bit = n_bit; @@ -1705,6 +1740,8 @@ __ethtool_features_set_req_set_nochange_bits_bit(struct ethtool_features_set_req struct ethtool_bitset_bit *bit, unsigned int n_bit) { + req->_present.nochange = 1; + req->nochange._present.bits = 1; free(req->nochange.bits.bit); req->nochange.bits.bit = bit; req->nochange.bits.n_bit = n_bit; @@ -1763,6 +1800,7 @@ static inline void ethtool_privflags_get_req_set_header_dev_name(struct ethtool_privflags_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -1826,6 +1864,7 @@ static inline void ethtool_privflags_get_req_dump_set_header_dev_name(struct ethtool_privflags_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -1894,6 +1933,7 @@ static inline void ethtool_privflags_set_req_set_header_dev_name(struct ethtool_privflags_set_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -1927,6 +1967,8 @@ __ethtool_privflags_set_req_set_flags_bits_bit(struct ethtool_privflags_set_req struct ethtool_bitset_bit *bit, unsigned int n_bit) { + req->_present.flags = 1; + req->flags._present.bits = 1; free(req->flags.bits.bit); req->flags.bits.bit = bit; req->flags.bits.n_bit = n_bit; @@ -1966,6 +2008,7 @@ static inline void ethtool_rings_get_req_set_header_dev_name(struct ethtool_rings_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -2055,6 +2098,7 @@ static inline void ethtool_rings_get_req_dump_set_header_dev_name(struct ethtool_rings_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -2150,6 +2194,7 @@ static inline void ethtool_rings_set_req_set_header_dev_name(struct ethtool_rings_set_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -2302,6 +2347,7 @@ static inline void ethtool_channels_get_req_set_header_dev_name(struct ethtool_channels_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -2378,6 +2424,7 @@ static inline void ethtool_channels_get_req_dump_set_header_dev_name(struct ethtool_channels_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -2460,6 +2507,7 @@ static inline void ethtool_channels_set_req_set_header_dev_name(struct ethtool_channels_set_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -2566,6 +2614,7 @@ static inline void ethtool_coalesce_get_req_set_header_dev_name(struct ethtool_coalesce_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -2680,6 +2729,7 @@ static inline void ethtool_coalesce_get_req_dump_set_header_dev_name(struct ethtool_coalesce_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -2800,6 +2850,7 @@ static inline void ethtool_coalesce_set_req_set_header_dev_name(struct ethtool_coalesce_set_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -3038,6 +3089,7 @@ static inline void ethtool_pause_get_req_set_header_dev_name(struct ethtool_pause_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -3107,6 +3159,7 @@ static inline void ethtool_pause_get_req_dump_set_header_dev_name(struct ethtool_pause_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -3182,6 +3235,7 @@ static inline void ethtool_pause_set_req_set_header_dev_name(struct ethtool_pause_set_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -3272,6 +3326,7 @@ static inline void ethtool_eee_get_req_set_header_dev_name(struct ethtool_eee_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -3343,6 +3398,7 @@ static inline void ethtool_eee_get_req_dump_set_header_dev_name(struct ethtool_eee_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -3419,6 +3475,7 @@ static inline void ethtool_eee_set_req_set_header_dev_name(struct ethtool_eee_set_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -3452,6 +3509,8 @@ __ethtool_eee_set_req_set_modes_ours_bits_bit(struct ethtool_eee_set_req *req, struct ethtool_bitset_bit *bit, unsigned int n_bit) { + req->_present.modes_ours = 1; + req->modes_ours._present.bits = 1; free(req->modes_ours.bits.bit); req->modes_ours.bits.bit = bit; req->modes_ours.bits.n_bit = n_bit; @@ -3475,6 +3534,8 @@ __ethtool_eee_set_req_set_modes_peer_bits_bit(struct ethtool_eee_set_req *req, struct ethtool_bitset_bit *bit, unsigned int n_bit) { + req->_present.modes_peer = 1; + req->modes_peer._present.bits = 1; free(req->modes_peer.bits.bit); req->modes_peer.bits.bit = bit; req->modes_peer.bits.n_bit = n_bit; @@ -3539,6 +3600,7 @@ static inline void ethtool_tsinfo_get_req_set_header_dev_name(struct ethtool_tsinfo_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -3606,6 +3668,7 @@ static inline void ethtool_tsinfo_get_req_dump_set_header_dev_name(struct ethtool_tsinfo_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -3661,6 +3724,7 @@ static inline void ethtool_cable_test_act_req_set_header_dev_name(struct ethtool_cable_test_act_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -3712,6 +3776,7 @@ static inline void ethtool_cable_test_tdr_act_req_set_header_dev_name(struct ethtool_cable_test_tdr_act_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -3762,6 +3827,7 @@ static inline void ethtool_tunnel_info_get_req_set_header_dev_name(struct ethtool_tunnel_info_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -3825,6 +3891,7 @@ static inline void ethtool_tunnel_info_get_req_dump_set_header_dev_name(struct ethtool_tunnel_info_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -3880,6 +3947,7 @@ static inline void ethtool_fec_get_req_set_header_dev_name(struct ethtool_fec_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -3947,6 +4015,7 @@ static inline void ethtool_fec_get_req_dump_set_header_dev_name(struct ethtool_fec_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -4019,6 +4088,7 @@ static inline void ethtool_fec_set_req_set_header_dev_name(struct ethtool_fec_set_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -4051,6 +4121,8 @@ __ethtool_fec_set_req_set_modes_bits_bit(struct ethtool_fec_set_req *req, struct ethtool_bitset_bit *bit, unsigned int n_bit) { + req->_present.modes = 1; + req->modes._present.bits = 1; free(req->modes.bits.bit); req->modes.bits.bit = bit; req->modes.bits.n_bit = n_bit; @@ -4071,6 +4143,7 @@ static inline void ethtool_fec_set_req_set_stats_corrected(struct ethtool_fec_set_req *req, const void *corrected, size_t len) { + req->_present.stats = 1; free(req->stats.corrected); req->stats._present.corrected_len = len; req->stats.corrected = malloc(req->stats._present.corrected_len); @@ -4080,6 +4153,7 @@ static inline void ethtool_fec_set_req_set_stats_uncorr(struct ethtool_fec_set_req *req, const void *uncorr, size_t len) { + req->_present.stats = 1; free(req->stats.uncorr); req->stats._present.uncorr_len = len; req->stats.uncorr = malloc(req->stats._present.uncorr_len); @@ -4089,6 +4163,7 @@ static inline void ethtool_fec_set_req_set_stats_corr_bits(struct ethtool_fec_set_req *req, const void *corr_bits, size_t len) { + req->_present.stats = 1; free(req->stats.corr_bits); req->stats._present.corr_bits_len = len; req->stats.corr_bits = malloc(req->stats._present.corr_bits_len); @@ -4130,6 +4205,7 @@ static inline void ethtool_module_eeprom_get_req_set_header_dev_name(struct ethtool_module_eeprom_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -4204,6 +4280,7 @@ static inline void ethtool_module_eeprom_get_req_dump_set_header_dev_name(struct ethtool_module_eeprom_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -4260,6 +4337,7 @@ static inline void ethtool_phc_vclocks_get_req_set_header_dev_name(struct ethtool_phc_vclocks_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -4323,6 +4401,7 @@ static inline void ethtool_phc_vclocks_get_req_dump_set_header_dev_name(struct ethtool_phc_vclocks_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -4378,6 +4457,7 @@ static inline void ethtool_module_get_req_set_header_dev_name(struct ethtool_module_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -4441,6 +4521,7 @@ static inline void ethtool_module_get_req_dump_set_header_dev_name(struct ethtool_module_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -4510,6 +4591,7 @@ static inline void ethtool_module_set_req_set_header_dev_name(struct ethtool_module_set_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -4572,6 +4654,7 @@ static inline void ethtool_pse_get_req_set_header_dev_name(struct ethtool_pse_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -4637,6 +4720,7 @@ static inline void ethtool_pse_get_req_dump_set_header_dev_name(struct ethtool_pse_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -4696,6 +4780,7 @@ static inline void ethtool_pse_set_req_set_header_dev_name(struct ethtool_pse_set_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -4765,6 +4850,7 @@ static inline void ethtool_rss_get_req_set_header_dev_name(struct ethtool_rss_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -4834,6 +4920,7 @@ static inline void ethtool_rss_get_req_dump_set_header_dev_name(struct ethtool_rss_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -4888,6 +4975,7 @@ static inline void ethtool_plca_get_cfg_req_set_header_dev_name(struct ethtool_plca_get_cfg_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -4964,6 +5052,7 @@ static inline void ethtool_plca_get_cfg_req_dump_set_header_dev_name(struct ethtool_plca_get_cfg_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -5046,6 +5135,7 @@ static inline void ethtool_plca_set_cfg_req_set_header_dev_name(struct ethtool_plca_set_cfg_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -5152,6 +5242,7 @@ static inline void ethtool_plca_get_status_req_set_header_dev_name(struct ethtool_plca_get_status_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -5229,6 +5320,7 @@ static inline void ethtool_plca_get_status_req_dump_set_header_dev_name(struct ethtool_plca_get_status_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -5284,6 +5376,7 @@ static inline void ethtool_mm_get_req_set_header_dev_name(struct ethtool_mm_get_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -5361,6 +5454,7 @@ static inline void ethtool_mm_get_req_dump_set_header_dev_name(struct ethtool_mm_get_req_dump *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); @@ -5435,6 +5529,7 @@ static inline void ethtool_mm_set_req_set_header_dev_name(struct ethtool_mm_set_req *req, const char *dev_name) { + req->_present.header = 1; free(req->header.dev_name); req->header._present.dev_name_len = strlen(dev_name); req->header.dev_name = malloc(req->header._present.dev_name_len + 1); diff --git a/include/ynl-c/mptcp_pm.h b/include/ynl-c/mptcp_pm.h index a7b27e6..1d3632b 100644 --- a/include/ynl-c/mptcp_pm.h +++ b/include/ynl-c/mptcp_pm.h @@ -83,6 +83,7 @@ static inline void mptcp_pm_add_addr_req_set_addr_addr6(struct mptcp_pm_add_addr_req *req, const void *addr6, size_t len) { + req->_present.addr = 1; free(req->addr.addr6); req->addr._present.addr6_len = len; req->addr.addr6 = malloc(req->addr._present.addr6_len); @@ -161,6 +162,7 @@ static inline void mptcp_pm_del_addr_req_set_addr_addr6(struct mptcp_pm_del_addr_req *req, const void *addr6, size_t len) { + req->_present.addr = 1; free(req->addr.addr6); req->addr._present.addr6_len = len; req->addr.addr6 = malloc(req->addr._present.addr6_len); @@ -241,6 +243,7 @@ static inline void mptcp_pm_get_addr_req_set_addr_addr6(struct mptcp_pm_get_addr_req *req, const void *addr6, size_t len) { + req->_present.addr = 1; free(req->addr.addr6); req->addr._present.addr6_len = len; req->addr.addr6 = malloc(req->addr._present.addr6_len); @@ -348,6 +351,7 @@ static inline void mptcp_pm_flush_addrs_req_set_addr_addr6(struct mptcp_pm_flush_addrs_req *req, const void *addr6, size_t len) { + req->_present.addr = 1; free(req->addr.addr6); req->addr._present.addr6_len = len; req->addr.addr6 = malloc(req->addr._present.addr6_len); @@ -523,6 +527,7 @@ static inline void mptcp_pm_set_flags_req_set_addr_addr6(struct mptcp_pm_set_flags_req *req, const void *addr6, size_t len) { + req->_present.addr = 1; free(req->addr.addr6); req->addr._present.addr6_len = len; req->addr.addr6 = malloc(req->addr._present.addr6_len); @@ -587,6 +592,7 @@ static inline void mptcp_pm_set_flags_req_set_addr_remote_addr6(struct mptcp_pm_set_flags_req *req, const void *addr6, size_t len) { + req->_present.addr_remote = 1; free(req->addr_remote.addr6); req->addr_remote._present.addr6_len = len; req->addr_remote.addr6 = malloc(req->addr_remote._present.addr6_len); @@ -667,6 +673,7 @@ static inline void mptcp_pm_announce_req_set_addr_addr6(struct mptcp_pm_announce_req *req, const void *addr6, size_t len) { + req->_present.addr = 1; free(req->addr.addr6); req->addr._present.addr6_len = len; req->addr.addr6 = malloc(req->addr._present.addr6_len); @@ -793,6 +800,7 @@ static inline void mptcp_pm_subflow_create_req_set_addr_addr6(struct mptcp_pm_subflow_create_req *req, const void *addr6, size_t len) { + req->_present.addr = 1; free(req->addr.addr6); req->addr._present.addr6_len = len; req->addr.addr6 = malloc(req->addr._present.addr6_len); @@ -858,6 +866,7 @@ mptcp_pm_subflow_create_req_set_addr_remote_addr6(struct mptcp_pm_subflow_create const void *addr6, size_t len) { + req->_present.addr_remote = 1; free(req->addr_remote.addr6); req->addr_remote._present.addr6_len = len; req->addr_remote.addr6 = malloc(req->addr_remote._present.addr6_len); @@ -944,6 +953,7 @@ static inline void mptcp_pm_subflow_destroy_req_set_addr_addr6(struct mptcp_pm_subflow_destroy_req *req, const void *addr6, size_t len) { + req->_present.addr = 1; free(req->addr.addr6); req->addr._present.addr6_len = len; req->addr.addr6 = malloc(req->addr._present.addr6_len); @@ -1009,6 +1019,7 @@ mptcp_pm_subflow_destroy_req_set_addr_remote_addr6(struct mptcp_pm_subflow_destr const void *addr6, size_t len) { + req->_present.addr_remote = 1; free(req->addr_remote.addr6); req->addr_remote._present.addr6_len = len; req->addr_remote.addr6 = malloc(req->addr_remote._present.addr6_len); diff --git a/include/ynl-c/ovs_flow.h b/include/ynl-c/ovs_flow.h index c5f5c08..6898d63 100644 --- a/include/ynl-c/ovs_flow.h +++ b/include/ynl-c/ovs_flow.h @@ -321,6 +321,7 @@ static inline void ovs_flow_get_req_set_key_ethernet(struct ovs_flow_get_req *req, const void *ethernet, size_t len) { + req->_present.key = 1; free(req->key.ethernet); req->key._present.ethernet_len = len; req->key.ethernet = malloc(req->key._present.ethernet_len); @@ -346,6 +347,7 @@ static inline void ovs_flow_get_req_set_key_ipv4(struct ovs_flow_get_req *req, const void *ipv4, size_t len) { + req->_present.key = 1; free(req->key.ipv4); req->key._present.ipv4_len = len; req->key.ipv4 = malloc(req->key._present.ipv4_len); @@ -355,6 +357,7 @@ static inline void ovs_flow_get_req_set_key_ipv6(struct ovs_flow_get_req *req, const void *ipv6, size_t len) { + req->_present.key = 1; free(req->key.ipv6); req->key._present.ipv6_len = len; req->key.ipv6 = malloc(req->key._present.ipv6_len); @@ -364,6 +367,7 @@ static inline void ovs_flow_get_req_set_key_tcp(struct ovs_flow_get_req *req, const void *tcp, size_t len) { + req->_present.key = 1; free(req->key.tcp); req->key._present.tcp_len = len; req->key.tcp = malloc(req->key._present.tcp_len); @@ -373,6 +377,7 @@ static inline void ovs_flow_get_req_set_key_udp(struct ovs_flow_get_req *req, const void *udp, size_t len) { + req->_present.key = 1; free(req->key.udp); req->key._present.udp_len = len; req->key.udp = malloc(req->key._present.udp_len); @@ -382,6 +387,7 @@ static inline void ovs_flow_get_req_set_key_icmp(struct ovs_flow_get_req *req, const void *icmp, size_t len) { + req->_present.key = 1; free(req->key.icmp); req->key._present.icmp_len = len; req->key.icmp = malloc(req->key._present.icmp_len); @@ -391,6 +397,7 @@ static inline void ovs_flow_get_req_set_key_icmpv6(struct ovs_flow_get_req *req, const void *icmpv6, size_t len) { + req->_present.key = 1; free(req->key.icmpv6); req->key._present.icmpv6_len = len; req->key.icmpv6 = malloc(req->key._present.icmpv6_len); @@ -400,6 +407,7 @@ static inline void ovs_flow_get_req_set_key_arp(struct ovs_flow_get_req *req, const void *arp, size_t len) { + req->_present.key = 1; free(req->key.arp); req->key._present.arp_len = len; req->key.arp = malloc(req->key._present.arp_len); @@ -409,6 +417,7 @@ static inline void ovs_flow_get_req_set_key_nd(struct ovs_flow_get_req *req, const void *nd, size_t len) { + req->_present.key = 1; free(req->key.nd); req->key._present.nd_len = len; req->key.nd = malloc(req->key._present.nd_len); @@ -490,6 +499,8 @@ ovs_flow_get_req_set_key_tunnel_geneve_opts(struct ovs_flow_get_req *req, const void *geneve_opts, size_t len) { + req->_present.key = 1; + req->key._present.tunnel = 1; free(req->key.tunnel.geneve_opts); req->key.tunnel._present.geneve_opts_len = len; req->key.tunnel.geneve_opts = malloc(req->key.tunnel._present.geneve_opts_len); @@ -527,6 +538,8 @@ static inline void ovs_flow_get_req_set_key_tunnel_ipv6_src(struct ovs_flow_get_req *req, const void *ipv6_src, size_t len) { + req->_present.key = 1; + req->key._present.tunnel = 1; free(req->key.tunnel.ipv6_src); req->key.tunnel._present.ipv6_src_len = len; req->key.tunnel.ipv6_src = malloc(req->key.tunnel._present.ipv6_src_len); @@ -536,6 +549,8 @@ static inline void ovs_flow_get_req_set_key_tunnel_ipv6_dst(struct ovs_flow_get_req *req, const void *ipv6_dst, size_t len) { + req->_present.key = 1; + req->key._present.tunnel = 1; free(req->key.tunnel.ipv6_dst); req->key.tunnel._present.ipv6_dst_len = len; req->key.tunnel.ipv6_dst = malloc(req->key.tunnel._present.ipv6_dst_len); @@ -545,6 +560,8 @@ static inline void ovs_flow_get_req_set_key_tunnel_pad(struct ovs_flow_get_req *req, const void *pad, size_t len) { + req->_present.key = 1; + req->key._present.tunnel = 1; free(req->key.tunnel.pad); req->key.tunnel._present.pad_len = len; req->key.tunnel.pad = malloc(req->key.tunnel._present.pad_len); @@ -555,6 +572,8 @@ ovs_flow_get_req_set_key_tunnel_erspan_opts(struct ovs_flow_get_req *req, const void *erspan_opts, size_t len) { + req->_present.key = 1; + req->key._present.tunnel = 1; free(req->key.tunnel.erspan_opts); req->key.tunnel._present.erspan_opts_len = len; req->key.tunnel.erspan_opts = malloc(req->key.tunnel._present.erspan_opts_len); @@ -571,6 +590,7 @@ static inline void ovs_flow_get_req_set_key_sctp(struct ovs_flow_get_req *req, const void *sctp, size_t len) { + req->_present.key = 1; free(req->key.sctp); req->key._present.sctp_len = len; req->key.sctp = malloc(req->key._present.sctp_len); @@ -603,6 +623,7 @@ static inline void ovs_flow_get_req_set_key_mpls(struct ovs_flow_get_req *req, const void *mpls, size_t len) { + req->_present.key = 1; free(req->key.mpls); req->key._present.mpls_len = len; req->key.mpls = malloc(req->key._present.mpls_len); @@ -633,6 +654,7 @@ static inline void ovs_flow_get_req_set_key_ct_labels(struct ovs_flow_get_req *req, const void *ct_labels, size_t len) { + req->_present.key = 1; free(req->key.ct_labels); req->key._present.ct_labels_len = len; req->key.ct_labels = malloc(req->key._present.ct_labels_len); @@ -643,6 +665,7 @@ ovs_flow_get_req_set_key_ct_orig_tuple_ipv4(struct ovs_flow_get_req *req, const void *ct_orig_tuple_ipv4, size_t len) { + req->_present.key = 1; free(req->key.ct_orig_tuple_ipv4); req->key._present.ct_orig_tuple_ipv4_len = len; req->key.ct_orig_tuple_ipv4 = malloc(req->key._present.ct_orig_tuple_ipv4_len); @@ -653,6 +676,7 @@ ovs_flow_get_req_set_key_ct_orig_tuple_ipv6(struct ovs_flow_get_req *req, const void *ct_orig_tuple_ipv6, size_t len) { + req->_present.key = 1; free(req->key.ct_orig_tuple_ipv6); req->key._present.ct_orig_tuple_ipv6_len = len; req->key.ct_orig_tuple_ipv6 = malloc(req->key._present.ct_orig_tuple_ipv6_len); @@ -662,6 +686,8 @@ static inline void ovs_flow_get_req_set_key_nsh_base(struct ovs_flow_get_req *req, const void *base, size_t len) { + req->_present.key = 1; + req->key._present.nsh = 1; free(req->key.nsh.base); req->key.nsh._present.base_len = len; req->key.nsh.base = malloc(req->key.nsh._present.base_len); @@ -671,6 +697,8 @@ static inline void ovs_flow_get_req_set_key_nsh_md1(struct ovs_flow_get_req *req, const void *md1, size_t len) { + req->_present.key = 1; + req->key._present.nsh = 1; free(req->key.nsh.md1); req->key.nsh._present.md1_len = len; req->key.nsh.md1 = malloc(req->key.nsh._present.md1_len); @@ -680,6 +708,8 @@ static inline void ovs_flow_get_req_set_key_nsh_md2(struct ovs_flow_get_req *req, const void *md2, size_t len) { + req->_present.key = 1; + req->key._present.nsh = 1; free(req->key.nsh.md2); req->key.nsh._present.md2_len = len; req->key.nsh.md2 = malloc(req->key.nsh._present.md2_len); @@ -697,6 +727,7 @@ static inline void ovs_flow_get_req_set_key_nd_extensions(struct ovs_flow_get_req *req, const void *nd_extensions, size_t len) { + req->_present.key = 1; free(req->key.nd_extensions); req->key._present.nd_extensions_len = len; req->key.nd_extensions = malloc(req->key._present.nd_extensions_len); @@ -706,6 +737,7 @@ static inline void ovs_flow_get_req_set_key_tunnel_info(struct ovs_flow_get_req *req, const void *tunnel_info, size_t len) { + req->_present.key = 1; free(req->key.tunnel_info); req->key._present.tunnel_info_len = len; req->key.tunnel_info = malloc(req->key._present.tunnel_info_len); @@ -715,6 +747,7 @@ static inline void ovs_flow_get_req_set_key_ipv6_exthdrs(struct ovs_flow_get_req *req, const void *ipv6_exthdrs, size_t len) { + req->_present.key = 1; free(req->key.ipv6_exthdrs); req->key._present.ipv6_exthdrs_len = len; req->key.ipv6_exthdrs = malloc(req->key._present.ipv6_exthdrs_len); @@ -803,6 +836,7 @@ static inline void ovs_flow_get_req_dump_set_key_ethernet(struct ovs_flow_get_req_dump *req, const void *ethernet, size_t len) { + req->_present.key = 1; free(req->key.ethernet); req->key._present.ethernet_len = len; req->key.ethernet = malloc(req->key._present.ethernet_len); @@ -828,6 +862,7 @@ static inline void ovs_flow_get_req_dump_set_key_ipv4(struct ovs_flow_get_req_dump *req, const void *ipv4, size_t len) { + req->_present.key = 1; free(req->key.ipv4); req->key._present.ipv4_len = len; req->key.ipv4 = malloc(req->key._present.ipv4_len); @@ -837,6 +872,7 @@ static inline void ovs_flow_get_req_dump_set_key_ipv6(struct ovs_flow_get_req_dump *req, const void *ipv6, size_t len) { + req->_present.key = 1; free(req->key.ipv6); req->key._present.ipv6_len = len; req->key.ipv6 = malloc(req->key._present.ipv6_len); @@ -846,6 +882,7 @@ static inline void ovs_flow_get_req_dump_set_key_tcp(struct ovs_flow_get_req_dump *req, const void *tcp, size_t len) { + req->_present.key = 1; free(req->key.tcp); req->key._present.tcp_len = len; req->key.tcp = malloc(req->key._present.tcp_len); @@ -855,6 +892,7 @@ static inline void ovs_flow_get_req_dump_set_key_udp(struct ovs_flow_get_req_dump *req, const void *udp, size_t len) { + req->_present.key = 1; free(req->key.udp); req->key._present.udp_len = len; req->key.udp = malloc(req->key._present.udp_len); @@ -864,6 +902,7 @@ static inline void ovs_flow_get_req_dump_set_key_icmp(struct ovs_flow_get_req_dump *req, const void *icmp, size_t len) { + req->_present.key = 1; free(req->key.icmp); req->key._present.icmp_len = len; req->key.icmp = malloc(req->key._present.icmp_len); @@ -873,6 +912,7 @@ static inline void ovs_flow_get_req_dump_set_key_icmpv6(struct ovs_flow_get_req_dump *req, const void *icmpv6, size_t len) { + req->_present.key = 1; free(req->key.icmpv6); req->key._present.icmpv6_len = len; req->key.icmpv6 = malloc(req->key._present.icmpv6_len); @@ -882,6 +922,7 @@ static inline void ovs_flow_get_req_dump_set_key_arp(struct ovs_flow_get_req_dump *req, const void *arp, size_t len) { + req->_present.key = 1; free(req->key.arp); req->key._present.arp_len = len; req->key.arp = malloc(req->key._present.arp_len); @@ -891,6 +932,7 @@ static inline void ovs_flow_get_req_dump_set_key_nd(struct ovs_flow_get_req_dump *req, const void *nd, size_t len) { + req->_present.key = 1; free(req->key.nd); req->key._present.nd_len = len; req->key.nd = malloc(req->key._present.nd_len); @@ -975,6 +1017,8 @@ ovs_flow_get_req_dump_set_key_tunnel_geneve_opts(struct ovs_flow_get_req_dump *r const void *geneve_opts, size_t len) { + req->_present.key = 1; + req->key._present.tunnel = 1; free(req->key.tunnel.geneve_opts); req->key.tunnel._present.geneve_opts_len = len; req->key.tunnel.geneve_opts = malloc(req->key.tunnel._present.geneve_opts_len); @@ -1012,6 +1056,8 @@ static inline void ovs_flow_get_req_dump_set_key_tunnel_ipv6_src(struct ovs_flow_get_req_dump *req, const void *ipv6_src, size_t len) { + req->_present.key = 1; + req->key._present.tunnel = 1; free(req->key.tunnel.ipv6_src); req->key.tunnel._present.ipv6_src_len = len; req->key.tunnel.ipv6_src = malloc(req->key.tunnel._present.ipv6_src_len); @@ -1021,6 +1067,8 @@ static inline void ovs_flow_get_req_dump_set_key_tunnel_ipv6_dst(struct ovs_flow_get_req_dump *req, const void *ipv6_dst, size_t len) { + req->_present.key = 1; + req->key._present.tunnel = 1; free(req->key.tunnel.ipv6_dst); req->key.tunnel._present.ipv6_dst_len = len; req->key.tunnel.ipv6_dst = malloc(req->key.tunnel._present.ipv6_dst_len); @@ -1030,6 +1078,8 @@ static inline void ovs_flow_get_req_dump_set_key_tunnel_pad(struct ovs_flow_get_req_dump *req, const void *pad, size_t len) { + req->_present.key = 1; + req->key._present.tunnel = 1; free(req->key.tunnel.pad); req->key.tunnel._present.pad_len = len; req->key.tunnel.pad = malloc(req->key.tunnel._present.pad_len); @@ -1040,6 +1090,8 @@ ovs_flow_get_req_dump_set_key_tunnel_erspan_opts(struct ovs_flow_get_req_dump *r const void *erspan_opts, size_t len) { + req->_present.key = 1; + req->key._present.tunnel = 1; free(req->key.tunnel.erspan_opts); req->key.tunnel._present.erspan_opts_len = len; req->key.tunnel.erspan_opts = malloc(req->key.tunnel._present.erspan_opts_len); @@ -1056,6 +1108,7 @@ static inline void ovs_flow_get_req_dump_set_key_sctp(struct ovs_flow_get_req_dump *req, const void *sctp, size_t len) { + req->_present.key = 1; free(req->key.sctp); req->key._present.sctp_len = len; req->key.sctp = malloc(req->key._present.sctp_len); @@ -1089,6 +1142,7 @@ static inline void ovs_flow_get_req_dump_set_key_mpls(struct ovs_flow_get_req_dump *req, const void *mpls, size_t len) { + req->_present.key = 1; free(req->key.mpls); req->key._present.mpls_len = len; req->key.mpls = malloc(req->key._present.mpls_len); @@ -1122,6 +1176,7 @@ static inline void ovs_flow_get_req_dump_set_key_ct_labels(struct ovs_flow_get_req_dump *req, const void *ct_labels, size_t len) { + req->_present.key = 1; free(req->key.ct_labels); req->key._present.ct_labels_len = len; req->key.ct_labels = malloc(req->key._present.ct_labels_len); @@ -1132,6 +1187,7 @@ ovs_flow_get_req_dump_set_key_ct_orig_tuple_ipv4(struct ovs_flow_get_req_dump *r const void *ct_orig_tuple_ipv4, size_t len) { + req->_present.key = 1; free(req->key.ct_orig_tuple_ipv4); req->key._present.ct_orig_tuple_ipv4_len = len; req->key.ct_orig_tuple_ipv4 = malloc(req->key._present.ct_orig_tuple_ipv4_len); @@ -1142,6 +1198,7 @@ ovs_flow_get_req_dump_set_key_ct_orig_tuple_ipv6(struct ovs_flow_get_req_dump *r const void *ct_orig_tuple_ipv6, size_t len) { + req->_present.key = 1; free(req->key.ct_orig_tuple_ipv6); req->key._present.ct_orig_tuple_ipv6_len = len; req->key.ct_orig_tuple_ipv6 = malloc(req->key._present.ct_orig_tuple_ipv6_len); @@ -1151,6 +1208,8 @@ static inline void ovs_flow_get_req_dump_set_key_nsh_base(struct ovs_flow_get_req_dump *req, const void *base, size_t len) { + req->_present.key = 1; + req->key._present.nsh = 1; free(req->key.nsh.base); req->key.nsh._present.base_len = len; req->key.nsh.base = malloc(req->key.nsh._present.base_len); @@ -1160,6 +1219,8 @@ static inline void ovs_flow_get_req_dump_set_key_nsh_md1(struct ovs_flow_get_req_dump *req, const void *md1, size_t len) { + req->_present.key = 1; + req->key._present.nsh = 1; free(req->key.nsh.md1); req->key.nsh._present.md1_len = len; req->key.nsh.md1 = malloc(req->key.nsh._present.md1_len); @@ -1169,6 +1230,8 @@ static inline void ovs_flow_get_req_dump_set_key_nsh_md2(struct ovs_flow_get_req_dump *req, const void *md2, size_t len) { + req->_present.key = 1; + req->key._present.nsh = 1; free(req->key.nsh.md2); req->key.nsh._present.md2_len = len; req->key.nsh.md2 = malloc(req->key.nsh._present.md2_len); @@ -1187,6 +1250,7 @@ ovs_flow_get_req_dump_set_key_nd_extensions(struct ovs_flow_get_req_dump *req, const void *nd_extensions, size_t len) { + req->_present.key = 1; free(req->key.nd_extensions); req->key._present.nd_extensions_len = len; req->key.nd_extensions = malloc(req->key._present.nd_extensions_len); @@ -1196,6 +1260,7 @@ static inline void ovs_flow_get_req_dump_set_key_tunnel_info(struct ovs_flow_get_req_dump *req, const void *tunnel_info, size_t len) { + req->_present.key = 1; free(req->key.tunnel_info); req->key._present.tunnel_info_len = len; req->key.tunnel_info = malloc(req->key._present.tunnel_info_len); @@ -1206,6 +1271,7 @@ ovs_flow_get_req_dump_set_key_ipv6_exthdrs(struct ovs_flow_get_req_dump *req, const void *ipv6_exthdrs, size_t len) { + req->_present.key = 1; free(req->key.ipv6_exthdrs); req->key._present.ipv6_exthdrs_len = len; req->key.ipv6_exthdrs = malloc(req->key._present.ipv6_exthdrs_len); @@ -1280,6 +1346,7 @@ static inline void ovs_flow_new_req_set_key_ethernet(struct ovs_flow_new_req *req, const void *ethernet, size_t len) { + req->_present.key = 1; free(req->key.ethernet); req->key._present.ethernet_len = len; req->key.ethernet = malloc(req->key._present.ethernet_len); @@ -1305,6 +1372,7 @@ static inline void ovs_flow_new_req_set_key_ipv4(struct ovs_flow_new_req *req, const void *ipv4, size_t len) { + req->_present.key = 1; free(req->key.ipv4); req->key._present.ipv4_len = len; req->key.ipv4 = malloc(req->key._present.ipv4_len); @@ -1314,6 +1382,7 @@ static inline void ovs_flow_new_req_set_key_ipv6(struct ovs_flow_new_req *req, const void *ipv6, size_t len) { + req->_present.key = 1; free(req->key.ipv6); req->key._present.ipv6_len = len; req->key.ipv6 = malloc(req->key._present.ipv6_len); @@ -1323,6 +1392,7 @@ static inline void ovs_flow_new_req_set_key_tcp(struct ovs_flow_new_req *req, const void *tcp, size_t len) { + req->_present.key = 1; free(req->key.tcp); req->key._present.tcp_len = len; req->key.tcp = malloc(req->key._present.tcp_len); @@ -1332,6 +1402,7 @@ static inline void ovs_flow_new_req_set_key_udp(struct ovs_flow_new_req *req, const void *udp, size_t len) { + req->_present.key = 1; free(req->key.udp); req->key._present.udp_len = len; req->key.udp = malloc(req->key._present.udp_len); @@ -1341,6 +1412,7 @@ static inline void ovs_flow_new_req_set_key_icmp(struct ovs_flow_new_req *req, const void *icmp, size_t len) { + req->_present.key = 1; free(req->key.icmp); req->key._present.icmp_len = len; req->key.icmp = malloc(req->key._present.icmp_len); @@ -1350,6 +1422,7 @@ static inline void ovs_flow_new_req_set_key_icmpv6(struct ovs_flow_new_req *req, const void *icmpv6, size_t len) { + req->_present.key = 1; free(req->key.icmpv6); req->key._present.icmpv6_len = len; req->key.icmpv6 = malloc(req->key._present.icmpv6_len); @@ -1359,6 +1432,7 @@ static inline void ovs_flow_new_req_set_key_arp(struct ovs_flow_new_req *req, const void *arp, size_t len) { + req->_present.key = 1; free(req->key.arp); req->key._present.arp_len = len; req->key.arp = malloc(req->key._present.arp_len); @@ -1368,6 +1442,7 @@ static inline void ovs_flow_new_req_set_key_nd(struct ovs_flow_new_req *req, const void *nd, size_t len) { + req->_present.key = 1; free(req->key.nd); req->key._present.nd_len = len; req->key.nd = malloc(req->key._present.nd_len); @@ -1449,6 +1524,8 @@ ovs_flow_new_req_set_key_tunnel_geneve_opts(struct ovs_flow_new_req *req, const void *geneve_opts, size_t len) { + req->_present.key = 1; + req->key._present.tunnel = 1; free(req->key.tunnel.geneve_opts); req->key.tunnel._present.geneve_opts_len = len; req->key.tunnel.geneve_opts = malloc(req->key.tunnel._present.geneve_opts_len); @@ -1486,6 +1563,8 @@ static inline void ovs_flow_new_req_set_key_tunnel_ipv6_src(struct ovs_flow_new_req *req, const void *ipv6_src, size_t len) { + req->_present.key = 1; + req->key._present.tunnel = 1; free(req->key.tunnel.ipv6_src); req->key.tunnel._present.ipv6_src_len = len; req->key.tunnel.ipv6_src = malloc(req->key.tunnel._present.ipv6_src_len); @@ -1495,6 +1574,8 @@ static inline void ovs_flow_new_req_set_key_tunnel_ipv6_dst(struct ovs_flow_new_req *req, const void *ipv6_dst, size_t len) { + req->_present.key = 1; + req->key._present.tunnel = 1; free(req->key.tunnel.ipv6_dst); req->key.tunnel._present.ipv6_dst_len = len; req->key.tunnel.ipv6_dst = malloc(req->key.tunnel._present.ipv6_dst_len); @@ -1504,6 +1585,8 @@ static inline void ovs_flow_new_req_set_key_tunnel_pad(struct ovs_flow_new_req *req, const void *pad, size_t len) { + req->_present.key = 1; + req->key._present.tunnel = 1; free(req->key.tunnel.pad); req->key.tunnel._present.pad_len = len; req->key.tunnel.pad = malloc(req->key.tunnel._present.pad_len); @@ -1514,6 +1597,8 @@ ovs_flow_new_req_set_key_tunnel_erspan_opts(struct ovs_flow_new_req *req, const void *erspan_opts, size_t len) { + req->_present.key = 1; + req->key._present.tunnel = 1; free(req->key.tunnel.erspan_opts); req->key.tunnel._present.erspan_opts_len = len; req->key.tunnel.erspan_opts = malloc(req->key.tunnel._present.erspan_opts_len); @@ -1530,6 +1615,7 @@ static inline void ovs_flow_new_req_set_key_sctp(struct ovs_flow_new_req *req, const void *sctp, size_t len) { + req->_present.key = 1; free(req->key.sctp); req->key._present.sctp_len = len; req->key.sctp = malloc(req->key._present.sctp_len); @@ -1562,6 +1648,7 @@ static inline void ovs_flow_new_req_set_key_mpls(struct ovs_flow_new_req *req, const void *mpls, size_t len) { + req->_present.key = 1; free(req->key.mpls); req->key._present.mpls_len = len; req->key.mpls = malloc(req->key._present.mpls_len); @@ -1592,6 +1679,7 @@ static inline void ovs_flow_new_req_set_key_ct_labels(struct ovs_flow_new_req *req, const void *ct_labels, size_t len) { + req->_present.key = 1; free(req->key.ct_labels); req->key._present.ct_labels_len = len; req->key.ct_labels = malloc(req->key._present.ct_labels_len); @@ -1602,6 +1690,7 @@ ovs_flow_new_req_set_key_ct_orig_tuple_ipv4(struct ovs_flow_new_req *req, const void *ct_orig_tuple_ipv4, size_t len) { + req->_present.key = 1; free(req->key.ct_orig_tuple_ipv4); req->key._present.ct_orig_tuple_ipv4_len = len; req->key.ct_orig_tuple_ipv4 = malloc(req->key._present.ct_orig_tuple_ipv4_len); @@ -1612,6 +1701,7 @@ ovs_flow_new_req_set_key_ct_orig_tuple_ipv6(struct ovs_flow_new_req *req, const void *ct_orig_tuple_ipv6, size_t len) { + req->_present.key = 1; free(req->key.ct_orig_tuple_ipv6); req->key._present.ct_orig_tuple_ipv6_len = len; req->key.ct_orig_tuple_ipv6 = malloc(req->key._present.ct_orig_tuple_ipv6_len); @@ -1621,6 +1711,8 @@ static inline void ovs_flow_new_req_set_key_nsh_base(struct ovs_flow_new_req *req, const void *base, size_t len) { + req->_present.key = 1; + req->key._present.nsh = 1; free(req->key.nsh.base); req->key.nsh._present.base_len = len; req->key.nsh.base = malloc(req->key.nsh._present.base_len); @@ -1630,6 +1722,8 @@ static inline void ovs_flow_new_req_set_key_nsh_md1(struct ovs_flow_new_req *req, const void *md1, size_t len) { + req->_present.key = 1; + req->key._present.nsh = 1; free(req->key.nsh.md1); req->key.nsh._present.md1_len = len; req->key.nsh.md1 = malloc(req->key.nsh._present.md1_len); @@ -1639,6 +1733,8 @@ static inline void ovs_flow_new_req_set_key_nsh_md2(struct ovs_flow_new_req *req, const void *md2, size_t len) { + req->_present.key = 1; + req->key._present.nsh = 1; free(req->key.nsh.md2); req->key.nsh._present.md2_len = len; req->key.nsh.md2 = malloc(req->key.nsh._present.md2_len); @@ -1656,6 +1752,7 @@ static inline void ovs_flow_new_req_set_key_nd_extensions(struct ovs_flow_new_req *req, const void *nd_extensions, size_t len) { + req->_present.key = 1; free(req->key.nd_extensions); req->key._present.nd_extensions_len = len; req->key.nd_extensions = malloc(req->key._present.nd_extensions_len); @@ -1665,6 +1762,7 @@ static inline void ovs_flow_new_req_set_key_tunnel_info(struct ovs_flow_new_req *req, const void *tunnel_info, size_t len) { + req->_present.key = 1; free(req->key.tunnel_info); req->key._present.tunnel_info_len = len; req->key.tunnel_info = malloc(req->key._present.tunnel_info_len); @@ -1674,6 +1772,7 @@ static inline void ovs_flow_new_req_set_key_ipv6_exthdrs(struct ovs_flow_new_req *req, const void *ipv6_exthdrs, size_t len) { + req->_present.key = 1; free(req->key.ipv6_exthdrs); req->key._present.ipv6_exthdrs_len = len; req->key.ipv6_exthdrs = malloc(req->key._present.ipv6_exthdrs_len); @@ -1707,6 +1806,7 @@ static inline void ovs_flow_new_req_set_mask_ethernet(struct ovs_flow_new_req *req, const void *ethernet, size_t len) { + req->_present.mask = 1; free(req->mask.ethernet); req->mask._present.ethernet_len = len; req->mask.ethernet = malloc(req->mask._present.ethernet_len); @@ -1732,6 +1832,7 @@ static inline void ovs_flow_new_req_set_mask_ipv4(struct ovs_flow_new_req *req, const void *ipv4, size_t len) { + req->_present.mask = 1; free(req->mask.ipv4); req->mask._present.ipv4_len = len; req->mask.ipv4 = malloc(req->mask._present.ipv4_len); @@ -1741,6 +1842,7 @@ static inline void ovs_flow_new_req_set_mask_ipv6(struct ovs_flow_new_req *req, const void *ipv6, size_t len) { + req->_present.mask = 1; free(req->mask.ipv6); req->mask._present.ipv6_len = len; req->mask.ipv6 = malloc(req->mask._present.ipv6_len); @@ -1750,6 +1852,7 @@ static inline void ovs_flow_new_req_set_mask_tcp(struct ovs_flow_new_req *req, const void *tcp, size_t len) { + req->_present.mask = 1; free(req->mask.tcp); req->mask._present.tcp_len = len; req->mask.tcp = malloc(req->mask._present.tcp_len); @@ -1759,6 +1862,7 @@ static inline void ovs_flow_new_req_set_mask_udp(struct ovs_flow_new_req *req, const void *udp, size_t len) { + req->_present.mask = 1; free(req->mask.udp); req->mask._present.udp_len = len; req->mask.udp = malloc(req->mask._present.udp_len); @@ -1768,6 +1872,7 @@ static inline void ovs_flow_new_req_set_mask_icmp(struct ovs_flow_new_req *req, const void *icmp, size_t len) { + req->_present.mask = 1; free(req->mask.icmp); req->mask._present.icmp_len = len; req->mask.icmp = malloc(req->mask._present.icmp_len); @@ -1777,6 +1882,7 @@ static inline void ovs_flow_new_req_set_mask_icmpv6(struct ovs_flow_new_req *req, const void *icmpv6, size_t len) { + req->_present.mask = 1; free(req->mask.icmpv6); req->mask._present.icmpv6_len = len; req->mask.icmpv6 = malloc(req->mask._present.icmpv6_len); @@ -1786,6 +1892,7 @@ static inline void ovs_flow_new_req_set_mask_arp(struct ovs_flow_new_req *req, const void *arp, size_t len) { + req->_present.mask = 1; free(req->mask.arp); req->mask._present.arp_len = len; req->mask.arp = malloc(req->mask._present.arp_len); @@ -1795,6 +1902,7 @@ static inline void ovs_flow_new_req_set_mask_nd(struct ovs_flow_new_req *req, const void *nd, size_t len) { + req->_present.mask = 1; free(req->mask.nd); req->mask._present.nd_len = len; req->mask.nd = malloc(req->mask._present.nd_len); @@ -1877,6 +1985,8 @@ ovs_flow_new_req_set_mask_tunnel_geneve_opts(struct ovs_flow_new_req *req, const void *geneve_opts, size_t len) { + req->_present.mask = 1; + req->mask._present.tunnel = 1; free(req->mask.tunnel.geneve_opts); req->mask.tunnel._present.geneve_opts_len = len; req->mask.tunnel.geneve_opts = malloc(req->mask.tunnel._present.geneve_opts_len); @@ -1914,6 +2024,8 @@ static inline void ovs_flow_new_req_set_mask_tunnel_ipv6_src(struct ovs_flow_new_req *req, const void *ipv6_src, size_t len) { + req->_present.mask = 1; + req->mask._present.tunnel = 1; free(req->mask.tunnel.ipv6_src); req->mask.tunnel._present.ipv6_src_len = len; req->mask.tunnel.ipv6_src = malloc(req->mask.tunnel._present.ipv6_src_len); @@ -1923,6 +2035,8 @@ static inline void ovs_flow_new_req_set_mask_tunnel_ipv6_dst(struct ovs_flow_new_req *req, const void *ipv6_dst, size_t len) { + req->_present.mask = 1; + req->mask._present.tunnel = 1; free(req->mask.tunnel.ipv6_dst); req->mask.tunnel._present.ipv6_dst_len = len; req->mask.tunnel.ipv6_dst = malloc(req->mask.tunnel._present.ipv6_dst_len); @@ -1932,6 +2046,8 @@ static inline void ovs_flow_new_req_set_mask_tunnel_pad(struct ovs_flow_new_req *req, const void *pad, size_t len) { + req->_present.mask = 1; + req->mask._present.tunnel = 1; free(req->mask.tunnel.pad); req->mask.tunnel._present.pad_len = len; req->mask.tunnel.pad = malloc(req->mask.tunnel._present.pad_len); @@ -1942,6 +2058,8 @@ ovs_flow_new_req_set_mask_tunnel_erspan_opts(struct ovs_flow_new_req *req, const void *erspan_opts, size_t len) { + req->_present.mask = 1; + req->mask._present.tunnel = 1; free(req->mask.tunnel.erspan_opts); req->mask.tunnel._present.erspan_opts_len = len; req->mask.tunnel.erspan_opts = malloc(req->mask.tunnel._present.erspan_opts_len); @@ -1958,6 +2076,7 @@ static inline void ovs_flow_new_req_set_mask_sctp(struct ovs_flow_new_req *req, const void *sctp, size_t len) { + req->_present.mask = 1; free(req->mask.sctp); req->mask._present.sctp_len = len; req->mask.sctp = malloc(req->mask._present.sctp_len); @@ -1990,6 +2109,7 @@ static inline void ovs_flow_new_req_set_mask_mpls(struct ovs_flow_new_req *req, const void *mpls, size_t len) { + req->_present.mask = 1; free(req->mask.mpls); req->mask._present.mpls_len = len; req->mask.mpls = malloc(req->mask._present.mpls_len); @@ -2021,6 +2141,7 @@ static inline void ovs_flow_new_req_set_mask_ct_labels(struct ovs_flow_new_req *req, const void *ct_labels, size_t len) { + req->_present.mask = 1; free(req->mask.ct_labels); req->mask._present.ct_labels_len = len; req->mask.ct_labels = malloc(req->mask._present.ct_labels_len); @@ -2031,6 +2152,7 @@ ovs_flow_new_req_set_mask_ct_orig_tuple_ipv4(struct ovs_flow_new_req *req, const void *ct_orig_tuple_ipv4, size_t len) { + req->_present.mask = 1; free(req->mask.ct_orig_tuple_ipv4); req->mask._present.ct_orig_tuple_ipv4_len = len; req->mask.ct_orig_tuple_ipv4 = malloc(req->mask._present.ct_orig_tuple_ipv4_len); @@ -2041,6 +2163,7 @@ ovs_flow_new_req_set_mask_ct_orig_tuple_ipv6(struct ovs_flow_new_req *req, const void *ct_orig_tuple_ipv6, size_t len) { + req->_present.mask = 1; free(req->mask.ct_orig_tuple_ipv6); req->mask._present.ct_orig_tuple_ipv6_len = len; req->mask.ct_orig_tuple_ipv6 = malloc(req->mask._present.ct_orig_tuple_ipv6_len); @@ -2050,6 +2173,8 @@ static inline void ovs_flow_new_req_set_mask_nsh_base(struct ovs_flow_new_req *req, const void *base, size_t len) { + req->_present.mask = 1; + req->mask._present.nsh = 1; free(req->mask.nsh.base); req->mask.nsh._present.base_len = len; req->mask.nsh.base = malloc(req->mask.nsh._present.base_len); @@ -2059,6 +2184,8 @@ static inline void ovs_flow_new_req_set_mask_nsh_md1(struct ovs_flow_new_req *req, const void *md1, size_t len) { + req->_present.mask = 1; + req->mask._present.nsh = 1; free(req->mask.nsh.md1); req->mask.nsh._present.md1_len = len; req->mask.nsh.md1 = malloc(req->mask.nsh._present.md1_len); @@ -2068,6 +2195,8 @@ static inline void ovs_flow_new_req_set_mask_nsh_md2(struct ovs_flow_new_req *req, const void *md2, size_t len) { + req->_present.mask = 1; + req->mask._present.nsh = 1; free(req->mask.nsh.md2); req->mask.nsh._present.md2_len = len; req->mask.nsh.md2 = malloc(req->mask.nsh._present.md2_len); @@ -2085,6 +2214,7 @@ static inline void ovs_flow_new_req_set_mask_nd_extensions(struct ovs_flow_new_req *req, const void *nd_extensions, size_t len) { + req->_present.mask = 1; free(req->mask.nd_extensions); req->mask._present.nd_extensions_len = len; req->mask.nd_extensions = malloc(req->mask._present.nd_extensions_len); @@ -2094,6 +2224,7 @@ static inline void ovs_flow_new_req_set_mask_tunnel_info(struct ovs_flow_new_req *req, const void *tunnel_info, size_t len) { + req->_present.mask = 1; free(req->mask.tunnel_info); req->mask._present.tunnel_info_len = len; req->mask.tunnel_info = malloc(req->mask._present.tunnel_info_len); @@ -2103,6 +2234,7 @@ static inline void ovs_flow_new_req_set_mask_ipv6_exthdrs(struct ovs_flow_new_req *req, const void *ipv6_exthdrs, size_t len) { + req->_present.mask = 1; free(req->mask.ipv6_exthdrs); req->mask._present.ipv6_exthdrs_len = len; req->mask.ipv6_exthdrs = malloc(req->mask._present.ipv6_exthdrs_len); @@ -2129,6 +2261,8 @@ ovs_flow_new_req_set_actions_userspace_userdata(struct ovs_flow_new_req *req, const void *userdata, size_t len) { + req->_present.actions = 1; + req->actions._present.userspace = 1; free(req->actions.userspace.userdata); req->actions.userspace._present.userdata_len = len; req->actions.userspace.userdata = malloc(req->actions.userspace._present.userdata_len); @@ -2154,6 +2288,7 @@ static inline void ovs_flow_new_req_set_actions_push_vlan(struct ovs_flow_new_req *req, const void *push_vlan, size_t len) { + req->_present.actions = 1; free(req->actions.push_vlan); req->actions._present.push_vlan_len = len; req->actions.push_vlan = malloc(req->actions._present.push_vlan_len); @@ -2185,6 +2320,7 @@ static inline void ovs_flow_new_req_set_actions_hash(struct ovs_flow_new_req *req, const void *hash, size_t len) { + req->_present.actions = 1; free(req->actions.hash); req->actions._present.hash_len = len; req->actions.hash = malloc(req->actions._present.hash_len); @@ -2194,6 +2330,7 @@ static inline void ovs_flow_new_req_set_actions_push_mpls(struct ovs_flow_new_req *req, const void *push_mpls, size_t len) { + req->_present.actions = 1; free(req->actions.push_mpls); req->actions._present.push_mpls_len = len; req->actions.push_mpls = malloc(req->actions._present.push_mpls_len); @@ -2226,6 +2363,8 @@ static inline void ovs_flow_new_req_set_actions_ct_mark(struct ovs_flow_new_req *req, const void *mark, size_t len) { + req->_present.actions = 1; + req->actions._present.ct = 1; free(req->actions.ct.mark); req->actions.ct._present.mark_len = len; req->actions.ct.mark = malloc(req->actions.ct._present.mark_len); @@ -2235,6 +2374,8 @@ static inline void ovs_flow_new_req_set_actions_ct_labels(struct ovs_flow_new_req *req, const void *labels, size_t len) { + req->_present.actions = 1; + req->actions._present.ct = 1; free(req->actions.ct.labels); req->actions.ct._present.labels_len = len; req->actions.ct.labels = malloc(req->actions.ct._present.labels_len); @@ -2244,6 +2385,8 @@ static inline void ovs_flow_new_req_set_actions_ct_helper(struct ovs_flow_new_req *req, const char *helper) { + req->_present.actions = 1; + req->actions._present.ct = 1; free(req->actions.ct.helper); req->actions.ct._present.helper_len = strlen(helper); req->actions.ct.helper = malloc(req->actions.ct._present.helper_len + 1); @@ -2270,6 +2413,9 @@ static inline void ovs_flow_new_req_set_actions_ct_nat_ip_min(struct ovs_flow_new_req *req, const void *ip_min, size_t len) { + req->_present.actions = 1; + req->actions._present.ct = 1; + req->actions.ct._present.nat = 1; free(req->actions.ct.nat.ip_min); req->actions.ct.nat._present.ip_min_len = len; req->actions.ct.nat.ip_min = malloc(req->actions.ct.nat._present.ip_min_len); @@ -2279,6 +2425,9 @@ static inline void ovs_flow_new_req_set_actions_ct_nat_ip_max(struct ovs_flow_new_req *req, const void *ip_max, size_t len) { + req->_present.actions = 1; + req->actions._present.ct = 1; + req->actions.ct._present.nat = 1; free(req->actions.ct.nat.ip_max); req->actions.ct.nat._present.ip_max_len = len; req->actions.ct.nat.ip_max = malloc(req->actions.ct.nat._present.ip_max_len); @@ -2348,6 +2497,8 @@ static inline void ovs_flow_new_req_set_actions_ct_timeout(struct ovs_flow_new_req *req, const char *timeout) { + req->_present.actions = 1; + req->actions._present.ct = 1; free(req->actions.ct.timeout); req->actions.ct._present.timeout_len = strlen(timeout); req->actions.ct.timeout = malloc(req->actions.ct._present.timeout_len + 1); @@ -2365,6 +2516,7 @@ static inline void ovs_flow_new_req_set_actions_push_eth(struct ovs_flow_new_req *req, const void *push_eth, size_t len) { + req->_present.actions = 1; free(req->actions.push_eth); req->actions._present.push_eth_len = len; req->actions.push_eth = malloc(req->actions._present.push_eth_len); @@ -2386,6 +2538,8 @@ static inline void ovs_flow_new_req_set_actions_push_nsh_base(struct ovs_flow_new_req *req, const void *base, size_t len) { + req->_present.actions = 1; + req->actions._present.push_nsh = 1; free(req->actions.push_nsh.base); req->actions.push_nsh._present.base_len = len; req->actions.push_nsh.base = malloc(req->actions.push_nsh._present.base_len); @@ -2395,6 +2549,8 @@ static inline void ovs_flow_new_req_set_actions_push_nsh_md1(struct ovs_flow_new_req *req, const void *md1, size_t len) { + req->_present.actions = 1; + req->actions._present.push_nsh = 1; free(req->actions.push_nsh.md1); req->actions.push_nsh._present.md1_len = len; req->actions.push_nsh.md1 = malloc(req->actions.push_nsh._present.md1_len); @@ -2404,6 +2560,8 @@ static inline void ovs_flow_new_req_set_actions_push_nsh_md2(struct ovs_flow_new_req *req, const void *md2, size_t len) { + req->_present.actions = 1; + req->actions._present.push_nsh = 1; free(req->actions.push_nsh.md2); req->actions.push_nsh._present.md2_len = len; req->actions.push_nsh.md2 = malloc(req->actions.push_nsh._present.md2_len); @@ -2435,6 +2593,7 @@ static inline void ovs_flow_new_req_set_actions_add_mpls(struct ovs_flow_new_req *req, const void *add_mpls, size_t len) { + req->_present.actions = 1; free(req->actions.add_mpls); req->actions._present.add_mpls_len = len; req->actions.add_mpls = malloc(req->actions._present.add_mpls_len); diff --git a/include/ynl-c/psp.h b/include/ynl-c/psp.h index e9b4c1a..fe5124d 100644 --- a/include/ynl-c/psp.h +++ b/include/ynl-c/psp.h @@ -282,6 +282,7 @@ static inline void psp_tx_assoc_req_set_tx_key_key(struct psp_tx_assoc_req *req, const void *key, size_t len) { + req->_present.tx_key = 1; free(req->tx_key.key); req->tx_key._present.key_len = len; req->tx_key.key = malloc(req->tx_key._present.key_len);