summaryrefslogtreecommitdiffstats
path: root/recipes/iputils/files/debian/fix-cmsghdr-offset-bug.diff
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/iputils/files/debian/fix-cmsghdr-offset-bug.diff')
-rw-r--r--recipes/iputils/files/debian/fix-cmsghdr-offset-bug.diff19
1 files changed, 19 insertions, 0 deletions
diff --git a/recipes/iputils/files/debian/fix-cmsghdr-offset-bug.diff b/recipes/iputils/files/debian/fix-cmsghdr-offset-bug.diff
new file mode 100644
index 0000000000..7ae92df468
--- /dev/null
+++ b/recipes/iputils/files/debian/fix-cmsghdr-offset-bug.diff
@@ -0,0 +1,19 @@
+--- iputils-upstream/ping6.c 2007-10-28 12:24:10.000000000 -0400
++++ iputils/ping6.c 2007-10-28 12:19:18.000000000 -0400
+@@ -414,7 +414,7 @@
+ fprintf(stderr, "ping: unknown iface %s\n", device);
+ exit(2);
+ }
+- cmsg = (struct cmsghdr*)cmsgbuf;
++ cmsg = (struct cmsghdr*)(cmsgbuf+cmsglen);
+ cmsglen += CMSG_SPACE(sizeof(*ipi));
+ cmsg->cmsg_len = CMSG_LEN(sizeof(*ipi));
+ cmsg->cmsg_level = SOL_IPV6;
+@@ -486,7 +486,6 @@
+ /*
+ * select icmp echo reply as icmp type to receive
+ */
+-
+ ICMP6_FILTER_SETBLOCKALL(&filter);
+
+ if (!working_recverr) {