rpcbind/0005-Remove-obsolete-function-in6_fillscopeid.patch
Ismail Dönmez c213227f60 Accepting request 264790 from home:kukuk:NIS
Update to rpcbind 0.2.2 and port most patches to it.
6 are still missing.

- Split off 0003-systemd-no-dualmode.patch from 
  0001-systemd-enhancements.patch for easier upstream submission.
- Split off 0004-systemd-sd_notify.patch from 
  0001-systemd-enhancements.patch for easier upstream submission.
- Rename 0001-systemd-enhancements.patch to 0001-systemd-unit-files.patch

- Update to latest rpcbind 0.2.2 upstream release.
- Following patches are upstream:
  - 0001-Fix-building-one-systems-w-out-nss.h.patch
  - 0002-Rename-configure.in-to-configure.ac.patch
  - 0003-rpcbind-rpcuser-not-being-set-in-Makefile.am.patch
  - 0004-Silence-a-warning-about-setgroups-being-implicitly-d.patch
- Adjust following patches:
  - 0005-Remove-obsolete-function-in6_fillscopeid.patch
  - 0006-In-init_transport-move-creation-of-COTS-sockets-clos.patch
  - 0018-configure-check-for-nss.h.patch
- Obsolete patches:
  - 0015-When-using-systemd-activation-make-rpcbind-notify-sy.patch
  - 0016-Notify-systemd-unconditionally.patch
  - 0012-Support-systemd-activation.patch
  - 0013-socket-activation-Fix-rpcbind.service-to-use-separat.patch
  - 0017-Pull-the-sysconfig-file-into-rpcbind.service-and-use.patch
  - 0025-rpcinfo-warmstat_no-warning-about-missing-file.patch
  - 0026-systemd-no-default-dep
  - 0027-socket-before-service.patch
  - 0028-rpcbind-after-var-run.patch
  - 0029-rpcbind-sd-notify-stupid-errmsg.patch
- New patches:
  - 0001-systemd-enhancements.patch
  - 0002-rpcinfo_warmstart-no_warning_about_missing_file.patch

OBS-URL: https://build.opensuse.org/request/show/264790
OBS-URL: https://build.opensuse.org/package/show/network/rpcbind?expand=0&rev=51
2014-12-11 18:00:24 +00:00

70 lines
1.9 KiB
Diff

From f474754a2dee2f0b53435b79800611eebcdff2ac Mon Sep 17 00:00:00 2001
From: Olaf Kirch <okir@suse.de>
Date: Tue, 20 Aug 2013 11:43:51 +0200
Subject: [PATCH 05/24] Remove obsolete function in6_fillscopeid
This seems to be an old remnant from the very early days of IPv6
when the kernel would include the ifindex in the link-local
addresses returned by getifaddrs(). This is no longer the case on
Linux, so the code is a no-op.
A no-op that makes gcc throw warnings about illegal type-punning.
Signed-off-by: Olaf Kirch <okir@suse.de>
---
src/util.c | 24 ------------------------
1 file changed, 24 deletions(-)
diff --git a/src/util.c b/src/util.c
index 9a5fb69..a6c835b 100644
--- a/src/util.c
+++ b/src/util.c
@@ -71,9 +71,6 @@
#endif
static int bitmaskcmp __P((void *, void *, void *, int));
-#ifdef INET6
-static void in6_fillscopeid __P((struct sockaddr_in6 *));
-#endif
/*
* For all bits set in "mask", compare the corresponding bits in
@@ -93,28 +90,6 @@
}
/*
- * Similar to code in ifconfig.c. Fill in the scope ID for link-local
- * addresses returned by getifaddrs().
- */
-#ifdef INET6
-static void
-in6_fillscopeid(struct sockaddr_in6 *sin6)
-{
- u_int16_t ifindex;
- u_int16_t *addr;
-
- if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) {
- addr = (u_int16_t *)&sin6->sin6_addr.s6_addr[2];
- ifindex = ntohs(*addr);
- if (sin6->sin6_scope_id == 0 && ifindex != 0) {
- sin6->sin6_scope_id = ifindex;
- *addr = 0;
- }
- }
-}
-#endif
-
-/*
* Find a server address that can be used by `caller' to contact
* the local service specified by `serv_uaddr'. If `clnt_uaddr' is
* non-NULL, it is used instead of `caller' as a hint suggesting
@@ -211,7 +186,6 @@
* a link-local address then use the scope id to see
* which one.
*/
- in6_fillscopeid(SA2SIN6(ifsa));
if (IN6_IS_ADDR_LINKLOCAL(&SA2SIN6ADDR(ifsa)) &&
IN6_IS_ADDR_LINKLOCAL(&SA2SIN6ADDR(caller_sa)) &&
IN6_IS_ADDR_LINKLOCAL(&SA2SIN6ADDR(hint_sa))) {