Updated the libtirpc-0.2.3-rc4.patch with the latest changes.

Signed-off-by: Steve Dickson <steved@redhat.com>
This commit is contained in:
Steve Dickson 2012-11-14 11:15:27 -05:00
parent b8596fdda2
commit 6d1c4a1c0c
1 changed files with 56 additions and 7 deletions

View File

@ -1,8 +1,22 @@
diff --git a/configure.ac b/configure.ac
index 97c6f2c..7ff80a4 100644
index 97c6f2c..a99c5d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,6 +23,7 @@ AC_HEADER_DIRENT
@@ -15,6 +15,13 @@ if test x$gss = xtrue; then
PKG_CHECK_MODULES(GSSGLUE, libgssglue, [],
AC_MSG_ERROR([Unable to locate information required to use libgssglue.]))
fi
+AC_ARG_ENABLE(ipv6,
+ [AC_HELP_STRING([--disable-ipv6], [Disable IPv6 support @<:@default=no@:>@])],
+ [],[enable_ipv6=yes])
+AM_CONDITIONAL(INET6, test "x$disable_ipv6" != xno)
+if test "x$enable_ipv6" != xno; then
+ AC_DEFINE(INET6, 1, [Define to 1 if IPv6 is available])
+fi
AC_PROG_CC
AM_CONFIG_HEADER(config.h)
@@ -23,6 +30,7 @@ AC_HEADER_DIRENT
AC_PREFIX_DEFAULT(/usr)
AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h])
AC_CHECK_LIB([pthread], [pthread_create])
@ -11,7 +25,7 @@ index 97c6f2c..7ff80a4 100644
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile])
diff --git a/doc/Makefile.am b/doc/Makefile.am
index cc4fa76..f8c88b5 100644
index cc4fa76..58de35b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -1,5 +1,5 @@
@ -21,7 +35,7 @@ index cc4fa76..f8c88b5 100644
- cp -p ./etc_netconfig $(DESTDIR)/etc/netconfig
- chmod 0644 $(DESTDIR)/etc/netconfig
+ $(mkinstalldirs) $(DESTDIR)/$(sysconfdir)
+ cp -p ./etc_netconfig $(DESTDIR)/$(sysconfdir)/netconfig
+ cp -p $(srcdir)/etc_netconfig $(DESTDIR)/$(sysconfdir)/netconfig
+ chmod 0644 $(DESTDIR)/$(sysconfdir)/netconfig
diff --git a/src/Makefile.am b/src/Makefile.am
index 7ee8cbc..66350f5 100644
@ -663,6 +677,20 @@ index 359063c..097cae8 100644
if (ct->ct_error.re_status == RPC_SUCCESS)
ct->ct_error.re_status = RPC_CANTDECODERES;
}
diff --git a/src/rpc_generic.c b/src/rpc_generic.c
index 509fb36..2eb91ad 100644
--- a/src/rpc_generic.c
+++ b/src/rpc_generic.c
@@ -535,7 +535,9 @@ __rpc_nconf2fd_flags(const struct netconfig *nconf, int flags)
si.si_af == AF_INET6) {
int val = 1;
+#ifdef INET6
setsockopt(fd, SOL_IPV6, IPV6_V6ONLY, &val, sizeof(val));
+#endif
}
return fd;
}
diff --git a/src/rpc_soc.c b/src/rpc_soc.c
index c678429..63d2197 100644
--- a/src/rpc_soc.c
@ -977,7 +1005,7 @@ index ce83859..9585069 100644
return (AUTH_REJECTEDCRED);
}
diff --git a/src/svc_dg.c b/src/svc_dg.c
index 66a56ee..a79a70d 100644
index 66a56ee..b1ac462 100644
--- a/src/svc_dg.c
+++ b/src/svc_dg.c
@@ -134,6 +134,7 @@ svc_dg_create(fd, sendsize, recvsize)
@ -1042,15 +1070,36 @@ index 66a56ee..a79a70d 100644
XDR_DESTROY(&(su->su_xdrs));
(void) mem_free(rpc_buffer(xprt), su->su_iosz);
(void) mem_free(su, sizeof (*su));
@@ -628,7 +655,7 @@ svc_dg_enable_pktinfo(int fd, const struct __rpc_sockinfo *si)
@@ -626,10 +653,11 @@ svc_dg_enable_pktinfo(int fd, const struct __rpc_sockinfo *si)
case AF_INET:
(void) setsockopt(fd, SOL_IP, IP_PKTINFO, &val, sizeof(val));
break;
-
+#ifdef INET6
case AF_INET6:
- (void) setsockopt(fd, SOL_IPV6, IPV6_PKTINFO, &val, sizeof(val));
+ (void) setsockopt(fd, SOL_IPV6, IPV6_RECVPKTINFO, &val, sizeof(val));
break;
+#endif
}
}
@@ -667,6 +695,7 @@ svc_dg_valid_pktinfo(struct msghdr *msg)
}
break;
+#ifdef INET6
case AF_INET6:
if (cmsg->cmsg_level != SOL_IPV6
|| cmsg->cmsg_type != IPV6_PKTINFO
@@ -679,6 +708,7 @@ svc_dg_valid_pktinfo(struct msghdr *msg)
pkti->ipi6_ifindex = 0;
}
break;
+#endif
default:
return 0;
diff --git a/src/svc_vc.c b/src/svc_vc.c
index aaaf2d7..4c70de8 100644
--- a/src/svc_vc.c