#define SUNRPC_SVC_H
 
 #include <linux/in.h>
+#include <linux/in6.h>
 #include <linux/sunrpc/types.h>
 #include <linux/sunrpc/xdr.h>
 #include <linux/sunrpc/auth.h>
        iov->iov_len += sizeof(__be32);
 }
 
-       
+union svc_addr_u {
+    struct in_addr     addr;
+#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
+    struct in6_addr    addr6;
+#endif
+};
+
 /*
  * The context of a single thread, including the request currently being
  * processed.
        unsigned short
                                rq_secure  : 1; /* secure port */
 
-
-       __be32                  rq_daddr;       /* dest addr of request - reply from here */
+       union svc_addr_u        rq_daddr;       /* dest addr of request
+                                                *  - reply from here */
 
        void *                  rq_argp;        /* decoded arguments */
        void *                  rq_resp;        /* xdr'd results */
        struct svc_sock         *svsk;
        struct sockaddr_storage addr;   /* where reply must go */
        size_t                  addrlen;
-       __be32                  daddr;  /* where reply must come from */
+       union svc_addr_u        daddr;  /* where reply must come from */
        struct cache_deferred_req handle;
        int                     argslen;
        __be32                  args[0];
 
                cmh->cmsg_level = SOL_IP;
                cmh->cmsg_type = IP_PKTINFO;
                pki->ipi_ifindex = 0;
-               pki->ipi_spec_dst.s_addr = rqstp->rq_daddr;
+               pki->ipi_spec_dst.s_addr = rqstp->rq_daddr.addr.s_addr;
 
                if (sock_sendmsg(sock, &msg, 0) < 0)
                        goto out;
        rqstp->rq_addrlen = sizeof(struct sockaddr_in);
 
        /* Remember which interface received this request */
-       rqstp->rq_daddr = skb->nh.iph->daddr;
+       rqstp->rq_daddr.addr.s_addr = skb->nh.iph->daddr;
 
        if (skb_is_nonlinear(skb)) {
                /* we have to copy */