summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorzhengruoqin <zhengrq.fnst@fujitsu.com>2021-05-14 10:12:28 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-05-16 08:29:59 +0100
commitb05c3637ce0881d34d1478ed09bc7f3b9c2699a0 (patch)
tree2b085a116121dd273a9bf976dd8ebab862315c0f /meta
parentf1b7f662c548cbcbaeceafc6e1561c8693f27656 (diff)
downloadpoky-b05c3637ce0881d34d1478ed09bc7f3b9c2699a0.tar.gz
rpcbind: upgrade 1.2.5 -> 1.2.6
refresh rpcbind_add_option_to_fix_port_number.patch (From OE-Core rev: 11bbe1c86d5d3e446fe5ea4028bc8b3f21b98587) Signed-off-by: Zheng Ruoqin <zhengrq.fnst@fujitsu.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch58
-rw-r--r--meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb (renamed from meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb)3
2 files changed, 30 insertions, 31 deletions
diff --git a/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch b/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch
index 434b6b1c4c..535f9ce20d 100644
--- a/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch
+++ b/meta/recipes-extended/rpcbind/rpcbind/rpcbind_add_option_to_fix_port_number.patch
@@ -15,7 +15,7 @@ Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
15 3 files changed, 26 insertions(+), 3 deletions(-) 15 3 files changed, 26 insertions(+), 3 deletions(-)
16 16
17diff --git a/man/rpcbind.8 b/man/rpcbind.8 17diff --git a/man/rpcbind.8 b/man/rpcbind.8
18index af6200f..2e6146b 100644 18index fbf0ace..66f7c08 100644
19--- a/man/rpcbind.8 19--- a/man/rpcbind.8
20+++ b/man/rpcbind.8 20+++ b/man/rpcbind.8
21@@ -11,7 +11,7 @@ 21@@ -11,7 +11,7 @@
@@ -27,17 +27,17 @@ index af6200f..2e6146b 100644
27 .Sh DESCRIPTION 27 .Sh DESCRIPTION
28 The 28 The
29 .Nm 29 .Nm
30@@ -107,6 +107,8 @@ will automatically add 30@@ -96,6 +96,8 @@ will automatically add
31 and if IPv6 is enabled, 31 and if IPv6 is enabled,
32 .Li ::1 32 .Li ::1
33 to the list. 33 to the list.
34+.It Fl p 34+.It Fl p
35+Bind for fixed UDP port number 35+Bind for fixed UDP port number
36 .It Fl i 36 If no
37 .Dq Insecure 37 .Fl h
38 mode. 38 option is specified,
39diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c 39diff --git a/src/rpcb_svc_com.c b/src/rpcb_svc_com.c
40index 8aef9e5..c2632a4 100644 40index 1743dad..07a1c75 100644
41--- a/src/rpcb_svc_com.c 41--- a/src/rpcb_svc_com.c
42+++ b/src/rpcb_svc_com.c 42+++ b/src/rpcb_svc_com.c
43@@ -48,6 +48,7 @@ 43@@ -48,6 +48,7 @@
@@ -60,8 +60,8 @@ index 8aef9e5..c2632a4 100644
60 int fd; 60 int fd;
61 struct rmtcallfd_list *rmt; 61 struct rmtcallfd_list *rmt;
62 SVCXPRT *xprt; 62 SVCXPRT *xprt;
63+ struct __rpc_sockinfo si; 63+ struct __rpc_sockinfo si;
64+ struct t_bind taddr; 64+ struct t_bind taddr;
65 65
66 if ((fd = __rpc_nconf2fd(nconf)) == -1) { 66 if ((fd = __rpc_nconf2fd(nconf)) == -1) {
67 if (debugging) 67 if (debugging)
@@ -70,23 +70,23 @@ index 8aef9e5..c2632a4 100644
70 return (-1); 70 return (-1);
71 } 71 }
72+ 72+
73+ if (fixed_port) { 73+ if (fixed_port) {
74+ __rpc_fd2sockinfo(fd, &si); 74+ __rpc_fd2sockinfo(fd, &si);
75+ memset(&taddr, 0, sizeof(taddr)); 75+ memset(&taddr, 0, sizeof(taddr));
76+ taddr.addr.maxlen = taddr.addr.len = si.si_alen; 76+ taddr.addr.maxlen = taddr.addr.len = si.si_alen;
77+ taddr.addr.buf = malloc(si.si_alen); 77+ taddr.addr.buf = malloc(si.si_alen);
78+ if (taddr.addr.buf == NULL) { 78+ if (taddr.addr.buf == NULL) {
79+ return -1; 79+ return -1;
80+ } 80+ }
81+ *(unsigned short *)(&(taddr.addr.buf[0])) = si.si_af; 81+ *(unsigned short *)(&(taddr.addr.buf[0])) = si.si_af;
82+ *(unsigned short *)(&(taddr.addr.buf[2])) = htons(fixed_port); 82+ *(unsigned short *)(&(taddr.addr.buf[2])) = htons(fixed_port);
83+ xprt = svc_tli_create(fd, nconf, &taddr, RPC_MAXDATASIZE, RPC_MAXDATASIZE); 83+ xprt = svc_tli_create(fd, nconf, &taddr, RPC_MAXDATASIZE, RPC_MAXDATASIZE);
84+ } else 84+ } else
85 xprt = svc_tli_create(fd, 0, (struct t_bind *) 0, 0, 0); 85 xprt = svc_tli_create(fd, 0, (struct t_bind *) 0, 0, 0);
86 if (xprt == NULL) { 86 if (xprt == NULL) {
87 if (debugging) 87 if (debugging)
88diff --git a/src/rpcbind.c b/src/rpcbind.c 88diff --git a/src/rpcbind.c b/src/rpcbind.c
89index 137011b..dc3d2d6 100644 89index 25d8a90..36a95b9 100644
90--- a/src/rpcbind.c 90--- a/src/rpcbind.c
91+++ b/src/rpcbind.c 91+++ b/src/rpcbind.c
92@@ -111,6 +111,7 @@ int runasdaemon = 0; 92@@ -111,6 +111,7 @@ int runasdaemon = 0;
@@ -97,7 +97,7 @@ index 137011b..dc3d2d6 100644
97 97
98 char **hosts = NULL; 98 char **hosts = NULL;
99 int nhosts = 0; 99 int nhosts = 0;
100@@ -869,7 +870,7 @@ parseargs(int argc, char *argv[]) 100@@ -884,7 +885,7 @@ parseargs(int argc, char *argv[])
101 { 101 {
102 int c; 102 int c;
103 oldstyle_local = 1; 103 oldstyle_local = 1;
@@ -106,25 +106,25 @@ index 137011b..dc3d2d6 100644
106 switch (c) { 106 switch (c) {
107 case 'a': 107 case 'a':
108 doabort = 1; /* when debugging, do an abort on */ 108 doabort = 1; /* when debugging, do an abort on */
109@@ -887,6 +888,9 @@ parseargs(int argc, char *argv[]) 109@@ -902,6 +903,9 @@ parseargs(int argc, char *argv[])
110 if (hosts[nhosts - 1] == NULL) 110 if (hosts[nhosts - 1] == NULL)
111 errx(1, "Out of memory"); 111 errx(1, "Out of memory");
112 break; 112 break;
113+ case 'p': 113+ case 'p':
114+ fixed_port = atoi(optarg); 114+ fixed_port = atoi(optarg);
115+ break; 115+ break;
116 case 'i': 116 case 'i':
117 insecure = 1; 117 insecure = 1;
118 break; 118 break;
119@@ -905,7 +909,7 @@ parseargs(int argc, char *argv[]) 119@@ -920,7 +924,7 @@ parseargs(int argc, char *argv[])
120 break; 120 break;
121 #endif 121 #endif
122 default: /* error */ 122 default: /* error */
123- fprintf(stderr, "usage: rpcbind [-adhilswf]\n"); 123- fprintf(stderr, "usage: rpcbind [-adhilswf]\n");
124+ fprintf(stderr, "usage: rpcbind [-adhpilswf]\n"); 124+ fprintf(stderr, "usage: rpcbind [-adhpilswf]\n");
125 exit (1); 125 exit (1);
126 } 126 }
127 } 127 }
128-- 128--
1291.9.1 1292.25.1
130 130
diff --git a/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb b/meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb
index ec8f9e48b2..b02638b2ce 100644
--- a/meta/recipes-extended/rpcbind/rpcbind_1.2.5.bb
+++ b/meta/recipes-extended/rpcbind/rpcbind_1.2.6.bb
@@ -16,8 +16,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/rpcbind/rpcbind-${PV}.tar.bz2 \
16 file://rpcbind_add_option_to_fix_port_number.patch \ 16 file://rpcbind_add_option_to_fix_port_number.patch \
17 file://0001-systemd-use-EnvironmentFile.patch \ 17 file://0001-systemd-use-EnvironmentFile.patch \
18 " 18 "
19SRC_URI[md5sum] = "ed46f09b9c0fa2d49015f6431bc5ea7b" 19SRC_URI[sha256sum] = "5613746489cae5ae23a443bb85c05a11741a5f12c8f55d2bb5e83b9defeee8de"
20SRC_URI[sha256sum] = "2ce360683963b35c19c43f0ee2c7f18aa5b81ef41c3fdbd15ffcb00b8bffda7a"
21 20
22inherit autotools update-rc.d systemd pkgconfig update-alternatives 21inherit autotools update-rc.d systemd pkgconfig update-alternatives
23 22