diff options
-rw-r--r-- | meta-networking/recipes-filter/libnftnl/libnftnl/0001-Move-exports-before-symbol-definition.patch | 294 | ||||
-rw-r--r-- | meta-networking/recipes-filter/libnftnl/libnftnl/0001-avoid-naming-local-function-as-one-of-printf-family.patch (renamed from meta-networking/recipes-filter/libnftnl/libnftnl/0002-avoid-naming-local-function-as-one-of-printf-family.patch) | 19 | ||||
-rw-r--r-- | meta-networking/recipes-filter/libnftnl/libnftnl_1.1.5.bb (renamed from meta-networking/recipes-filter/libnftnl/libnftnl_1.1.4.bb) | 5 |
3 files changed, 18 insertions, 300 deletions
diff --git a/meta-networking/recipes-filter/libnftnl/libnftnl/0001-Move-exports-before-symbol-definition.patch b/meta-networking/recipes-filter/libnftnl/libnftnl/0001-Move-exports-before-symbol-definition.patch deleted file mode 100644 index 699d0d922b..0000000000 --- a/meta-networking/recipes-filter/libnftnl/libnftnl/0001-Move-exports-before-symbol-definition.patch +++ /dev/null | |||
@@ -1,294 +0,0 @@ | |||
1 | From 6b76c76e6b3f93c422d666f49ee68df9d5426078 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alex Kiernan <alex.kiernan@gmail.com> | ||
3 | Date: Wed, 7 Nov 2018 21:19:53 +0000 | ||
4 | Subject: [PATCH] Move exports before symbol definition | ||
5 | |||
6 | Based on 7966020 ("src: Fix exporting symbols with clang"), when | ||
7 | EXPORT_SYMBOL is located after function definition, clang won't properly | ||
8 | export the function, resulting in a library with no symbols when built with | ||
9 | clang. | ||
10 | |||
11 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
12 | --- | ||
13 | src/flowtable.c | 54 ++++++++++++++++++++++++------------------------- | ||
14 | 1 file changed, 27 insertions(+), 27 deletions(-) | ||
15 | |||
16 | diff --git a/src/flowtable.c b/src/flowtable.c | ||
17 | index 1f7ba30..80de952 100644 | ||
18 | --- a/src/flowtable.c | ||
19 | +++ b/src/flowtable.c | ||
20 | @@ -34,12 +34,13 @@ struct nftnl_flowtable { | ||
21 | uint32_t flags; | ||
22 | }; | ||
23 | |||
24 | +EXPORT_SYMBOL(nftnl_flowtable_alloc); | ||
25 | struct nftnl_flowtable *nftnl_flowtable_alloc(void) | ||
26 | { | ||
27 | return calloc(1, sizeof(struct nftnl_flowtable)); | ||
28 | } | ||
29 | -EXPORT_SYMBOL(nftnl_flowtable_alloc); | ||
30 | |||
31 | +EXPORT_SYMBOL(nftnl_flowtable_free); | ||
32 | void nftnl_flowtable_free(const struct nftnl_flowtable *c) | ||
33 | { | ||
34 | int i; | ||
35 | @@ -56,14 +57,14 @@ void nftnl_flowtable_free(const struct nftnl_flowtable *c) | ||
36 | } | ||
37 | xfree(c); | ||
38 | } | ||
39 | -EXPORT_SYMBOL(nftnl_flowtable_free); | ||
40 | |||
41 | +EXPORT_SYMBOL(nftnl_flowtable_is_set); | ||
42 | bool nftnl_flowtable_is_set(const struct nftnl_flowtable *c, uint16_t attr) | ||
43 | { | ||
44 | return c->flags & (1 << attr); | ||
45 | } | ||
46 | -EXPORT_SYMBOL(nftnl_flowtable_is_set); | ||
47 | |||
48 | +EXPORT_SYMBOL(nftnl_flowtable_unset); | ||
49 | void nftnl_flowtable_unset(struct nftnl_flowtable *c, uint16_t attr) | ||
50 | { | ||
51 | int i; | ||
52 | @@ -95,7 +96,6 @@ void nftnl_flowtable_unset(struct nftnl_flowtable *c, uint16_t attr) | ||
53 | |||
54 | c->flags &= ~(1 << attr); | ||
55 | } | ||
56 | -EXPORT_SYMBOL(nftnl_flowtable_unset); | ||
57 | |||
58 | static uint32_t nftnl_flowtable_validate[NFTNL_FLOWTABLE_MAX + 1] = { | ||
59 | [NFTNL_FLOWTABLE_HOOKNUM] = sizeof(uint32_t), | ||
60 | @@ -104,6 +104,7 @@ static uint32_t nftnl_flowtable_validate[NFTNL_FLOWTABLE_MAX + 1] = { | ||
61 | [NFTNL_FLOWTABLE_FLAGS] = sizeof(uint32_t), | ||
62 | }; | ||
63 | |||
64 | +EXPORT_SYMBOL(nftnl_flowtable_set_data); | ||
65 | int nftnl_flowtable_set_data(struct nftnl_flowtable *c, uint16_t attr, | ||
66 | const void *data, uint32_t data_len) | ||
67 | { | ||
68 | @@ -169,32 +170,32 @@ int nftnl_flowtable_set_data(struct nftnl_flowtable *c, uint16_t attr, | ||
69 | c->flags |= (1 << attr); | ||
70 | return 0; | ||
71 | } | ||
72 | -EXPORT_SYMBOL(nftnl_flowtable_set_data); | ||
73 | |||
74 | +EXPORT_SYMBOL(nftnl_flowtable_set); | ||
75 | void nftnl_flowtable_set(struct nftnl_flowtable *c, uint16_t attr, const void *data) | ||
76 | { | ||
77 | nftnl_flowtable_set_data(c, attr, data, nftnl_flowtable_validate[attr]); | ||
78 | } | ||
79 | -EXPORT_SYMBOL(nftnl_flowtable_set); | ||
80 | |||
81 | +EXPORT_SYMBOL(nftnl_flowtable_set_u32); | ||
82 | void nftnl_flowtable_set_u32(struct nftnl_flowtable *c, uint16_t attr, uint32_t data) | ||
83 | { | ||
84 | nftnl_flowtable_set_data(c, attr, &data, sizeof(uint32_t)); | ||
85 | } | ||
86 | -EXPORT_SYMBOL(nftnl_flowtable_set_u32); | ||
87 | |||
88 | +EXPORT_SYMBOL(nftnl_flowtable_set_s32); | ||
89 | void nftnl_flowtable_set_s32(struct nftnl_flowtable *c, uint16_t attr, int32_t data) | ||
90 | { | ||
91 | nftnl_flowtable_set_data(c, attr, &data, sizeof(int32_t)); | ||
92 | } | ||
93 | -EXPORT_SYMBOL(nftnl_flowtable_set_s32); | ||
94 | |||
95 | +EXPORT_SYMBOL(nftnl_flowtable_set_str); | ||
96 | int nftnl_flowtable_set_str(struct nftnl_flowtable *c, uint16_t attr, const char *str) | ||
97 | { | ||
98 | return nftnl_flowtable_set_data(c, attr, str, strlen(str) + 1); | ||
99 | } | ||
100 | -EXPORT_SYMBOL(nftnl_flowtable_set_str); | ||
101 | |||
102 | +EXPORT_SYMBOL(nftnl_flowtable_get_data); | ||
103 | const void *nftnl_flowtable_get_data(const struct nftnl_flowtable *c, | ||
104 | uint16_t attr, uint32_t *data_len) | ||
105 | { | ||
106 | @@ -228,21 +229,21 @@ const void *nftnl_flowtable_get_data(const struct nftnl_flowtable *c, | ||
107 | } | ||
108 | return NULL; | ||
109 | } | ||
110 | -EXPORT_SYMBOL(nftnl_flowtable_get_data); | ||
111 | |||
112 | +EXPORT_SYMBOL(nftnl_flowtable_get); | ||
113 | const void *nftnl_flowtable_get(const struct nftnl_flowtable *c, uint16_t attr) | ||
114 | { | ||
115 | uint32_t data_len; | ||
116 | return nftnl_flowtable_get_data(c, attr, &data_len); | ||
117 | } | ||
118 | -EXPORT_SYMBOL(nftnl_flowtable_get); | ||
119 | |||
120 | +EXPORT_SYMBOL(nftnl_flowtable_get_str); | ||
121 | const char *nftnl_flowtable_get_str(const struct nftnl_flowtable *c, uint16_t attr) | ||
122 | { | ||
123 | return nftnl_flowtable_get(c, attr); | ||
124 | } | ||
125 | -EXPORT_SYMBOL(nftnl_flowtable_get_str); | ||
126 | |||
127 | +EXPORT_SYMBOL(nftnl_flowtable_get_u32); | ||
128 | uint32_t nftnl_flowtable_get_u32(const struct nftnl_flowtable *c, uint16_t attr) | ||
129 | { | ||
130 | uint32_t data_len = 0; | ||
131 | @@ -252,8 +253,8 @@ uint32_t nftnl_flowtable_get_u32(const struct nftnl_flowtable *c, uint16_t attr) | ||
132 | |||
133 | return val ? *val : 0; | ||
134 | } | ||
135 | -EXPORT_SYMBOL(nftnl_flowtable_get_u32); | ||
136 | |||
137 | +EXPORT_SYMBOL(nftnl_flowtable_get_s32); | ||
138 | int32_t nftnl_flowtable_get_s32(const struct nftnl_flowtable *c, uint16_t attr) | ||
139 | { | ||
140 | uint32_t data_len = 0; | ||
141 | @@ -263,8 +264,8 @@ int32_t nftnl_flowtable_get_s32(const struct nftnl_flowtable *c, uint16_t attr) | ||
142 | |||
143 | return val ? *val : 0; | ||
144 | } | ||
145 | -EXPORT_SYMBOL(nftnl_flowtable_get_s32); | ||
146 | |||
147 | +EXPORT_SYMBOL(nftnl_flowtable_nlmsg_build_payload); | ||
148 | void nftnl_flowtable_nlmsg_build_payload(struct nlmsghdr *nlh, | ||
149 | const struct nftnl_flowtable *c) | ||
150 | { | ||
151 | @@ -300,7 +301,6 @@ void nftnl_flowtable_nlmsg_build_payload(struct nlmsghdr *nlh, | ||
152 | if (c->flags & (1 << NFTNL_FLOWTABLE_SIZE)) | ||
153 | mnl_attr_put_u32(nlh, NFTA_FLOWTABLE_SIZE, htonl(c->size)); | ||
154 | } | ||
155 | -EXPORT_SYMBOL(nftnl_flowtable_nlmsg_build_payload); | ||
156 | |||
157 | static int nftnl_flowtable_parse_attr_cb(const struct nlattr *attr, void *data) | ||
158 | { | ||
159 | @@ -415,6 +415,7 @@ static int nftnl_flowtable_parse_hook(struct nlattr *attr, struct nftnl_flowtabl | ||
160 | return 0; | ||
161 | } | ||
162 | |||
163 | +EXPORT_SYMBOL(nftnl_flowtable_nlmsg_parse); | ||
164 | int nftnl_flowtable_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_flowtable *c) | ||
165 | { | ||
166 | struct nlattr *tb[NFTA_FLOWTABLE_MAX + 1] = {}; | ||
167 | @@ -463,7 +464,6 @@ int nftnl_flowtable_nlmsg_parse(const struct nlmsghdr *nlh, struct nftnl_flowtab | ||
168 | |||
169 | return ret; | ||
170 | } | ||
171 | -EXPORT_SYMBOL(nftnl_flowtable_nlmsg_parse); | ||
172 | |||
173 | static const char *nftnl_hooknum2str(int family, int hooknum) | ||
174 | { | ||
175 | @@ -516,14 +516,15 @@ static inline int nftnl_str2hooknum(int family, const char *hook) | ||
176 | return -1; | ||
177 | } | ||
178 | |||
179 | +EXPORT_SYMBOL(nftnl_flowtable_parse); | ||
180 | int nftnl_flowtable_parse(struct nftnl_flowtable *c, enum nftnl_parse_type type, | ||
181 | const char *data, struct nftnl_parse_err *err) | ||
182 | { | ||
183 | errno = EOPNOTSUPP; | ||
184 | return -1; | ||
185 | } | ||
186 | -EXPORT_SYMBOL(nftnl_flowtable_parse); | ||
187 | |||
188 | +EXPORT_SYMBOL(nftnl_flowtable_parse_file); | ||
189 | int nftnl_flowtable_parse_file(struct nftnl_flowtable *c, | ||
190 | enum nftnl_parse_type type, | ||
191 | FILE *fp, struct nftnl_parse_err *err) | ||
192 | @@ -531,7 +532,6 @@ int nftnl_flowtable_parse_file(struct nftnl_flowtable *c, | ||
193 | errno = EOPNOTSUPP; | ||
194 | return -1; | ||
195 | } | ||
196 | -EXPORT_SYMBOL(nftnl_flowtable_parse_file); | ||
197 | |||
198 | static int nftnl_flowtable_snprintf_default(char *buf, size_t size, | ||
199 | const struct nftnl_flowtable *c) | ||
200 | @@ -587,6 +587,7 @@ static int nftnl_flowtable_cmd_snprintf(char *buf, size_t size, | ||
201 | return offset; | ||
202 | } | ||
203 | |||
204 | +EXPORT_SYMBOL(nftnl_flowtable_snprintf); | ||
205 | int nftnl_flowtable_snprintf(char *buf, size_t size, const struct nftnl_flowtable *c, | ||
206 | uint32_t type, uint32_t flags) | ||
207 | { | ||
208 | @@ -596,7 +597,6 @@ int nftnl_flowtable_snprintf(char *buf, size_t size, const struct nftnl_flowtabl | ||
209 | return nftnl_flowtable_cmd_snprintf(buf, size, c, nftnl_flag2cmd(flags), | ||
210 | type, flags); | ||
211 | } | ||
212 | -EXPORT_SYMBOL(nftnl_flowtable_snprintf); | ||
213 | |||
214 | static int nftnl_flowtable_do_snprintf(char *buf, size_t size, const void *c, | ||
215 | uint32_t cmd, uint32_t type, uint32_t flags) | ||
216 | @@ -604,18 +604,19 @@ static int nftnl_flowtable_do_snprintf(char *buf, size_t size, const void *c, | ||
217 | return nftnl_flowtable_snprintf(buf, size, c, type, flags); | ||
218 | } | ||
219 | |||
220 | +EXPORT_SYMBOL(nftnl_flowtable_fprintf); | ||
221 | int nftnl_flowtable_fprintf(FILE *fp, const struct nftnl_flowtable *c, | ||
222 | uint32_t type, uint32_t flags) | ||
223 | { | ||
224 | return nftnl_fprintf(fp, c, NFTNL_CMD_UNSPEC, type, flags, | ||
225 | nftnl_flowtable_do_snprintf); | ||
226 | } | ||
227 | -EXPORT_SYMBOL(nftnl_flowtable_fprintf); | ||
228 | |||
229 | struct nftnl_flowtable_list { | ||
230 | struct list_head list; | ||
231 | }; | ||
232 | |||
233 | +EXPORT_SYMBOL(nftnl_flowtable_list_alloc); | ||
234 | struct nftnl_flowtable_list *nftnl_flowtable_list_alloc(void) | ||
235 | { | ||
236 | struct nftnl_flowtable_list *list; | ||
237 | @@ -628,8 +629,8 @@ struct nftnl_flowtable_list *nftnl_flowtable_list_alloc(void) | ||
238 | |||
239 | return list; | ||
240 | } | ||
241 | -EXPORT_SYMBOL(nftnl_flowtable_list_alloc); | ||
242 | |||
243 | +EXPORT_SYMBOL(nftnl_flowtable_list_free); | ||
244 | void nftnl_flowtable_list_free(struct nftnl_flowtable_list *list) | ||
245 | { | ||
246 | struct nftnl_flowtable *s, *tmp; | ||
247 | @@ -640,34 +641,34 @@ void nftnl_flowtable_list_free(struct nftnl_flowtable_list *list) | ||
248 | } | ||
249 | xfree(list); | ||
250 | } | ||
251 | -EXPORT_SYMBOL(nftnl_flowtable_list_free); | ||
252 | |||
253 | +EXPORT_SYMBOL(nftnl_flowtable_list_is_empty); | ||
254 | int nftnl_flowtable_list_is_empty(const struct nftnl_flowtable_list *list) | ||
255 | { | ||
256 | return list_empty(&list->list); | ||
257 | } | ||
258 | -EXPORT_SYMBOL(nftnl_flowtable_list_is_empty); | ||
259 | |||
260 | +EXPORT_SYMBOL(nftnl_flowtable_list_add); | ||
261 | void nftnl_flowtable_list_add(struct nftnl_flowtable *s, | ||
262 | struct nftnl_flowtable_list *list) | ||
263 | { | ||
264 | list_add(&s->head, &list->list); | ||
265 | } | ||
266 | -EXPORT_SYMBOL(nftnl_flowtable_list_add); | ||
267 | |||
268 | +EXPORT_SYMBOL(nftnl_flowtable_list_add_tail); | ||
269 | void nftnl_flowtable_list_add_tail(struct nftnl_flowtable *s, | ||
270 | struct nftnl_flowtable_list *list) | ||
271 | { | ||
272 | list_add_tail(&s->head, &list->list); | ||
273 | } | ||
274 | -EXPORT_SYMBOL(nftnl_flowtable_list_add_tail); | ||
275 | |||
276 | +EXPORT_SYMBOL(nftnl_flowtable_list_del); | ||
277 | void nftnl_flowtable_list_del(struct nftnl_flowtable *s) | ||
278 | { | ||
279 | list_del(&s->head); | ||
280 | } | ||
281 | -EXPORT_SYMBOL(nftnl_flowtable_list_del); | ||
282 | |||
283 | +EXPORT_SYMBOL(nftnl_flowtable_list_foreach); | ||
284 | int nftnl_flowtable_list_foreach(struct nftnl_flowtable_list *flowtable_list, | ||
285 | int (*cb)(struct nftnl_flowtable *t, void *data), void *data) | ||
286 | { | ||
287 | @@ -681,4 +682,3 @@ int nftnl_flowtable_list_foreach(struct nftnl_flowtable_list *flowtable_list, | ||
288 | } | ||
289 | return 0; | ||
290 | } | ||
291 | -EXPORT_SYMBOL(nftnl_flowtable_list_foreach); | ||
292 | -- | ||
293 | 2.17.1 | ||
294 | |||
diff --git a/meta-networking/recipes-filter/libnftnl/libnftnl/0002-avoid-naming-local-function-as-one-of-printf-family.patch b/meta-networking/recipes-filter/libnftnl/libnftnl/0001-avoid-naming-local-function-as-one-of-printf-family.patch index e64091b50b..f49ef2a78c 100644 --- a/meta-networking/recipes-filter/libnftnl/libnftnl/0002-avoid-naming-local-function-as-one-of-printf-family.patch +++ b/meta-networking/recipes-filter/libnftnl/libnftnl/0001-avoid-naming-local-function-as-one-of-printf-family.patch | |||
@@ -1,6 +1,6 @@ | |||
1 | From 373e13e28e34b4d415fc096e1c7175f4ecfbf0da Mon Sep 17 00:00:00 2001 | 1 | From e03b003610a176d608da9a02e433e7ded7e4b75f Mon Sep 17 00:00:00 2001 |
2 | From: Yuan Chao <yuanc.fnst@cn.fujitsu.com> | 2 | From: Todd Cunningham <tcunningham07@gmail.com> |
3 | Date: Wed, 21 Aug 2019 11:18:56 +0900 | 3 | Date: Wed, 11 Dec 2019 10:18:56 +1000 |
4 | Subject: [PATCH] avoid naming local function as one of printf family | 4 | Subject: [PATCH] avoid naming local function as one of printf family |
5 | 5 | ||
6 | Fixes build issues with clang | 6 | Fixes build issues with clang |
@@ -10,6 +10,7 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com> | |||
10 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | 10 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> |
11 | 11 | ||
12 | Signed-off-by: Yuan Chao <yuanc.fnst@cn.fujitsu.com> | 12 | Signed-off-by: Yuan Chao <yuanc.fnst@cn.fujitsu.com> |
13 | Signed-off-by: Todd Cunningham <tcunningham07@gmail.com> | ||
13 | --- | 14 | --- |
14 | include/expr_ops.h | 2 +- | 15 | include/expr_ops.h | 2 +- |
15 | include/obj.h | 2 +- | 16 | include/obj.h | 2 +- |
@@ -58,6 +59,7 @@ Signed-off-by: Yuan Chao <yuanc.fnst@cn.fujitsu.com> | |||
58 | src/obj/limit.c | 2 +- | 59 | src/obj/limit.c | 2 +- |
59 | src/obj/quota.c | 2 +- | 60 | src/obj/quota.c | 2 +- |
60 | src/obj/secmark.c | 2 +- | 61 | src/obj/secmark.c | 2 +- |
62 | src/obj/synproxy.c | 2 +- | ||
61 | src/obj/tunnel.c | 2 +- | 63 | src/obj/tunnel.c | 2 +- |
62 | src/object.c | 2 +- | 64 | src/object.c | 2 +- |
63 | 49 files changed, 50 insertions(+), 50 deletions(-) | 65 | 49 files changed, 50 insertions(+), 50 deletions(-) |
@@ -613,6 +615,17 @@ index d8c87ee..5307d7e 100644 | |||
613 | obj); | 615 | obj); |
614 | SNPRINTF_BUFFER_SIZE(ret, remain, offset); | 616 | SNPRINTF_BUFFER_SIZE(ret, remain, offset); |
615 | } | 617 | } |
618 | diff --git a/src/obj/synproxy.c b/src/obj/synproxy.c | ||
619 | index 56ebc85..6b5380f 100644 | ||
620 | --- a/src/obj/synproxy.c | ||
621 | +++ b/src/obj/synproxy.c | ||
622 | @@ -157,5 +157,5 @@ struct obj_ops obj_ops_synproxy = { | ||
623 | .get = nftnl_obj_synproxy_get, | ||
624 | .parse = nftnl_obj_synproxy_parse, | ||
625 | .build = nftnl_obj_synproxy_build, | ||
626 | - .snprintf = nftnl_obj_synproxy_snprintf, | ||
627 | + .snprintf_ = nftnl_obj_synproxy_snprintf, | ||
628 | }; | ||
616 | -- | 629 | -- |
617 | 2.17.1 | 630 | 2.17.1 |
618 | 631 | ||
diff --git a/meta-networking/recipes-filter/libnftnl/libnftnl_1.1.4.bb b/meta-networking/recipes-filter/libnftnl/libnftnl_1.1.5.bb index 705b6a6c34..e1c2720da8 100644 --- a/meta-networking/recipes-filter/libnftnl/libnftnl_1.1.4.bb +++ b/meta-networking/recipes-filter/libnftnl/libnftnl_1.1.5.bb | |||
@@ -4,10 +4,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=79808397c3355f163c012616125c9e26" | |||
4 | SECTION = "libs" | 4 | SECTION = "libs" |
5 | DEPENDS = "libmnl" | 5 | DEPENDS = "libmnl" |
6 | 6 | ||
7 | SRCREV = "7c19dc01a88dbcf9a45fa791cd27a51b563bcf29" | 7 | SRCREV = "a71599dc0ae1a808e970e96850ea83d77f452994" |
8 | SRC_URI = "git://git.netfilter.org/libnftnl \ | 8 | SRC_URI = "git://git.netfilter.org/libnftnl \ |
9 | file://0001-Move-exports-before-symbol-definition.patch \ | 9 | file://0001-avoid-naming-local-function-as-one-of-printf-family.patch \ |
10 | file://0002-avoid-naming-local-function-as-one-of-printf-family.patch \ | ||
11 | " | 10 | " |
12 | 11 | ||
13 | S = "${WORKDIR}/git" | 12 | S = "${WORKDIR}/git" |