summaryrefslogtreecommitdiffstats
path: root/meta-openembedded/meta-networking/recipes-support/ipvsadm/ipvsadm/0002-Replace-nl_handle-to-nl_sock.patch
blob: 7896d6d1eaef6c46517a56d81dfb8550b8f41af7 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
From 2686213259b15df9cf1d969c5a14d62f14cfbaae Mon Sep 17 00:00:00 2001
From: Jianchuan Wang <jianchuan.wang@windriver.com>
Date: Thu, 8 Jan 2015 17:37:11 +0800
Subject: [PATCH 2/2] Replace nl_handle to nl_sock.

The nl_handle was replace with nl_sock in the libnl-3.

Upstream-Status: Inappropriate [embedded specific]

Signed-off-by: Jianchuan Wang <jianchuan.wang@windriver.com>
---
 libipvs/libipvs.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/libipvs/libipvs.c b/libipvs/libipvs.c
index a157e18..21a9bfa 100644
--- a/libipvs/libipvs.c
+++ b/libipvs/libipvs.c
@@ -32,7 +32,7 @@ static void* ipvs_func = NULL;
 struct ip_vs_getinfo ipvs_info;
 
 #ifdef LIBIPVS_USE_NL
-static struct nl_handle *sock = NULL;
+static struct nl_sock *sock = NULL;
 static int family, try_nl = 1;
 #endif
 
@@ -73,7 +73,7 @@ int ipvs_nl_send_message(struct nl_msg *msg, nl_recvmsg_msg_cb_t func, void *arg
 {
 	int err = EINVAL;
 
-	sock = nl_handle_alloc();
+	sock = nl_socket_alloc();
 	if (!sock) {
 		nlmsg_free(msg);
 		return -1;
@@ -88,7 +88,7 @@ int ipvs_nl_send_message(struct nl_msg *msg, nl_recvmsg_msg_cb_t func, void *arg
 
 	/* To test connections and set the family */
 	if (msg == NULL) {
-		nl_handle_destroy(sock);
+		nl_socket_free(sock);
 		sock = NULL;
 		return 0;
 	}
@@ -104,12 +104,12 @@ int ipvs_nl_send_message(struct nl_msg *msg, nl_recvmsg_msg_cb_t func, void *arg
 
 	nlmsg_free(msg);
 
-	nl_handle_destroy(sock);
+	nl_socket_free(sock);
 
 	return 0;
 
 fail_genl:
-	nl_handle_destroy(sock);
+	nl_socket_free(sock);
 	sock = NULL;
 	nlmsg_free(msg);
 	errno = err;
-- 
1.8.3.1

OpenPOWER on IntegriCloud