summaryrefslogtreecommitdiff
path: root/net/p5-Net-RawSock/files/patch-RawSock.xs
blob: fee057163aa8dc6ba847276f0adfd2fbc01278de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- RawSock.xs.orig     Thu Jan 30 00:11:00 2003
+++ RawSock.xs  Thu Jan 30 09:58:31 2003
@@ -15,6 +15,7 @@

 #include <sys/types.h>
 #include <sys/socket.h>
+#include <netinet/in.h>
 #include <fcntl.h>


@@ -67,7 +68,9 @@
         RETVAL = 2;
       } else {
         len = ntohs(ip_hdr->tot_len);
-        if (sendto(fd,(char *)pkt,len,0x0,(struct sockaddr *)&sa,sizeof(sa))<0) {
+       ip_hdr->tot_len = len;
+        if (sendto(fd, (void *)pkt, len, 0x0,
+                   (struct sockaddr *)&sa, sizeof(sa)) < len) {
           RETVAL = 3;
         } else {
           RETVAL = 0;