aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-filter/nftables/files/0001-update-python3-nftables-reference.patch
blob: db2243480d830a1d5c60cb002289654ec47fbffc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From ddbe652bf0f4ed300bae9497250130d68e4cbf5b Mon Sep 17 00:00:00 2001
From: Arturo Borrero Gonzalez <arturo@netfilter.org>
Date: Tue, 10 Dec 2019 12:00:45 +0100
Subject: py: load the SONAME-versioned shared object

Instruct the python module to load the SONAME versioned shared object.

Normal end-user systems may only have available libnftables.so.1.0.0 and not
libnftables.so which is usually only present in developer systems.

In Debian systems, for example:

 % dpkg -L libnftables1 | grep so.1
 /usr/lib/x86_64-linux-gnu/libnftables.so.1.0.0
 /usr/lib/x86_64-linux-gnu/libnftables.so.1

 % dpkg -L libnftables-dev | grep so
 /usr/lib/x86_64-linux-gnu/libnftables.so

The "1" is not a magic number, is the SONAME of libnftables in the current
version, as stated in Make_global.am.

Reported-by: Michael Biebl <biebl@debian.org>
Signed-off-by: Arturo Borrero Gonzalez <arturo@netfilter.org>
Acked-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 py/nftables.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/py/nftables.py b/py/nftables.py
index 48eb54fe..2a0a1e89 100644
--- a/py/nftables.py
+++ b/py/nftables.py
@@ -64,7 +64,7 @@ class Nftables:
 
     validator = None
 
-    def __init__(self, sofile="libnftables.so"):
+    def __init__(self, sofile="libnftables.so.1"):
         """Instantiate a new Nftables class object.
 
         Accepts a shared object file to open, by default standard search path
-- 
cgit v1.2.1