|
@@ -893,12 +893,17 @@ svc_udp_sendto(struct svc_rqst *rqstp)
|
|
|
return error;
|
|
|
}
|
|
|
|
|
|
+static void svc_udp_prep_reply_hdr(struct svc_rqst *rqstp)
|
|
|
+{
|
|
|
+}
|
|
|
+
|
|
|
static struct svc_xprt_ops svc_udp_ops = {
|
|
|
.xpo_recvfrom = svc_udp_recvfrom,
|
|
|
.xpo_sendto = svc_udp_sendto,
|
|
|
.xpo_release_rqst = svc_release_skb,
|
|
|
.xpo_detach = svc_sock_detach,
|
|
|
.xpo_free = svc_sock_free,
|
|
|
+ .xpo_prep_reply_hdr = svc_udp_prep_reply_hdr,
|
|
|
};
|
|
|
|
|
|
static struct svc_xprt_class svc_udp_class = {
|
|
@@ -1350,12 +1355,24 @@ svc_tcp_sendto(struct svc_rqst *rqstp)
|
|
|
return sent;
|
|
|
}
|
|
|
|
|
|
+/*
|
|
|
+ * Setup response header. TCP has a 4B record length field.
|
|
|
+ */
|
|
|
+static void svc_tcp_prep_reply_hdr(struct svc_rqst *rqstp)
|
|
|
+{
|
|
|
+ struct kvec *resv = &rqstp->rq_res.head[0];
|
|
|
+
|
|
|
+ /* tcp needs a space for the record length... */
|
|
|
+ svc_putnl(resv, 0);
|
|
|
+}
|
|
|
+
|
|
|
static struct svc_xprt_ops svc_tcp_ops = {
|
|
|
.xpo_recvfrom = svc_tcp_recvfrom,
|
|
|
.xpo_sendto = svc_tcp_sendto,
|
|
|
.xpo_release_rqst = svc_release_skb,
|
|
|
.xpo_detach = svc_sock_detach,
|
|
|
.xpo_free = svc_sock_free,
|
|
|
+ .xpo_prep_reply_hdr = svc_tcp_prep_reply_hdr,
|
|
|
};
|
|
|
|
|
|
static struct svc_xprt_class svc_tcp_class = {
|