swrap: Add swrap_msghdr_socket_info().
authorAndreas Schneider <asn@samba.org>
Tue, 3 Jun 2014 12:56:28 +0000 (14:56 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 5 Jun 2014 21:57:10 +0000 (23:57 +0200)
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
lib/socket_wrapper/socket_wrapper.c

index 288ca13c83ad5ff6779cb9a979c2f777bbe781b4..fdb0c5984c5423787fd379620f3481672f2858e9 100644 (file)
@@ -3098,6 +3098,17 @@ static int swrap_msghdr_add_pktinfo(struct socket_info *si,
        return 0;
 }
 
+static int swrap_msghdr_add_socket_info(struct socket_info *si,
+                                       struct msghdr *omsg)
+{
+       int rc = 0;
+
+       if (si->pktinfo > 0) {
+               rc = swrap_msghdr_add_pktinfo(si, omsg);
+       }
+
+       return rc;
+}
 #endif /* HAVE_STRUCT_MSGHDR_MSG_CONTROL */
 
 static ssize_t swrap_sendmsg_before(int fd,