diff --git a/bugfix-rpcbind-GETADDR-return-client-ip.patch b/bugfix-rpcbind-GETADDR-return-client-ip.patch new file mode 100644 index 0000000000000000000000000000000000000000..88b483114ef1bc5a57c3b7fad26f422eecf031a8 --- /dev/null +++ b/bugfix-rpcbind-GETADDR-return-client-ip.patch @@ -0,0 +1,40 @@ +From 8e0eb02df52d15dd4317abeddec427cdbac4da3c Mon Sep 17 00:00:00 2001 +From: huyan +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 + diff --git a/rpcbind.spec b/rpcbind.spec index 0f36a2c5690ea64e34cf6682ee9f79915c0f841a..efd5d5cd7431f675d88ffc89a7cf13109c14c452 100644 --- a/rpcbind.spec +++ b/rpcbind.spec @@ -3,7 +3,7 @@ Name: rpcbind Version: 1.2.6 -Release: 1 +Release: 2 Summary: Universal addresses to RPC program number mapper License: BSD @@ -25,6 +25,7 @@ Patch101: %{name}-0.2.3-systemd-tmpfiles.patch Patch102: %{name}-0.2.4-runstatdir.patch Patch103: %{name}-0.2.4-systemd-service.patch Patch104: %{name}-0.2.4-systemd-rundir.patch +Patch105: bugfix-rpcbind-GETADDR-return-client-ip.patch Patch6001: CVE-2017-8779.patch Patch9000: bugfix-listen-tcp-port-111.patch @@ -115,6 +116,12 @@ fi %{_mandir}/man8/*.8.gz %changelog +* Wed Feb 09 2022 yanglu - 1.2.6-2 +- Type:bugfix +- Id:NA +- SUG:NA +- DESC:modify the getaddr method of ip + * Fri Dec 03 2021 quanhongfei - 1.2.6-1 - Type:requirements - Id:NA