summaryrefslogtreecommitdiffhomepage
path: root/gre.c
diff options
context:
space:
mode:
Diffstat (limited to 'gre.c')
-rw-r--r--gre.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gre.c b/gre.c
index 3a44d8c..40ea9f9 100644
--- a/gre.c
+++ b/gre.c
@@ -423,8 +423,12 @@ static int tun_cb(void)
return -1;
}
- sendto(sock, frame, n, 0, (struct sockaddr *)&dest, remote_len);
- return 0;
+ ssize_t res = sendto(sock, frame, n, 0, (struct sockaddr *)&dest, remote_len);
+ if (res < 0)
+ {
+ perror("sendto");
+ }
+ return res;
}
static int tun_new(short type, const char *dev)