diff options
Diffstat (limited to 'meta/recipes-connectivity/connman/connman/0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch')
-rw-r--r-- | meta/recipes-connectivity/connman/connman/0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/connman/connman/0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch b/meta/recipes-connectivity/connman/connman/0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch new file mode 100644 index 0000000000..cfafbd1271 --- /dev/null +++ b/meta/recipes-connectivity/connman/connman/0001-firewall-nftables-fix-build-with-libnftnl-1.0.7.patch | |||
@@ -0,0 +1,72 @@ | |||
1 | From 4058ce3186a99fd5f03350fc11a7fc8d38b6a381 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Maxin B. John" <maxin.john@intel.com> | ||
3 | Date: Mon, 8 May 2017 10:53:18 +0300 | ||
4 | Subject: [PATCH] firewall-nftables: fix build with libnftnl-1.0.7 | ||
5 | |||
6 | We need these updates to accommodate the changes caused by the following | ||
7 | commit in libnftnl-1.0.7 | ||
8 | |||
9 | commit 907a9f8e5a93f5bcd449643eb3916a656d634758 | ||
10 | Author: Pablo Neira Ayuso <pablo@netfilter.org> | ||
11 | Date: Tue Dec 20 13:47:11 2016 +0100 | ||
12 | |||
13 | src: get rid of aliases and compat | ||
14 | |||
15 | This machinery was introduced to avoid sudden compilation breakage of | ||
16 | old nftables releases. With the upcoming release of 0.7 (and 0.6 which | ||
17 | is now 6 months old) this is not required anymore. | ||
18 | |||
19 | Moreover, users gain nothing from older releases since they are | ||
20 | half-boiled and buggy. | ||
21 | |||
22 | So let's get rid of aliases now. Bump LIBVERSION and update map file. | ||
23 | |||
24 | Upstream-Status: Submitted | ||
25 | |||
26 | Signed-off-by: Maxin B. John <maxin.john@intel.com> | ||
27 | --- | ||
28 | src/firewall-nftables.c | 14 +++++++------- | ||
29 | 1 file changed, 7 insertions(+), 7 deletions(-) | ||
30 | |||
31 | diff --git a/src/firewall-nftables.c b/src/firewall-nftables.c | ||
32 | index 583d1c4..83b137b 100644 | ||
33 | --- a/src/firewall-nftables.c | ||
34 | +++ b/src/firewall-nftables.c | ||
35 | @@ -387,9 +387,9 @@ static int add_cmp(struct nftnl_rule *rule, uint32_t sreg, uint32_t op, | ||
36 | if (!expr) | ||
37 | return -ENOMEM; | ||
38 | |||
39 | - nftnl_expr_set_u32(expr, NFT_EXPR_CMP_SREG, sreg); | ||
40 | - nftnl_expr_set_u32(expr, NFT_EXPR_CMP_OP, op); | ||
41 | - nftnl_expr_set(expr, NFT_EXPR_CMP_DATA, data, data_len); | ||
42 | + nftnl_expr_set_u32(expr, NFTNL_EXPR_CMP_SREG, sreg); | ||
43 | + nftnl_expr_set_u32(expr, NFTNL_EXPR_CMP_OP, op); | ||
44 | + nftnl_expr_set(expr, NFTNL_EXPR_CMP_DATA, data, data_len); | ||
45 | |||
46 | nftnl_rule_add_expr(rule, expr); | ||
47 | |||
48 | @@ -575,8 +575,8 @@ static int build_rule_nat(const char *address, unsigned char prefixlen, | ||
49 | expr = nftnl_expr_alloc("meta"); | ||
50 | if (!expr) | ||
51 | goto err; | ||
52 | - nftnl_expr_set_u32(expr, NFT_EXPR_META_KEY, NFT_META_OIFNAME); | ||
53 | - nftnl_expr_set_u32(expr, NFT_EXPR_META_DREG, NFT_REG_1); | ||
54 | + nftnl_expr_set_u32(expr, NFTNL_EXPR_META_KEY, NFT_META_OIFNAME); | ||
55 | + nftnl_expr_set_u32(expr, NFTNL_EXPR_META_DREG, NFT_REG_1); | ||
56 | nftnl_rule_add_expr(rule, expr); | ||
57 | err = add_cmp(rule, NFT_REG_1, NFT_CMP_EQ, interface, | ||
58 | strlen(interface) + 1); | ||
59 | @@ -677,8 +677,8 @@ static int build_rule_snat(int index, const char *address, | ||
60 | expr = nftnl_expr_alloc("meta"); | ||
61 | if (!expr) | ||
62 | goto err; | ||
63 | - nftnl_expr_set_u32(expr, NFT_EXPR_META_KEY, NFT_META_OIF); | ||
64 | - nftnl_expr_set_u32(expr, NFT_EXPR_META_DREG, NFT_REG_1); | ||
65 | + nftnl_expr_set_u32(expr, NFTNL_EXPR_META_KEY, NFT_META_OIF); | ||
66 | + nftnl_expr_set_u32(expr, NFTNL_EXPR_META_DREG, NFT_REG_1); | ||
67 | nftnl_rule_add_expr(rule, expr); | ||
68 | err = add_cmp(rule, NFT_REG_1, NFT_CMP_EQ, &index, sizeof(index)); | ||
69 | if (err < 0) | ||
70 | -- | ||
71 | 2.4.0 | ||
72 | |||