diff options
Diffstat (limited to 'meta-networking')
12 files changed, 26 insertions, 1217 deletions
diff --git a/meta-networking/recipes-protocols/openlldp/files/0001-cmds-fix-enum-conversion.patch b/meta-networking/recipes-protocols/openlldp/files/0001-cmds-fix-enum-conversion.patch deleted file mode 100644 index 680f6b67d..000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0001-cmds-fix-enum-conversion.patch +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | From 090854e09fe18ebf1ba428864895a690086f78ee Mon Sep 17 00:00:00 2001 | ||
2 | From: Aaron Conole <aconole@redhat.com> | ||
3 | Date: Mon, 19 Aug 2019 11:41:13 -0400 | ||
4 | Subject: [PATCH 1/9] cmds: fix enum conversion | ||
5 | |||
6 | Multiple modules use implicit conversion between enum types, but | ||
7 | this triggers warnings with some compilers. ex: | ||
8 | |||
9 | qbg/vdp_cmds.c:110:39: error: implicit conversion from enumeration type | ||
10 | 'lldp_cmd' to different enumeration type 'cmd_status' | ||
11 | [-Werror,-Wenum-conversion] | ||
12 | cmd_status good_cmd = vdp_cmdok(cmd, cmd_gettlv); | ||
13 | |||
14 | Reported-at: https://github.com/intel/openlldp/issues/53 | ||
15 | Signed-off-by: Aaron Conole <aconole@redhat.com> | ||
16 | --- | ||
17 | lldp_evb22_cmds.c | 2 +- | ||
18 | lldp_evb_cmds.c | 2 +- | ||
19 | qbg/vdp22_cmds.c | 2 +- | ||
20 | qbg/vdp_cmds.c | 2 +- | ||
21 | vdptool.c | 2 +- | ||
22 | 5 files changed, 5 insertions(+), 5 deletions(-) | ||
23 | |||
24 | diff --git a/lldp_evb22_cmds.c b/lldp_evb22_cmds.c | ||
25 | index cebfeb2..51810bc 100644 | ||
26 | --- a/lldp_evb22_cmds.c | ||
27 | +++ b/lldp_evb22_cmds.c | ||
28 | @@ -225,7 +225,7 @@ int evb22_conf_enabletx(char *ifname, enum agent_type type) | ||
29 | TLVID(OUI_IEEE_8021Qbg22, LLDP_EVB22_SUBTYPE)); | ||
30 | } | ||
31 | |||
32 | -static int evb22_cmdok(struct cmd *cmd, cmd_status expected) | ||
33 | +static int evb22_cmdok(struct cmd *cmd, int expected) | ||
34 | { | ||
35 | if (cmd->cmd != expected) | ||
36 | return cmd_invalid; | ||
37 | diff --git a/lldp_evb_cmds.c b/lldp_evb_cmds.c | ||
38 | index eec4f33..e6af03b 100644 | ||
39 | --- a/lldp_evb_cmds.c | ||
40 | +++ b/lldp_evb_cmds.c | ||
41 | @@ -163,7 +163,7 @@ int evb_conf_enabletx(char *ifname, enum agent_type type) | ||
42 | return is_tlv_txenabled(ifname, type, TLVID_8021Qbg(LLDP_EVB_SUBTYPE)); | ||
43 | } | ||
44 | |||
45 | -static int evb_cmdok(struct cmd *cmd, cmd_status expected) | ||
46 | +static int evb_cmdok(struct cmd *cmd, int expected) | ||
47 | { | ||
48 | if (cmd->cmd != expected) | ||
49 | return cmd_invalid; | ||
50 | diff --git a/qbg/vdp22_cmds.c b/qbg/vdp22_cmds.c | ||
51 | index 479b1b0..2e1bbbd 100644 | ||
52 | --- a/qbg/vdp22_cmds.c | ||
53 | +++ b/qbg/vdp22_cmds.c | ||
54 | @@ -296,7 +296,7 @@ int vdp22_sendevent(struct vdpnl_vsi *p) | ||
55 | return 0; | ||
56 | } | ||
57 | |||
58 | -static int vdp22_cmdok(struct cmd *cmd, cmd_status expected) | ||
59 | +static int vdp22_cmdok(struct cmd *cmd, int expected) | ||
60 | { | ||
61 | if (cmd->cmd != expected) | ||
62 | return cmd_invalid; | ||
63 | diff --git a/qbg/vdp_cmds.c b/qbg/vdp_cmds.c | ||
64 | index 95bcfb1..50f2781 100644 | ||
65 | --- a/qbg/vdp_cmds.c | ||
66 | +++ b/qbg/vdp_cmds.c | ||
67 | @@ -85,7 +85,7 @@ static char *print_mode(char *s, size_t length, struct vsi_profile *p) | ||
68 | return s; | ||
69 | } | ||
70 | |||
71 | -static int vdp_cmdok(struct cmd *cmd, cmd_status expected) | ||
72 | +static int vdp_cmdok(struct cmd *cmd, int expected) | ||
73 | { | ||
74 | if (cmd->cmd != expected) | ||
75 | return cmd_invalid; | ||
76 | diff --git a/vdptool.c b/vdptool.c | ||
77 | index 9872348..8f36277 100644 | ||
78 | --- a/vdptool.c | ||
79 | +++ b/vdptool.c | ||
80 | @@ -141,7 +141,7 @@ static char *print_status(cmd_status status) | ||
81 | str = "TLV does not support agent type"; | ||
82 | break; | ||
83 | default: | ||
84 | - str = print_vdp_status(status); | ||
85 | + str = print_vdp_status((enum vdp22_cmd_status)status); | ||
86 | break; | ||
87 | } | ||
88 | return str; | ||
89 | -- | ||
90 | 2.28.0 | ||
91 | |||
diff --git a/meta-networking/recipes-protocols/openlldp/files/0002-lldp_head-rename-and-make-extern.patch b/meta-networking/recipes-protocols/openlldp/files/0002-lldp_head-rename-and-make-extern.patch deleted file mode 100644 index 8f65b799f..000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0002-lldp_head-rename-and-make-extern.patch +++ /dev/null | |||
@@ -1,500 +0,0 @@ | |||
1 | From 07a83c583b9d508c7040dc6254a6a7113b2ce55f Mon Sep 17 00:00:00 2001 | ||
2 | From: Aaron Conole <aconole@redhat.com> | ||
3 | Date: Mon, 3 Aug 2020 15:05:42 -0400 | ||
4 | Subject: [PATCH 2/9] lldp_head: rename and make extern | ||
5 | |||
6 | Try to resolve this silly mod issue | ||
7 | |||
8 | Signed-off-by: Aaron Conole <aconole@redhat.com> | ||
9 | --- | ||
10 | config.c | 4 ++-- | ||
11 | event_iface.c | 4 ++-- | ||
12 | include/lldp_mod.h | 2 +- | ||
13 | lldp/agent.c | 2 +- | ||
14 | lldp/rx.c | 4 ++-- | ||
15 | lldp/tx.c | 4 ++-- | ||
16 | lldp_dcbx.c | 8 ++++---- | ||
17 | lldp_mand_cmds.c | 8 ++++---- | ||
18 | lldpad.c | 12 +++++++----- | ||
19 | lldptool.c | 14 ++++++++------ | ||
20 | lldptool_cmds.c | 2 +- | ||
21 | qbg/ecp22.c | 8 ++++---- | ||
22 | qbg/vdp.c | 4 ++-- | ||
23 | qbg/vdp22.c | 6 +++--- | ||
24 | qbg/vdp22_cmds.c | 2 +- | ||
25 | vdptool.c | 16 +++++++++------- | ||
26 | 16 files changed, 53 insertions(+), 47 deletions(-) | ||
27 | |||
28 | diff --git a/config.c b/config.c | ||
29 | index be458fd..bc3fbae 100644 | ||
30 | --- a/config.c | ||
31 | +++ b/config.c | ||
32 | @@ -185,7 +185,7 @@ void scan_port(UNUSED void *eloop_data, UNUSED void *user_ctx) | ||
33 | LIST_FOREACH(agent, &port->agent_head, entry) { | ||
34 | LLDPAD_DBG("%s: calling ifdown for agent %p.\n", | ||
35 | __func__, agent); | ||
36 | - LIST_FOREACH(np, &lldp_head, lldp) { | ||
37 | + LIST_FOREACH(np, &lldp_mod_head, lldp) { | ||
38 | ops = np->ops; | ||
39 | if (ops->lldp_mod_ifdown) | ||
40 | ops->lldp_mod_ifdown(ifname, agent); | ||
41 | @@ -394,7 +394,7 @@ void init_ports(void) | ||
42 | LIST_FOREACH(agent, &port->agent_head, entry) { | ||
43 | LLDPAD_DBG("%s: calling ifup for agent %p.\n", | ||
44 | __func__, agent); | ||
45 | - LIST_FOREACH(np, &lldp_head, lldp) { | ||
46 | + LIST_FOREACH(np, &lldp_mod_head, lldp) { | ||
47 | if (np->ops->lldp_mod_ifup) | ||
48 | np->ops->lldp_mod_ifup(p->if_name, agent); | ||
49 | } | ||
50 | diff --git a/event_iface.c b/event_iface.c | ||
51 | index 43a95c7..1be2963 100644 | ||
52 | --- a/event_iface.c | ||
53 | +++ b/event_iface.c | ||
54 | @@ -216,7 +216,7 @@ int oper_add_device(char *device_name) | ||
55 | LIST_FOREACH(agent, &port->agent_head, entry) { | ||
56 | LLDPAD_DBG("%s: calling ifup for agent %p.\n", | ||
57 | __func__, agent); | ||
58 | - LIST_FOREACH(np, &lldp_head, lldp) { | ||
59 | + LIST_FOREACH(np, &lldp_mod_head, lldp) { | ||
60 | if (np->ops->lldp_mod_ifup) | ||
61 | np->ops->lldp_mod_ifup(device_name, agent); | ||
62 | } | ||
63 | @@ -283,7 +283,7 @@ static void event_if_decode_nlmsg(int route_type, void *data, int len) | ||
64 | LIST_FOREACH(agent, &port->agent_head, entry) { | ||
65 | LLDPAD_DBG("%s: calling ifdown for agent %p.\n", | ||
66 | __func__, agent); | ||
67 | - LIST_FOREACH(np, &lldp_head, lldp) { | ||
68 | + LIST_FOREACH(np, &lldp_mod_head, lldp) { | ||
69 | ops = np->ops; | ||
70 | if (ops->lldp_mod_ifdown) | ||
71 | ops->lldp_mod_ifdown(device_name, | ||
72 | diff --git a/include/lldp_mod.h b/include/lldp_mod.h | ||
73 | index 49a50e4..9733595 100644 | ||
74 | --- a/include/lldp_mod.h | ||
75 | +++ b/include/lldp_mod.h | ||
76 | @@ -96,7 +96,7 @@ struct lldp_module { | ||
77 | }; | ||
78 | |||
79 | LIST_HEAD(lldp_head, lldp_module); | ||
80 | -struct lldp_head lldp_head; | ||
81 | +extern struct lldp_head lldp_mod_head; | ||
82 | |||
83 | static inline struct lldp_module *find_module_by_id(struct lldp_head *head, int id) | ||
84 | { | ||
85 | diff --git a/lldp/agent.c b/lldp/agent.c | ||
86 | index 333929a..aa4a8d1 100644 | ||
87 | --- a/lldp/agent.c | ||
88 | +++ b/lldp/agent.c | ||
89 | @@ -163,7 +163,7 @@ static void timer(UNUSED void *eloop_data, UNUSED void *user_ctx) | ||
90 | run_rx_sm(port, agent); | ||
91 | update_rx_timers(agent); | ||
92 | |||
93 | - LIST_FOREACH(n, &lldp_head, lldp) { | ||
94 | + LIST_FOREACH(n, &lldp_mod_head, lldp) { | ||
95 | if (n->ops && n->ops->timer) | ||
96 | n->ops->timer(port, agent); | ||
97 | } | ||
98 | diff --git a/lldp/rx.c b/lldp/rx.c | ||
99 | index 12d07bc..43aeeba 100644 | ||
100 | --- a/lldp/rx.c | ||
101 | +++ b/lldp/rx.c | ||
102 | @@ -359,7 +359,7 @@ void rxProcessFrame(struct port *port, struct lldp_agent *agent) | ||
103 | } | ||
104 | |||
105 | /* rx per lldp module */ | ||
106 | - LIST_FOREACH(np, &lldp_head, lldp) { | ||
107 | + LIST_FOREACH(np, &lldp_mod_head, lldp) { | ||
108 | if (!np->ops || !np->ops->lldp_mod_rchange) | ||
109 | continue; | ||
110 | |||
111 | @@ -402,7 +402,7 @@ u8 mibDeleteObjects(struct port *port, struct lldp_agent *agent) | ||
112 | { | ||
113 | struct lldp_module *np; | ||
114 | |||
115 | - LIST_FOREACH(np, &lldp_head, lldp) { | ||
116 | + LIST_FOREACH(np, &lldp_mod_head, lldp) { | ||
117 | if (!np->ops || !np->ops->lldp_mod_mibdelete) | ||
118 | continue; | ||
119 | np->ops->lldp_mod_mibdelete(port, agent); | ||
120 | diff --git a/lldp/tx.c b/lldp/tx.c | ||
121 | index c3a5c62..0746e34 100644 | ||
122 | --- a/lldp/tx.c | ||
123 | +++ b/lldp/tx.c | ||
124 | @@ -71,7 +71,7 @@ bool mibConstrInfoLLDPDU(struct port *port, struct lldp_agent *agent) | ||
125 | fb_offset += sizeof(struct l2_ethhdr); | ||
126 | |||
127 | /* Generic TLV Pack */ | ||
128 | - LIST_FOREACH(np, &lldp_head, lldp) { | ||
129 | + LIST_FOREACH(np, &lldp_mod_head, lldp) { | ||
130 | if (!np->ops || !np->ops->lldp_mod_gettlv) | ||
131 | continue; | ||
132 | |||
133 | @@ -206,7 +206,7 @@ bool mibConstrShutdownLLDPDU(struct port *port, struct lldp_agent *agent) | ||
134 | memcpy(agent->tx.frameout, (void *)ð, sizeof(struct l2_ethhdr)); | ||
135 | fb_offset += sizeof(struct l2_ethhdr); | ||
136 | |||
137 | - np = find_module_by_id(&lldp_head, LLDP_MOD_MAND); | ||
138 | + np = find_module_by_id(&lldp_mod_head, LLDP_MOD_MAND); | ||
139 | if (!np) | ||
140 | goto error; | ||
141 | if (!np->ops || !np->ops->lldp_mod_gettlv) | ||
142 | diff --git a/lldp_dcbx.c b/lldp_dcbx.c | ||
143 | index 7e53c0f..809086f 100644 | ||
144 | --- a/lldp_dcbx.c | ||
145 | +++ b/lldp_dcbx.c | ||
146 | @@ -129,7 +129,7 @@ struct dcbx_tlvs *dcbx_data(const char *ifname) | ||
147 | struct dcbd_user_data *dud; | ||
148 | struct dcbx_tlvs *tlv = NULL; | ||
149 | |||
150 | - dud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_DCBX); | ||
151 | + dud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_DCBX); | ||
152 | if (dud) { | ||
153 | LIST_FOREACH(tlv, &dud->head, entry) { | ||
154 | if (!strncmp(tlv->ifname, ifname, IFNAMSIZ)) | ||
155 | @@ -148,7 +148,7 @@ int dcbx_tlvs_rxed(const char *ifname, struct lldp_agent *agent) | ||
156 | if (agent->type != NEAREST_BRIDGE) | ||
157 | return 0; | ||
158 | |||
159 | - dud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_DCBX); | ||
160 | + dud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_DCBX); | ||
161 | if (dud) { | ||
162 | LIST_FOREACH(tlv, &dud->head, entry) { | ||
163 | if (!strncmp(tlv->ifname, ifname, IFNAMSIZ)) | ||
164 | @@ -172,7 +172,7 @@ int dcbx_check_active(const char *ifname) | ||
165 | struct dcbd_user_data *dud; | ||
166 | struct dcbx_tlvs *tlv = NULL; | ||
167 | |||
168 | - dud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_DCBX); | ||
169 | + dud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_DCBX); | ||
170 | if (dud) { | ||
171 | LIST_FOREACH(tlv, &dud->head, entry) { | ||
172 | if (!strncmp(tlv->ifname, ifname, IFNAMSIZ)) | ||
173 | @@ -507,7 +507,7 @@ void dcbx_ifup(char *ifname, struct lldp_agent *agent) | ||
174 | ifindex = get_ifidx(ifname); | ||
175 | port = port_find_by_ifindex(ifindex); | ||
176 | |||
177 | - dud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_DCBX); | ||
178 | + dud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_DCBX); | ||
179 | tlvs = dcbx_data(ifname); | ||
180 | |||
181 | if (!port) | ||
182 | diff --git a/lldp_mand_cmds.c b/lldp_mand_cmds.c | ||
183 | index 8a88177..1c43bf4 100644 | ||
184 | --- a/lldp_mand_cmds.c | ||
185 | +++ b/lldp_mand_cmds.c | ||
186 | @@ -466,7 +466,7 @@ int handle_get_args(struct cmd *cmd, UNUSED char *arg, char *argvalue, | ||
187 | nbuf = obuf; | ||
188 | nbuf_len = obuf_len; | ||
189 | |||
190 | - LIST_FOREACH(np, &lldp_head, lldp) { | ||
191 | + LIST_FOREACH(np, &lldp_mod_head, lldp) { | ||
192 | if (!np->ops->get_arg_handler) | ||
193 | continue; | ||
194 | if (!(ah = np->ops->get_arg_handler())) | ||
195 | @@ -496,7 +496,7 @@ int handle_get_arg(struct cmd *cmd, char *arg, char *argvalue, | ||
196 | struct arg_handlers *ah; | ||
197 | int rval, status = cmd_not_applicable; | ||
198 | |||
199 | - LIST_FOREACH(np, &lldp_head, lldp) { | ||
200 | + LIST_FOREACH(np, &lldp_mod_head, lldp) { | ||
201 | if (!np->ops->get_arg_handler) | ||
202 | continue; | ||
203 | if (!(ah = np->ops->get_arg_handler())) | ||
204 | @@ -593,7 +593,7 @@ int handle_test_arg(struct cmd *cmd, char *arg, char *argvalue, | ||
205 | struct arg_handlers *ah; | ||
206 | int rval, status = cmd_not_applicable; | ||
207 | |||
208 | - LIST_FOREACH(np, &lldp_head, lldp) { | ||
209 | + LIST_FOREACH(np, &lldp_mod_head, lldp) { | ||
210 | if (!np->ops->get_arg_handler) | ||
211 | continue; | ||
212 | if (!(ah = np->ops->get_arg_handler())) | ||
213 | @@ -626,7 +626,7 @@ int handle_set_arg(struct cmd *cmd, char *arg, char *argvalue, | ||
214 | struct arg_handlers *ah; | ||
215 | int rval, status = cmd_not_applicable; | ||
216 | |||
217 | - LIST_FOREACH(np, &lldp_head, lldp) { | ||
218 | + LIST_FOREACH(np, &lldp_mod_head, lldp) { | ||
219 | if (!np->ops->get_arg_handler) | ||
220 | continue; | ||
221 | if (!(ah = np->ops->get_arg_handler())) | ||
222 | diff --git a/lldpad.c b/lldpad.c | ||
223 | index 01fb588..65e92c7 100644 | ||
224 | --- a/lldpad.c | ||
225 | +++ b/lldpad.c | ||
226 | @@ -80,6 +80,8 @@ struct lldp_module *(*register_tlv_table[])(void) = { | ||
227 | NULL, | ||
228 | }; | ||
229 | |||
230 | +struct lldp_head lldp_mod_head; | ||
231 | + | ||
232 | char *cfg_file_name = NULL; | ||
233 | bool daemonize = 0; | ||
234 | int loglvl = LOG_WARNING; | ||
235 | @@ -98,7 +100,7 @@ static void init_modules(void) | ||
236 | struct lldp_module *premod = NULL; | ||
237 | int i = 0; | ||
238 | |||
239 | - LIST_INIT(&lldp_head); | ||
240 | + LIST_INIT(&lldp_mod_head); | ||
241 | for (i = 0; register_tlv_table[i]; i++) { | ||
242 | module = register_tlv_table[i](); | ||
243 | if (!module) | ||
244 | @@ -106,7 +108,7 @@ static void init_modules(void) | ||
245 | if (premod) | ||
246 | LIST_INSERT_AFTER(premod, module, lldp); | ||
247 | else | ||
248 | - LIST_INSERT_HEAD(&lldp_head, module, lldp); | ||
249 | + LIST_INSERT_HEAD(&lldp_mod_head, module, lldp); | ||
250 | premod = module; | ||
251 | } | ||
252 | } | ||
253 | @@ -115,9 +117,9 @@ void deinit_modules(void) | ||
254 | { | ||
255 | struct lldp_module *module; | ||
256 | |||
257 | - while (lldp_head.lh_first != NULL) { | ||
258 | - module = lldp_head.lh_first; | ||
259 | - LIST_REMOVE(lldp_head.lh_first, lldp); | ||
260 | + while (lldp_mod_head.lh_first != NULL) { | ||
261 | + module = lldp_mod_head.lh_first; | ||
262 | + LIST_REMOVE(lldp_mod_head.lh_first, lldp); | ||
263 | module->ops->lldp_mod_unregister(module); | ||
264 | } | ||
265 | } | ||
266 | diff --git a/lldptool.c b/lldptool.c | ||
267 | index 2b14f61..664a248 100644 | ||
268 | --- a/lldptool.c | ||
269 | +++ b/lldptool.c | ||
270 | @@ -64,6 +64,8 @@ | ||
271 | #include "lldp_util.h" | ||
272 | #include "lldpad_status.h" | ||
273 | |||
274 | +struct lldp_head lldp_mod_head; | ||
275 | + | ||
276 | static int show_raw; | ||
277 | |||
278 | static const char *cli_version = | ||
279 | @@ -199,7 +201,7 @@ static void init_modules(void) | ||
280 | if (premod) | ||
281 | LIST_INSERT_AFTER(premod, module, lldp); | ||
282 | else | ||
283 | - LIST_INSERT_HEAD(&lldp_head, module, lldp); | ||
284 | + LIST_INSERT_HEAD(&lldp_mod_head, module, lldp); | ||
285 | premod = module; | ||
286 | } | ||
287 | } | ||
288 | @@ -208,9 +210,9 @@ void deinit_modules(void) | ||
289 | { | ||
290 | struct lldp_module *module; | ||
291 | |||
292 | - while (lldp_head.lh_first != NULL) { | ||
293 | - module = lldp_head.lh_first; | ||
294 | - LIST_REMOVE(lldp_head.lh_first, lldp); | ||
295 | + while (lldp_mod_head.lh_first != NULL) { | ||
296 | + module = lldp_mod_head.lh_first; | ||
297 | + LIST_REMOVE(lldp_mod_head.lh_first, lldp); | ||
298 | module->ops->lldp_mod_unregister(module); | ||
299 | } | ||
300 | } | ||
301 | @@ -346,7 +348,7 @@ cli_cmd_help(UNUSED struct clif *clif, UNUSED int argc, UNUSED char *argv[], | ||
302 | printf("%s\n%s\n%s", commands_usage, commands_options, commands_help); | ||
303 | |||
304 | printf("\nTLV identifiers:\n"); | ||
305 | - LIST_FOREACH(np, &lldp_head, lldp) | ||
306 | + LIST_FOREACH(np, &lldp_mod_head, lldp) | ||
307 | if (np->ops->print_help) | ||
308 | np->ops->print_help(); | ||
309 | return 0; | ||
310 | @@ -406,7 +408,7 @@ u32 lookup_tlvid(char *tlvid_str) | ||
311 | struct lldp_module *np; | ||
312 | u32 tlvid = INVALID_TLVID; | ||
313 | |||
314 | - LIST_FOREACH(np, &lldp_head, lldp) { | ||
315 | + LIST_FOREACH(np, &lldp_mod_head, lldp) { | ||
316 | if (np->ops->lookup_tlv_name) { | ||
317 | tlvid = np->ops->lookup_tlv_name(tlvid_str); | ||
318 | if (tlvid != INVALID_TLVID) | ||
319 | diff --git a/lldptool_cmds.c b/lldptool_cmds.c | ||
320 | index daef8c8..70b7b0d 100644 | ||
321 | --- a/lldptool_cmds.c | ||
322 | +++ b/lldptool_cmds.c | ||
323 | @@ -464,7 +464,7 @@ static void print_tlvs(struct cmd *cmd, char *ibuf) | ||
324 | offset += 8; | ||
325 | |||
326 | printed = 0; | ||
327 | - LIST_FOREACH(np, &lldp_head, lldp) { | ||
328 | + LIST_FOREACH(np, &lldp_mod_head, lldp) { | ||
329 | if (np->ops->print_tlv(tlvid, tlv_len, ibuf+offset)) { | ||
330 | printed = 1; | ||
331 | break; | ||
332 | diff --git a/qbg/ecp22.c b/qbg/ecp22.c | ||
333 | index 6561d14..825392b 100644 | ||
334 | --- a/qbg/ecp22.c | ||
335 | +++ b/qbg/ecp22.c | ||
336 | @@ -774,7 +774,7 @@ void ecp22_start(char *ifname) | ||
337 | struct ecp22 *ecp; | ||
338 | |||
339 | LLDPAD_DBG("%s:%s start ecp\n", __func__, ifname); | ||
340 | - eud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_ECP22); | ||
341 | + eud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_ECP22); | ||
342 | if (!eud) { | ||
343 | LLDPAD_DBG("%s:%s no ECP module\n", __func__, ifname); | ||
344 | return; | ||
345 | @@ -837,7 +837,7 @@ void ecp22_stop(char *ifname) | ||
346 | struct ecp22 *ecp; | ||
347 | |||
348 | LLDPAD_DBG("%s:%s stop ecp\n", __func__, ifname); | ||
349 | - eud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_ECP22); | ||
350 | + eud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_ECP22); | ||
351 | ecp = find_ecpdata(ifname, eud); | ||
352 | if (ecp) | ||
353 | ecp22_remove(ecp); | ||
354 | @@ -852,7 +852,7 @@ static int ecp22_data_from_evb(char *ifname, struct evb22_to_ecp22 *ptr) | ||
355 | struct ecp22_user_data *eud; | ||
356 | struct ecp22 *ecp; | ||
357 | |||
358 | - eud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_ECP22); | ||
359 | + eud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_ECP22); | ||
360 | ecp = find_ecpdata(ifname, eud); | ||
361 | if (ecp) { | ||
362 | ecp->max_rte = ptr->max_rte; | ||
363 | @@ -930,7 +930,7 @@ static int ecp22_req2send(char *ifname, unsigned short subtype, | ||
364 | |||
365 | LLDPAD_DBG("%s:%s subtype:%d\n", __func__, ifname, subtype); | ||
366 | |||
367 | - eud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_ECP22); | ||
368 | + eud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_ECP22); | ||
369 | ecp = find_ecpdata(ifname, eud); | ||
370 | if (!ecp) { | ||
371 | rc = -ENODEV; | ||
372 | diff --git a/qbg/vdp.c b/qbg/vdp.c | ||
373 | index d131560..c26bbd6 100644 | ||
374 | --- a/qbg/vdp.c | ||
375 | +++ b/qbg/vdp.c | ||
376 | @@ -188,7 +188,7 @@ struct vdp_data *vdp_data(char *ifname) | ||
377 | struct vdp_user_data *ud; | ||
378 | struct vdp_data *vd = NULL; | ||
379 | |||
380 | - ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_VDP02); | ||
381 | + ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_VDP02); | ||
382 | if (ud) { | ||
383 | LIST_FOREACH(vd, &ud->head, entry) { | ||
384 | if (!strncmp(ifname, vd->ifname, IFNAMSIZ)) | ||
385 | @@ -1624,7 +1624,7 @@ void vdp_ifup(char *ifname, struct lldp_agent *agent) | ||
386 | |||
387 | LIST_INIT(&vd->profile_head); | ||
388 | |||
389 | - ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_VDP02); | ||
390 | + ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_VDP02); | ||
391 | LIST_INSERT_HEAD(&ud->head, vd, entry); | ||
392 | |||
393 | out_start_again: | ||
394 | diff --git a/qbg/vdp22.c b/qbg/vdp22.c | ||
395 | index cf02310..81ea3a8 100644 | ||
396 | --- a/qbg/vdp22.c | ||
397 | +++ b/qbg/vdp22.c | ||
398 | @@ -694,7 +694,7 @@ static struct vdp22 *vdp22_findif(const char *ifname, | ||
399 | struct vdp22 *vdp = 0; | ||
400 | |||
401 | if (!ud) { | ||
402 | - ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_VDP22); | ||
403 | + ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_VDP22); | ||
404 | if (!ud) | ||
405 | LLDPAD_DBG("%s:%s no VDP22 module\n", __func__, | ||
406 | ifname); | ||
407 | @@ -794,7 +794,7 @@ void vdp22_stop(char *ifname) | ||
408 | struct vsi22 *vsi; | ||
409 | |||
410 | LLDPAD_DBG("%s:%s stop vdp\n", __func__, ifname); | ||
411 | - vud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_VDP22); | ||
412 | + vud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_VDP22); | ||
413 | if (!vud) { | ||
414 | LLDPAD_ERR("%s:%s no VDP22 module\n", __func__, ifname); | ||
415 | return; | ||
416 | @@ -874,7 +874,7 @@ void vdp22_start(const char *ifname, int role) | ||
417 | struct vsi22 *vsi; | ||
418 | |||
419 | LLDPAD_DBG("%s:%s start vdp\n", __func__, ifname); | ||
420 | - vud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_VDP22); | ||
421 | + vud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_VDP22); | ||
422 | if (!vud) { | ||
423 | LLDPAD_ERR("%s:%s no VDP22 module\n", __func__, ifname); | ||
424 | return; | ||
425 | diff --git a/qbg/vdp22_cmds.c b/qbg/vdp22_cmds.c | ||
426 | index 2e1bbbd..a8025ee 100644 | ||
427 | --- a/qbg/vdp22_cmds.c | ||
428 | +++ b/qbg/vdp22_cmds.c | ||
429 | @@ -57,7 +57,7 @@ static struct lldp_module *get_my_module(int thisid) | ||
430 | { | ||
431 | struct lldp_module *np = NULL; | ||
432 | |||
433 | - LIST_FOREACH(np, &lldp_head, lldp) | ||
434 | + LIST_FOREACH(np, &lldp_mod_head, lldp) | ||
435 | if (thisid == np->id) | ||
436 | break; | ||
437 | return np; | ||
438 | diff --git a/vdptool.c b/vdptool.c | ||
439 | index 8f36277..f1d946c 100644 | ||
440 | --- a/vdptool.c | ||
441 | +++ b/vdptool.c | ||
442 | @@ -61,6 +61,8 @@ | ||
443 | #define OUI_ENCODE_HNDLR(name) name##_oui_encode_hndlr | ||
444 | #define OUI_PRNT_DECODE_HNDLR(name) name##_oui_print_decode_hndlr | ||
445 | |||
446 | +struct lldp_head lldp_mod_head; | ||
447 | + | ||
448 | #define EXTERN_OUI_FN(name) \ | ||
449 | extern bool name##_oui_encode_hndlr(char *, char *, size_t); \ | ||
450 | extern void name##_oui_print_decode_hndlr(char *) | ||
451 | @@ -796,13 +798,13 @@ static void init_modules(void) | ||
452 | struct lldp_module *premod = NULL; | ||
453 | int i = 0; | ||
454 | |||
455 | - LIST_INIT(&lldp_head); | ||
456 | + LIST_INIT(&lldp_mod_head); | ||
457 | for (i = 0; register_tlv_table[i]; i++) { | ||
458 | module = register_tlv_table[i](); | ||
459 | if (premod) | ||
460 | LIST_INSERT_AFTER(premod, module, lldp); | ||
461 | else | ||
462 | - LIST_INSERT_HEAD(&lldp_head, module, lldp); | ||
463 | + LIST_INSERT_HEAD(&lldp_mod_head, module, lldp); | ||
464 | premod = module; | ||
465 | } | ||
466 | } | ||
467 | @@ -811,9 +813,9 @@ void deinit_modules(void) | ||
468 | { | ||
469 | struct lldp_module *module; | ||
470 | |||
471 | - while (lldp_head.lh_first != NULL) { | ||
472 | - module = lldp_head.lh_first; | ||
473 | - LIST_REMOVE(lldp_head.lh_first, lldp); | ||
474 | + while (lldp_mod_head.lh_first != NULL) { | ||
475 | + module = lldp_mod_head.lh_first; | ||
476 | + LIST_REMOVE(lldp_mod_head.lh_first, lldp); | ||
477 | module->ops->lldp_mod_unregister(module); | ||
478 | } | ||
479 | } | ||
480 | @@ -953,7 +955,7 @@ cli_cmd_help(UNUSED struct clif *clif, UNUSED int argc, UNUSED char *argv[], | ||
481 | printf("%s\n%s\n%s", commands_usage, commands_options, commands_help); | ||
482 | |||
483 | printf("\nTLV identifiers:\n"); | ||
484 | - LIST_FOREACH(np, &lldp_head, lldp) | ||
485 | + LIST_FOREACH(np, &lldp_mod_head, lldp) | ||
486 | if (np->ops->print_help) | ||
487 | np->ops->print_help(); | ||
488 | return 0; | ||
489 | @@ -1006,7 +1008,7 @@ u32 lookup_tlvid(char *tlvid_str) | ||
490 | struct lldp_module *np; | ||
491 | u32 tlvid = INVALID_TLVID; | ||
492 | |||
493 | - LIST_FOREACH(np, &lldp_head, lldp) { | ||
494 | + LIST_FOREACH(np, &lldp_mod_head, lldp) { | ||
495 | if (np->ops->lookup_tlv_name) { | ||
496 | tlvid = np->ops->lookup_tlv_name(tlvid_str); | ||
497 | if (tlvid != INVALID_TLVID) | ||
498 | -- | ||
499 | 2.28.0 | ||
500 | |||
diff --git a/meta-networking/recipes-protocols/openlldp/files/0003-lldp-add-packed-struct-definition.patch b/meta-networking/recipes-protocols/openlldp/files/0003-lldp-add-packed-struct-definition.patch deleted file mode 100644 index 4d0594cb6..000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0003-lldp-add-packed-struct-definition.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From 702dd20f43d9ca7e0bcb917e8acfec3f1acdcb5c Mon Sep 17 00:00:00 2001 | ||
2 | From: Aaron Conole <aconole@redhat.com> | ||
3 | Date: Mon, 3 Aug 2020 15:14:50 -0400 | ||
4 | Subject: [PATCH 3/9] lldp: add packed struct definition | ||
5 | |||
6 | Signed-off-by: Aaron Conole <aconole@redhat.com> | ||
7 | --- | ||
8 | include/lldp.h | 6 ++++++ | ||
9 | lldp/l2_packet.h | 5 ++--- | ||
10 | 2 files changed, 8 insertions(+), 3 deletions(-) | ||
11 | |||
12 | diff --git a/include/lldp.h b/include/lldp.h | ||
13 | index fb5ee93..de6a4ad 100644 | ||
14 | --- a/include/lldp.h | ||
15 | +++ b/include/lldp.h | ||
16 | @@ -255,5 +255,11 @@ enum { | ||
17 | #define LLDP_EVB_DEFAULT_RTE 15 | ||
18 | #define LLDP_EVB_DEFAULT_MAX_RTE 31 | ||
19 | |||
20 | +#ifndef _MSC_VER | ||
21 | +#define STRUCT_PACKED(STRUCT) STRUCT __attribute__((__packed__)) | ||
22 | +#else | ||
23 | +#define STRUCT_PACKED(STRUCT) __pragma(pack(push, 1)) STRUCT __pragma(pack(pop)) | ||
24 | +#endif | ||
25 | + | ||
26 | void somethingChangedLocal(const char *ifname, int type); | ||
27 | #endif /* _LLDP_H */ | ||
28 | diff --git a/lldp/l2_packet.h b/lldp/l2_packet.h | ||
29 | index 607b8a3..831958c 100644 | ||
30 | --- a/lldp/l2_packet.h | ||
31 | +++ b/lldp/l2_packet.h | ||
32 | @@ -58,12 +58,11 @@ | ||
33 | */ | ||
34 | struct l2_packet_data; | ||
35 | |||
36 | - | ||
37 | -struct l2_ethhdr { | ||
38 | +STRUCT_PACKED(struct l2_ethhdr { | ||
39 | u8 h_dest[ETH_ALEN]; | ||
40 | u8 h_source[ETH_ALEN]; | ||
41 | u16 h_proto; | ||
42 | -} STRUCT_PACKED; | ||
43 | +}); | ||
44 | |||
45 | /** | ||
46 | * l2_packet_init - Initialize l2_packet interface | ||
47 | -- | ||
48 | 2.28.0 | ||
49 | |||
diff --git a/meta-networking/recipes-protocols/openlldp/files/0004-clif-Include-string.h-for-mem-function-prototypes.patch b/meta-networking/recipes-protocols/openlldp/files/0004-clif-Include-string.h-for-mem-function-prototypes.patch new file mode 100644 index 000000000..b6d9cf770 --- /dev/null +++ b/meta-networking/recipes-protocols/openlldp/files/0004-clif-Include-string.h-for-mem-function-prototypes.patch | |||
@@ -0,0 +1,23 @@ | |||
1 | From d88aae2230683517b6d5b62cced51da81317a722 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Mon, 29 Aug 2022 22:37:14 -0700 | ||
4 | Subject: [PATCH] clif: Include string.h for mem* function prototypes | ||
5 | |||
6 | Upstream-Status: Submitted [https://github.com/intel/openlldp/pull/86] | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | --- | ||
9 | clif.c | 1 + | ||
10 | 1 file changed, 1 insertion(+) | ||
11 | |||
12 | diff --git a/clif.c b/clif.c | ||
13 | index cad6f75..0758a7e 100644 | ||
14 | --- a/clif.c | ||
15 | +++ b/clif.c | ||
16 | @@ -32,6 +32,7 @@ | ||
17 | |||
18 | #include <stdlib.h> | ||
19 | #include <stdio.h> | ||
20 | +#include <string.h> | ||
21 | #include <unistd.h> | ||
22 | #include <sys/types.h> | ||
23 | #include <sys/socket.h> | ||
diff --git a/meta-networking/recipes-protocols/openlldp/files/0004-lldptool-make-extern.patch b/meta-networking/recipes-protocols/openlldp/files/0004-lldptool-make-extern.patch deleted file mode 100644 index 16b7def68..000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0004-lldptool-make-extern.patch +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | From 8229f4fb700ba4fcb2ec3e9956491bf5ee8c0ae2 Mon Sep 17 00:00:00 2001 | ||
2 | From: Aaron Conole <aconole@redhat.com> | ||
3 | Date: Mon, 3 Aug 2020 15:17:31 -0400 | ||
4 | Subject: [PATCH 4/9] lldptool: make extern | ||
5 | |||
6 | This should only exist per final linked object. | ||
7 | |||
8 | Signed-off-by: Aaron Conole <aconole@redhat.com> | ||
9 | --- | ||
10 | include/lldptool.h | 2 +- | ||
11 | lldptool.c | 1 + | ||
12 | 2 files changed, 2 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/include/lldptool.h b/include/lldptool.h | ||
15 | index c919873..a190009 100644 | ||
16 | --- a/include/lldptool.h | ||
17 | +++ b/include/lldptool.h | ||
18 | @@ -29,7 +29,7 @@ | ||
19 | |||
20 | #include "clif.h" | ||
21 | |||
22 | -struct lldp_head lldp_cli_head; | ||
23 | +extern struct lldp_head lldp_cli_head; | ||
24 | |||
25 | int clif_command(struct clif *clif, char *cmd, int raw); | ||
26 | void print_raw_message(char *msg, int print); | ||
27 | diff --git a/lldptool.c b/lldptool.c | ||
28 | index 664a248..d76cc48 100644 | ||
29 | --- a/lldptool.c | ||
30 | +++ b/lldptool.c | ||
31 | @@ -64,6 +64,7 @@ | ||
32 | #include "lldp_util.h" | ||
33 | #include "lldpad_status.h" | ||
34 | |||
35 | +struct lldp_head lldp_cli_head; | ||
36 | struct lldp_head lldp_mod_head; | ||
37 | |||
38 | static int show_raw; | ||
39 | -- | ||
40 | 2.28.0 | ||
41 | |||
diff --git a/meta-networking/recipes-protocols/openlldp/files/0005-cisco_oui-match-encode-handler-prototypes.patch b/meta-networking/recipes-protocols/openlldp/files/0005-cisco_oui-match-encode-handler-prototypes.patch deleted file mode 100644 index 4bdc5f2f6..000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0005-cisco_oui-match-encode-handler-prototypes.patch +++ /dev/null | |||
@@ -1,28 +0,0 @@ | |||
1 | From 9203dec731e53fb72e1c0d62639e6e54378f66cc Mon Sep 17 00:00:00 2001 | ||
2 | From: Aaron Conole <aconole@redhat.com> | ||
3 | Date: Mon, 3 Aug 2020 15:20:59 -0400 | ||
4 | Subject: [PATCH 5/9] cisco_oui: match encode handler prototypes | ||
5 | |||
6 | The EXTERN_FN prototype generated requires size_t be the third parameter. | ||
7 | |||
8 | Signed-off-by: Aaron Conole <aconole@redhat.com> | ||
9 | --- | ||
10 | vdptool_cisco_oui.c | 2 +- | ||
11 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
12 | |||
13 | diff --git a/vdptool_cisco_oui.c b/vdptool_cisco_oui.c | ||
14 | index 7003521..3f88c76 100644 | ||
15 | --- a/vdptool_cisco_oui.c | ||
16 | +++ b/vdptool_cisco_oui.c | ||
17 | @@ -28,7 +28,7 @@ | ||
18 | #include "lldp_util.h" | ||
19 | #include "vdp_cisco.h" | ||
20 | |||
21 | -bool cisco_oui_encode_hndlr(char *dst, char *src, int len) | ||
22 | +bool cisco_oui_encode_hndlr(char *dst, char *src, size_t len) | ||
23 | { | ||
24 | char *src_temp = strdup(src); | ||
25 | char *key, *data; | ||
26 | -- | ||
27 | 2.28.0 | ||
28 | |||
diff --git a/meta-networking/recipes-protocols/openlldp/files/0006-ecp22-make-enum-a-type-rather-than-instance.patch b/meta-networking/recipes-protocols/openlldp/files/0006-ecp22-make-enum-a-type-rather-than-instance.patch deleted file mode 100644 index 2b0289df2..000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0006-ecp22-make-enum-a-type-rather-than-instance.patch +++ /dev/null | |||
@@ -1,33 +0,0 @@ | |||
1 | From 2723219c08726efa08a6bad04ffb775f850a96bc Mon Sep 17 00:00:00 2001 | ||
2 | From: Aaron Conole <aconole@redhat.com> | ||
3 | Date: Mon, 3 Aug 2020 15:23:28 -0400 | ||
4 | Subject: [PATCH 6/9] ecp22: make enum a type rather than instance | ||
5 | |||
6 | The enum defined in the qbg header is setup as a discreet instance | ||
7 | rather than a type. Fix this. | ||
8 | |||
9 | Signed-off-by: Aaron Conole <aconole@redhat.com> | ||
10 | --- | ||
11 | include/qbg_ecp22.h | 4 ++-- | ||
12 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
13 | |||
14 | diff --git a/include/qbg_ecp22.h b/include/qbg_ecp22.h | ||
15 | index 567f6df..fe66bb3 100644 | ||
16 | --- a/include/qbg_ecp22.h | ||
17 | +++ b/include/qbg_ecp22.h | ||
18 | @@ -49,10 +49,10 @@ enum { /* ECP Transmit states */ | ||
19 | ECP22_TX_ERROR | ||
20 | }; | ||
21 | |||
22 | -enum { | ||
23 | +enum ecp22_mode { | ||
24 | ECP22_REQUEST = 0, | ||
25 | ECP22_ACK | ||
26 | -} ecp22_mode; | ||
27 | +}; | ||
28 | |||
29 | struct ecp22_hdr { /* ECP22 header */ | ||
30 | u16 ver_op_sub; /* ECP22 version, operation, subtype */ | ||
31 | -- | ||
32 | 2.28.0 | ||
33 | |||
diff --git a/meta-networking/recipes-protocols/openlldp/files/0007-lldp_8021qaz-extern-config-object.patch b/meta-networking/recipes-protocols/openlldp/files/0007-lldp_8021qaz-extern-config-object.patch deleted file mode 100644 index 36b575c56..000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0007-lldp_8021qaz-extern-config-object.patch +++ /dev/null | |||
@@ -1,29 +0,0 @@ | |||
1 | From 275fe9da663193a843de450f03e810daedc06955 Mon Sep 17 00:00:00 2001 | ||
2 | From: Aaron Conole <aconole@redhat.com> | ||
3 | Date: Mon, 3 Aug 2020 15:25:38 -0400 | ||
4 | Subject: [PATCH 7/9] lldp_8021qaz: extern config object | ||
5 | |||
6 | The config object only exists as part of the config translation unit | ||
7 | so remove the extra config object in the 8021qaz module. | ||
8 | |||
9 | Signed-off-by: Aaron Conole <aconole@redhat.com> | ||
10 | --- | ||
11 | lldp_8021qaz.c | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/lldp_8021qaz.c b/lldp_8021qaz.c | ||
15 | index a42fd11..673d758 100644 | ||
16 | --- a/lldp_8021qaz.c | ||
17 | +++ b/lldp_8021qaz.c | ||
18 | @@ -49,7 +49,7 @@ | ||
19 | |||
20 | |||
21 | struct lldp_head lldp_head; | ||
22 | -struct config_t lldpad_cfg; | ||
23 | +extern config_t lldpad_cfg; | ||
24 | extern bool read_only_8021qaz; | ||
25 | |||
26 | static int ieee8021qaz_check_pending(struct port *port, struct lldp_agent *); | ||
27 | -- | ||
28 | 2.28.0 | ||
29 | |||
diff --git a/meta-networking/recipes-protocols/openlldp/files/0008-stringops-fix-some-string-copy-errors.patch b/meta-networking/recipes-protocols/openlldp/files/0008-stringops-fix-some-string-copy-errors.patch deleted file mode 100644 index 501b66699..000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0008-stringops-fix-some-string-copy-errors.patch +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | From 61291de03cb6dd1aea2a633eb72951f3fe453e7f Mon Sep 17 00:00:00 2001 | ||
2 | From: Aaron Conole <aconole@redhat.com> | ||
3 | Date: Mon, 3 Aug 2020 15:33:08 -0400 | ||
4 | Subject: [PATCH 8/9] stringops: fix some string copy errors | ||
5 | |||
6 | Reported when using gcc-10. | ||
7 | |||
8 | Signed-off-by: Aaron Conole <aconole@redhat.com> | ||
9 | --- | ||
10 | dcb_protocol.c | 13 ++++--------- | ||
11 | lldp/ports.c | 2 +- | ||
12 | 2 files changed, 5 insertions(+), 10 deletions(-) | ||
13 | |||
14 | diff --git a/dcb_protocol.c b/dcb_protocol.c | ||
15 | index 75ca139..930251b 100644 | ||
16 | --- a/dcb_protocol.c | ||
17 | +++ b/dcb_protocol.c | ||
18 | @@ -2257,13 +2257,8 @@ cmd_status get_bwg_descrpt(char *device_name, u8 bwgid, char **name) | ||
19 | |||
20 | if ((it != NULL) && | ||
21 | (bwgid < it->second->max_pgid_desc)) { | ||
22 | - size = (int)strlen(it->second->pgid_desc[bwgid]) + | ||
23 | - sizeof(char); /* Localization OK */ | ||
24 | - *name = (char*)malloc(size); | ||
25 | - if (*name != NULL) { | ||
26 | - strncpy(*name, it->second->pgid_desc[bwgid], | ||
27 | - size); /* Localization OK */ | ||
28 | - } else { | ||
29 | + *name = strdup(it->second->pgid_desc[bwgid]); | ||
30 | + if (*name == NULL) { | ||
31 | goto Error; | ||
32 | } | ||
33 | } else { | ||
34 | @@ -2272,9 +2267,9 @@ cmd_status get_bwg_descrpt(char *device_name, u8 bwgid, char **name) | ||
35 | size = (int)strlen( | ||
36 | attribs.descript.pgid_desc[bwgid]) + | ||
37 | sizeof(char); | ||
38 | - *name = (char*)malloc(size); | ||
39 | + *name = (char*)calloc(size, sizeof(char)); | ||
40 | if (*name != NULL) { | ||
41 | - memcpy(*name, attribs.descript.pgid_desc[bwgid], size); /* Localization OK */ | ||
42 | + memcpy(*name, attribs.descript.pgid_desc[bwgid], size - 1); /* Localization OK */ | ||
43 | } else { | ||
44 | goto Error; | ||
45 | } | ||
46 | diff --git a/lldp/ports.c b/lldp/ports.c | ||
47 | index 6384f14..9b681f7 100644 | ||
48 | --- a/lldp/ports.c | ||
49 | +++ b/lldp/ports.c | ||
50 | @@ -264,7 +264,7 @@ struct port *add_port(int ifindex, const char *ifname) | ||
51 | memset(newport, 0, sizeof(*newport)); | ||
52 | newport->ifindex = ifindex; | ||
53 | newport->next = NULL; | ||
54 | - strncpy(newport->ifname, ifname, IFNAMSIZ); | ||
55 | + strncpy(newport->ifname, ifname, IFNAMSIZ - 1); | ||
56 | |||
57 | newport->bond_master = is_bond(ifname); | ||
58 | /* Initialize relevant port variables */ | ||
59 | -- | ||
60 | 2.28.0 | ||
61 | |||
diff --git a/meta-networking/recipes-protocols/openlldp/files/0009-8021qaz-mark-prio-map-functions-static.patch b/meta-networking/recipes-protocols/openlldp/files/0009-8021qaz-mark-prio-map-functions-static.patch deleted file mode 100644 index 0f84426f9..000000000 --- a/meta-networking/recipes-protocols/openlldp/files/0009-8021qaz-mark-prio-map-functions-static.patch +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | From 7ae79b0dff53a23fa0a964f77b9e3bb387a293c4 Mon Sep 17 00:00:00 2001 | ||
2 | From: Aaron Conole <aconole@redhat.com> | ||
3 | Date: Tue, 4 Aug 2020 09:17:50 -0400 | ||
4 | Subject: [PATCH 9/9] 8021qaz: mark prio map functions static | ||
5 | |||
6 | Inline is not the correct way to mark a function for inclusion | ||
7 | in a single translation unit. Use 'static' to restrict export | ||
8 | of these functions. | ||
9 | |||
10 | Signed-off-by: Aaron Conole <aconole@redhat.com> | ||
11 | --- | ||
12 | lldp_8021qaz.c | 4 ++-- | ||
13 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/lldp_8021qaz.c b/lldp_8021qaz.c | ||
16 | index 673d758..16ae167 100644 | ||
17 | --- a/lldp_8021qaz.c | ||
18 | +++ b/lldp_8021qaz.c | ||
19 | @@ -397,7 +397,7 @@ static int read_cfg_file(char *ifname, struct lldp_agent *agent, | ||
20 | return 0; | ||
21 | } | ||
22 | |||
23 | -inline int get_prio_map(u32 prio_map, int prio) | ||
24 | +static int get_prio_map(u32 prio_map, int prio) | ||
25 | { | ||
26 | if (prio > 7) | ||
27 | return 0; | ||
28 | @@ -405,7 +405,7 @@ inline int get_prio_map(u32 prio_map, int prio) | ||
29 | return (prio_map >> (4 * (7-prio))) & 0xF; | ||
30 | } | ||
31 | |||
32 | -inline void set_prio_map(u32 *prio_map, u8 prio, int tc) | ||
33 | +static void set_prio_map(u32 *prio_map, u8 prio, int tc) | ||
34 | { | ||
35 | u32 mask = ~(0xffffffff & (0xF << (4 * (7-prio)))); | ||
36 | *prio_map &= mask; | ||
37 | -- | ||
38 | 2.28.0 | ||
39 | |||
diff --git a/meta-networking/recipes-protocols/openlldp/files/lldp_head-remove-all-references.patch b/meta-networking/recipes-protocols/openlldp/files/lldp_head-remove-all-references.patch deleted file mode 100644 index bb3400cfa..000000000 --- a/meta-networking/recipes-protocols/openlldp/files/lldp_head-remove-all-references.patch +++ /dev/null | |||
@@ -1,331 +0,0 @@ | |||
1 | From ed6a8e5a75f56b7034a46294a0bf2a9a7fd14fbc Mon Sep 17 00:00:00 2001 | ||
2 | From: Aaron Conole <aconole@redhat.com> | ||
3 | Date: Fri, 23 Oct 2020 14:40:32 -0400 | ||
4 | Subject: [PATCH] lldp_head: remove all references | ||
5 | |||
6 | There were a number of references missed during the module cleanup. This hits the remaining | ||
7 | ones. | ||
8 | |||
9 | Fixes: 07a83c583b9d ("lldp_head: rename and make extern") | ||
10 | Signed-off-by: Aaron Conole <aconole@redhat.com> | ||
11 | |||
12 | Reference to upstream patch: | ||
13 | https://github.com/intel/openlldp/commit/ed6a8e5a75f56b7034a46294a0bf2a9a7fd14fbc | ||
14 | |||
15 | Signed-off-by: Li Wang <li.wang@windriver.com> | ||
16 | --- | ||
17 | ctrl_iface.c | 4 +--- | ||
18 | lldp_8021qaz.c | 11 +++++------ | ||
19 | lldp_8023.c | 6 ++---- | ||
20 | lldp_basman.c | 6 ++---- | ||
21 | lldp_evb.c | 6 ++---- | ||
22 | lldp_evb22.c | 6 ++---- | ||
23 | lldp_mand.c | 10 ++++------ | ||
24 | lldp_med.c | 6 ++---- | ||
25 | qbg_utils.c | 3 +-- | ||
26 | 9 files changed, 21 insertions(+), 37 deletions(-) | ||
27 | |||
28 | diff --git a/ctrl_iface.c b/ctrl_iface.c | ||
29 | index 1734f49..666f7c8 100644 | ||
30 | --- a/ctrl_iface.c | ||
31 | +++ b/ctrl_iface.c | ||
32 | @@ -53,8 +53,6 @@ | ||
33 | #include "lldp_util.h" | ||
34 | #include "messages.h" | ||
35 | |||
36 | -extern struct lldp_head lldp_head; | ||
37 | - | ||
38 | struct ctrl_dst { | ||
39 | struct ctrl_dst *next; | ||
40 | struct sockaddr_un addr; | ||
41 | @@ -116,7 +114,7 @@ int clif_iface_module(struct clif_data *clifd, | ||
42 | return cmd_invalid; | ||
43 | } | ||
44 | |||
45 | - mod = find_module_by_id(&lldp_head, module_id); | ||
46 | + mod = find_module_by_id(&lldp_mod_head, module_id); | ||
47 | if (mod && mod->ops && mod->ops->client_cmd) | ||
48 | return (mod->ops->client_cmd)(clifd, from, fromlen, | ||
49 | cmd_start, cmd_len, rbuf+strlen(rbuf), rlen); | ||
50 | diff --git a/lldp_8021qaz.c b/lldp_8021qaz.c | ||
51 | index 16ae167..e747710 100644 | ||
52 | --- a/lldp_8021qaz.c | ||
53 | +++ b/lldp_8021qaz.c | ||
54 | @@ -48,7 +48,6 @@ | ||
55 | #include "lldp_dcbx.h" | ||
56 | |||
57 | |||
58 | -struct lldp_head lldp_head; | ||
59 | extern config_t lldpad_cfg; | ||
60 | extern bool read_only_8021qaz; | ||
61 | |||
62 | @@ -84,7 +83,7 @@ static int ieee8021qaz_check_pending(struct port *port, | ||
63 | if (!port->portEnabled) | ||
64 | return 0; | ||
65 | |||
66 | - iud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_8021QAZ); | ||
67 | + iud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_8021QAZ); | ||
68 | if (iud) { | ||
69 | LIST_FOREACH(tlv, &iud->head, entry) { | ||
70 | if (!strncmp(port->ifname, tlv->ifname, IFNAMSIZ)) { | ||
71 | @@ -143,7 +142,7 @@ struct ieee8021qaz_tlvs *ieee8021qaz_data(const char *ifname) | ||
72 | struct ieee8021qaz_user_data *iud; | ||
73 | struct ieee8021qaz_tlvs *tlv = NULL; | ||
74 | |||
75 | - iud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_8021QAZ); | ||
76 | + iud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_8021QAZ); | ||
77 | if (iud) { | ||
78 | LIST_FOREACH(tlv, &iud->head, entry) { | ||
79 | if (!strncmp(tlv->ifname, ifname, IFNAMSIZ)) | ||
80 | @@ -629,7 +628,7 @@ void ieee8021qaz_ifup(char *ifname, struct lldp_agent *agent) | ||
81 | LIST_INIT(&tlvs->app_head); | ||
82 | read_cfg_file(port->ifname, agent, tlvs); | ||
83 | |||
84 | - iud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_8021QAZ); | ||
85 | + iud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_8021QAZ); | ||
86 | LIST_INSERT_HEAD(&iud->head, tlvs, entry); | ||
87 | |||
88 | initialized: | ||
89 | @@ -2179,7 +2178,7 @@ int ieee8021qaz_tlvs_rxed(const char *ifname) | ||
90 | struct ieee8021qaz_user_data *iud; | ||
91 | struct ieee8021qaz_tlvs *tlv = NULL; | ||
92 | |||
93 | - iud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_8021QAZ); | ||
94 | + iud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_8021QAZ); | ||
95 | if (iud) { | ||
96 | LIST_FOREACH(tlv, &iud->head, entry) { | ||
97 | if (!strncmp(tlv->ifname, ifname, IFNAMSIZ)) | ||
98 | @@ -2198,7 +2197,7 @@ int ieee8021qaz_check_active(const char *ifname) | ||
99 | struct ieee8021qaz_user_data *iud; | ||
100 | struct ieee8021qaz_tlvs *tlv = NULL; | ||
101 | |||
102 | - iud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_8021QAZ); | ||
103 | + iud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_8021QAZ); | ||
104 | if (iud) { | ||
105 | LIST_FOREACH(tlv, &iud->head, entry) { | ||
106 | if (!strncmp(tlv->ifname, ifname, IFNAMSIZ)) | ||
107 | diff --git a/lldp_8023.c b/lldp_8023.c | ||
108 | index 422026e..8a03211 100644 | ||
109 | --- a/lldp_8023.c | ||
110 | +++ b/lldp_8023.c | ||
111 | @@ -39,8 +39,6 @@ | ||
112 | #include "lldp_8023_clif.h" | ||
113 | #include "lldp_8023_cmds.h" | ||
114 | |||
115 | -extern struct lldp_head lldp_head; | ||
116 | - | ||
117 | struct tlv_info_8023_maccfg { | ||
118 | u8 oui[3]; | ||
119 | u8 sub; | ||
120 | @@ -84,7 +82,7 @@ static struct ieee8023_data *ieee8023_data(const char *ifname, enum agent_type t | ||
121 | struct ieee8023_user_data *ud; | ||
122 | struct ieee8023_data *bd = NULL; | ||
123 | |||
124 | - ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_8023); | ||
125 | + ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_8023); | ||
126 | if (ud) { | ||
127 | LIST_FOREACH(bd, &ud->head, entry) { | ||
128 | if (!strncmp(ifname, bd->ifname, IFNAMSIZ) && | ||
129 | @@ -456,7 +454,7 @@ void ieee8023_ifup(char *ifname, struct lldp_agent *agent) | ||
130 | goto out_err; | ||
131 | } | ||
132 | |||
133 | - ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_8023); | ||
134 | + ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_8023); | ||
135 | LIST_INSERT_HEAD(&ud->head, bd, entry); | ||
136 | LLDPAD_INFO("%s:port %s added\n", __func__, ifname); | ||
137 | return; | ||
138 | diff --git a/lldp_basman.c b/lldp_basman.c | ||
139 | index a4f69c1..614e2a2 100644 | ||
140 | --- a/lldp_basman.c | ||
141 | +++ b/lldp_basman.c | ||
142 | @@ -75,8 +75,6 @@ struct tlv_info_manaddr { | ||
143 | struct tlv_info_maoid o; | ||
144 | } __attribute__ ((__packed__)); | ||
145 | |||
146 | -extern struct lldp_head lldp_head; | ||
147 | - | ||
148 | static const struct lldp_mod_ops basman_ops = { | ||
149 | .lldp_mod_register = basman_register, | ||
150 | .lldp_mod_unregister = basman_unregister, | ||
151 | @@ -91,7 +89,7 @@ static struct basman_data *basman_data(const char *ifname, enum agent_type type) | ||
152 | struct basman_user_data *bud; | ||
153 | struct basman_data *bd = NULL; | ||
154 | |||
155 | - bud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_BASIC); | ||
156 | + bud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_BASIC); | ||
157 | if (bud) { | ||
158 | LIST_FOREACH(bd, &bud->head, entry) { | ||
159 | if (!strncmp(ifname, bd->ifname, IFNAMSIZ) && | ||
160 | @@ -688,7 +686,7 @@ void basman_ifup(char *ifname, struct lldp_agent *agent) | ||
161 | goto out_err; | ||
162 | } | ||
163 | |||
164 | - bud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_BASIC); | ||
165 | + bud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_BASIC); | ||
166 | LIST_INSERT_HEAD(&bud->head, bd, entry); | ||
167 | LLDPAD_DBG("%s:port %s added\n", __func__, ifname); | ||
168 | return; | ||
169 | diff --git a/lldp_evb.c b/lldp_evb.c | ||
170 | index dcdcc7e..a8f3965 100644 | ||
171 | --- a/lldp_evb.c | ||
172 | +++ b/lldp_evb.c | ||
173 | @@ -36,14 +36,12 @@ | ||
174 | #include "messages.h" | ||
175 | #include "config.h" | ||
176 | |||
177 | -extern struct lldp_head lldp_head; | ||
178 | - | ||
179 | struct evb_data *evb_data(char *ifname, enum agent_type type) | ||
180 | { | ||
181 | struct evb_user_data *ud; | ||
182 | struct evb_data *ed = NULL; | ||
183 | |||
184 | - ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_EVB); | ||
185 | + ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_EVB); | ||
186 | if (ud) { | ||
187 | LIST_FOREACH(ed, &ud->head, entry) { | ||
188 | if (!strncmp(ifname, ed->ifname, IFNAMSIZ) && | ||
189 | @@ -347,7 +345,7 @@ static void evb_ifup(char *ifname, struct lldp_agent *agent) | ||
190 | |||
191 | evb_init_tlv(ed, agent); | ||
192 | |||
193 | - ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_EVB); | ||
194 | + ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_EVB); | ||
195 | LIST_INSERT_HEAD(&ud->head, ed, entry); | ||
196 | LLDPAD_DBG("%s:%s agent %d added\n", __func__, ifname, agent->type); | ||
197 | } | ||
198 | diff --git a/lldp_evb22.c b/lldp_evb22.c | ||
199 | index 76ba883..6e92d9d 100644 | ||
200 | --- a/lldp_evb22.c | ||
201 | +++ b/lldp_evb22.c | ||
202 | @@ -37,14 +37,12 @@ | ||
203 | #include "messages.h" | ||
204 | #include "config.h" | ||
205 | |||
206 | -extern struct lldp_head lldp_head; | ||
207 | - | ||
208 | struct evb22_data *evb22_data(char *ifname, enum agent_type type) | ||
209 | { | ||
210 | struct evb22_user_data *ud; | ||
211 | struct evb22_data *ed = NULL; | ||
212 | |||
213 | - ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_EVB22); | ||
214 | + ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_EVB22); | ||
215 | if (ud) { | ||
216 | LIST_FOREACH(ed, &ud->head, entry) { | ||
217 | if (!strncmp(ifname, ed->ifname, IFNAMSIZ) && | ||
218 | @@ -453,7 +451,7 @@ static void evb22_ifup(char *ifname, struct lldp_agent *agent) | ||
219 | STRNCPY_TERMINATED(ed->ifname, ifname, IFNAMSIZ); | ||
220 | ed->agenttype = agent->type; | ||
221 | evb22_init_tlv(ed, agent); | ||
222 | - ud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_EVB22); | ||
223 | + ud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_EVB22); | ||
224 | LIST_INSERT_HEAD(&ud->head, ed, entry); | ||
225 | LLDPAD_DBG("%s:%s agent %d added\n", __func__, ifname, agent->type); | ||
226 | } | ||
227 | diff --git a/lldp_mand.c b/lldp_mand.c | ||
228 | index 0db63cb..b857a88 100644 | ||
229 | --- a/lldp_mand.c | ||
230 | +++ b/lldp_mand.c | ||
231 | @@ -42,8 +42,6 @@ | ||
232 | #include "lldp/l2_packet.h" | ||
233 | #include "lldp_tlv.h" | ||
234 | |||
235 | -extern struct lldp_head lldp_head; | ||
236 | - | ||
237 | static const struct lldp_mod_ops mand_ops = { | ||
238 | .lldp_mod_register = mand_register, | ||
239 | .lldp_mod_unregister = mand_unregister, | ||
240 | @@ -59,7 +57,7 @@ struct mand_data *mand_data(const char *ifname, enum agent_type type) | ||
241 | struct mand_user_data *mud; | ||
242 | struct mand_data *md = NULL; | ||
243 | |||
244 | - mud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_MAND); | ||
245 | + mud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_MAND); | ||
246 | if (mud) { | ||
247 | LIST_FOREACH(md, &mud->head, entry) { | ||
248 | if (!strncmp(ifname, md->ifname, IFNAMSIZ) && | ||
249 | @@ -608,7 +606,7 @@ void mand_ifup(char *ifname, struct lldp_agent *agent) | ||
250 | STRNCPY_TERMINATED(md->ifname, ifname, IFNAMSIZ); | ||
251 | md->agenttype = agent->type; | ||
252 | |||
253 | - mud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_MAND); | ||
254 | + mud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_MAND); | ||
255 | LIST_INSERT_HEAD(&mud->head, md, entry); | ||
256 | } | ||
257 | |||
258 | @@ -636,7 +634,7 @@ struct lldp_module *mand_register(void) | ||
259 | LLDPAD_ERR("failed to malloc LLDP Mandatory module data\n"); | ||
260 | goto out_err; | ||
261 | } | ||
262 | - mud = malloc(sizeof(struct mand_user_data)); | ||
263 | + mud = malloc(sizeof(struct mand_user_data)); | ||
264 | if (!mud) { | ||
265 | free(mod); | ||
266 | LLDPAD_ERR("failed to malloc LLDP Mandatory module user data\n"); | ||
267 | @@ -644,8 +642,8 @@ struct lldp_module *mand_register(void) | ||
268 | } | ||
269 | LIST_INIT(&mud->head); | ||
270 | mod->id = LLDP_MOD_MAND; | ||
271 | + mod->data = mud; | ||
272 | mod->ops = &mand_ops; | ||
273 | - mod->data = mud; | ||
274 | LLDPAD_INFO("%s:done\n", __func__); | ||
275 | return mod; | ||
276 | out_err: | ||
277 | diff --git a/lldp_med.c b/lldp_med.c | ||
278 | index f6c373e..7b6996e 100644 | ||
279 | --- a/lldp_med.c | ||
280 | +++ b/lldp_med.c | ||
281 | @@ -40,8 +40,6 @@ | ||
282 | #include "lldp_mand_clif.h" | ||
283 | #include "lldp_med_cmds.h" | ||
284 | |||
285 | -extern struct lldp_head lldp_head; | ||
286 | - | ||
287 | struct tlv_info_medcaps { | ||
288 | u8 oui[OUI_SIZE]; | ||
289 | u8 subtype; | ||
290 | @@ -95,7 +93,7 @@ static struct med_data *med_data(const char *ifname, enum agent_type type) | ||
291 | struct med_user_data *mud; | ||
292 | struct med_data *md = NULL; | ||
293 | |||
294 | - mud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_MED); | ||
295 | + mud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_MED); | ||
296 | if (mud) { | ||
297 | LIST_FOREACH(md, &mud->head, entry) { | ||
298 | if (!strncmp(ifname, md->ifname, IFNAMSIZ) && | ||
299 | @@ -914,7 +912,7 @@ void med_ifup(char *ifname, struct lldp_agent *agent) | ||
300 | free(md); | ||
301 | goto out_err; | ||
302 | } | ||
303 | - mud = find_module_user_data_by_id(&lldp_head, LLDP_MOD_MED); | ||
304 | + mud = find_module_user_data_by_id(&lldp_mod_head, LLDP_MOD_MED); | ||
305 | LIST_INSERT_HEAD(&mud->head, md, entry); | ||
306 | LLDPAD_INFO("%s:port %s added\n", __func__, ifname); | ||
307 | return; | ||
308 | diff --git a/qbg_utils.c b/qbg_utils.c | ||
309 | index 9daeade..0d40c5b 100644 | ||
310 | --- a/qbg_utils.c | ||
311 | +++ b/qbg_utils.c | ||
312 | @@ -36,7 +36,6 @@ | ||
313 | #include "qbg_utils.h" | ||
314 | |||
315 | extern int loglvl; /* Global lldpad log level */ | ||
316 | -extern struct lldp_head lldp_head; | ||
317 | |||
318 | /* | ||
319 | * hexdump_frame - print raw evb/ecp/vdp frame | ||
320 | @@ -73,7 +72,7 @@ void hexdump_frame(const char *ifname, char *txt, const unsigned char *buf, | ||
321 | */ | ||
322 | int modules_notify(int id, int sender_id, char *ifname, void *data) | ||
323 | { | ||
324 | - struct lldp_module *mp = find_module_by_id(&lldp_head, id); | ||
325 | + struct lldp_module *mp = find_module_by_id(&lldp_mod_head, id); | ||
326 | int rc = 0; | ||
327 | |||
328 | if (mp && mp->ops->lldp_mod_notify) | ||
329 | -- | ||
330 | 2.18.1 | ||
331 | |||
diff --git a/meta-networking/recipes-protocols/openlldp/openlldp_1.0.1.bb b/meta-networking/recipes-protocols/openlldp/openlldp_1.1.0.bb index acde9c365..812f4fbcf 100644 --- a/meta-networking/recipes-protocols/openlldp/openlldp_1.0.1.bb +++ b/meta-networking/recipes-protocols/openlldp/openlldp_1.1.0.bb | |||
@@ -12,27 +12,15 @@ inherit ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} | |||
12 | 12 | ||
13 | DEPENDS = "libnl libconfig readline" | 13 | DEPENDS = "libnl libconfig readline" |
14 | 14 | ||
15 | SRCREV = "b71bfb87fefb31c4b1a6a7ae351791c90966c3a8" | 15 | SRCREV = "85e55837a81d710e5baa7da47f7ed0d205c8ede5" |
16 | PV .= "+git${SRCPV}" | 16 | PV .= "+git${SRCPV}" |
17 | SRC_URI = "git://github.com/intel/openlldp.git;protocol=https;branch=master \ | 17 | SRC_URI = "git://github.com/intel/openlldp.git;protocol=https;branch=branch-1.1 \ |
18 | file://0001-Fix-musl-libc-build-issue.patch \ | 18 | file://0001-Fix-musl-libc-build-issue.patch \ |
19 | file://0001-autotools-Add-include-path-to-generated-version.h.patch \ | 19 | file://0001-autotools-Add-include-path-to-generated-version.h.patch \ |
20 | file://0001-autotools-Add-option-to-disable-installation-of-syst.patch \ | 20 | file://0001-autotools-Add-option-to-disable-installation-of-syst.patch \ |
21 | file://0001-cmds-fix-enum-conversion.patch \ | 21 | file://0004-clif-Include-string.h-for-mem-function-prototypes.patch \ |
22 | file://0002-lldp_head-rename-and-make-extern.patch \ | ||
23 | file://0003-lldp-add-packed-struct-definition.patch \ | ||
24 | file://0004-lldptool-make-extern.patch \ | ||
25 | file://0005-cisco_oui-match-encode-handler-prototypes.patch \ | ||
26 | file://0006-ecp22-make-enum-a-type-rather-than-instance.patch \ | ||
27 | file://0007-lldp_8021qaz-extern-config-object.patch \ | ||
28 | file://0008-stringops-fix-some-string-copy-errors.patch \ | ||
29 | file://0009-8021qaz-mark-prio-map-functions-static.patch \ | ||
30 | file://lldp_head-remove-all-references.patch \ | ||
31 | " | 22 | " |
32 | 23 | ||
33 | # Makefile.am adds -Werror to AM_CFLAGS. There are warnings so disable it. | ||
34 | TARGET_CFLAGS += "-Wno-error" | ||
35 | |||
36 | # Enable install of systemd conf files. | 24 | # Enable install of systemd conf files. |
37 | EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_system_unitdir}', '', d)}" | 25 | EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_system_unitdir}', '', d)}" |
38 | 26 | ||