modify the getaddr method of ip
(cherry picked from commit 81e4aafe3d25a065975ae3e676cad552ad9a147c)
This commit is contained in:
parent
37044015be
commit
c33e7e6bfa
40
bugfix-rpcbind-GETADDR-return-client-ip.patch
Normal file
40
bugfix-rpcbind-GETADDR-return-client-ip.patch
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
From 8e0eb02df52d15dd4317abeddec427cdbac4da3c Mon Sep 17 00:00:00 2001
|
||||||
|
From: huyan <hu.huyan@huawei.com>
|
||||||
|
Date: Mon, 8 Jul 2019 02:10:44 +0000
|
||||||
|
Subject: [PATCH] backport bugfix rpcbind GETADDR return client ip
|
||||||
|
|
||||||
|
---
|
||||||
|
src/util.c | 10 ++++++++++
|
||||||
|
1 file changed, 10 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/util.c b/src/util.c
|
||||||
|
index 4af8b9b..8b06c87 100644
|
||||||
|
--- a/src/util.c
|
||||||
|
+++ b/src/util.c
|
||||||
|
@@ -178,6 +178,11 @@ addrmerge(struct netbuf *caller, char *serv_uaddr, char *clnt_uaddr,
|
||||||
|
if (!bitmaskcmp(&SA2SINADDR(ifsa),
|
||||||
|
&SA2SINADDR(hint_sa), &SA2SINADDR(ifmasksa),
|
||||||
|
sizeof(struct in_addr))) {
|
||||||
|
+ if (getenv("RPCBIND_GETADDR_RETURN_CLIENT_IP") == NULL) {
|
||||||
|
+ bestif = ifap;
|
||||||
|
+ goto found;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if(!bestif) /* for compatibility with previous code */
|
||||||
|
bestif = ifap;
|
||||||
|
/* Is this an exact match? */
|
||||||
|
@@ -208,6 +213,11 @@ addrmerge(struct netbuf *caller, char *serv_uaddr, char *clnt_uaddr,
|
||||||
|
} else if (!bitmaskcmp(&SA2SIN6ADDR(ifsa),
|
||||||
|
&SA2SIN6ADDR(hint_sa), &SA2SIN6ADDR(ifmasksa),
|
||||||
|
sizeof(struct in6_addr))) {
|
||||||
|
+ if (getenv("RPCBIND_GETADDR_RETURN_CLIENT_IP") == NULL) {
|
||||||
|
+ bestif = ifap;
|
||||||
|
+ goto found;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if(!bestif) /* for compatibility with previous code */
|
||||||
|
bestif = ifap;
|
||||||
|
/* Is this an exact match? */
|
||||||
|
--
|
||||||
|
2.23.0
|
||||||
|
|
||||||
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: rpcbind
|
Name: rpcbind
|
||||||
Version: 1.2.6
|
Version: 1.2.6
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Universal addresses to RPC program number mapper
|
Summary: Universal addresses to RPC program number mapper
|
||||||
License: BSD
|
License: BSD
|
||||||
|
|
||||||
@ -25,6 +25,7 @@ Patch101: %{name}-0.2.3-systemd-tmpfiles.patch
|
|||||||
Patch102: %{name}-0.2.4-runstatdir.patch
|
Patch102: %{name}-0.2.4-runstatdir.patch
|
||||||
Patch103: %{name}-0.2.4-systemd-service.patch
|
Patch103: %{name}-0.2.4-systemd-service.patch
|
||||||
Patch104: %{name}-0.2.4-systemd-rundir.patch
|
Patch104: %{name}-0.2.4-systemd-rundir.patch
|
||||||
|
Patch105: bugfix-rpcbind-GETADDR-return-client-ip.patch
|
||||||
Patch6001: CVE-2017-8779.patch
|
Patch6001: CVE-2017-8779.patch
|
||||||
Patch9000: bugfix-listen-tcp-port-111.patch
|
Patch9000: bugfix-listen-tcp-port-111.patch
|
||||||
|
|
||||||
@ -115,6 +116,12 @@ fi
|
|||||||
%{_mandir}/man8/*.8.gz
|
%{_mandir}/man8/*.8.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Feb 09 2022 yanglu <yanglu72@huawei.com> - 1.2.6-2
|
||||||
|
- Type:bugfix
|
||||||
|
- Id:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:modify the getaddr method of ip
|
||||||
|
|
||||||
* Fri Dec 03 2021 quanhongfei <quanhongfei@huawei.com> - 1.2.6-1
|
* Fri Dec 03 2021 quanhongfei <quanhongfei@huawei.com> - 1.2.6-1
|
||||||
- Type:requirements
|
- Type:requirements
|
||||||
- Id:NA
|
- Id:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user