svn commit: r522253 - in head/net/mtr: . files
Sunpoet Po-Chuan Hsieh
sunpoet at FreeBSD.org
Mon Jan 6 14:45:41 UTC 2020
Author: sunpoet
Date: Mon Jan 6 14:45:39 2020
New Revision: 522253
URL: https://svnweb.freebsd.org/changeset/ports/522253
Log:
Fix "mtr-packet: Invalid argument" runtime error
- Bump PORTREVISION for package change
PR: 243121
Reported by: kib
Added:
head/net/mtr/files/patch-packet-probe.c (contents, props changed)
Modified:
head/net/mtr/Makefile
head/net/mtr/files/patch-packet-probe_unix.c
Modified: head/net/mtr/Makefile
==============================================================================
--- head/net/mtr/Makefile Mon Jan 6 14:45:34 2020 (r522252)
+++ head/net/mtr/Makefile Mon Jan 6 14:45:39 2020 (r522253)
@@ -4,6 +4,7 @@
PORTNAME= mtr
PORTVERSION= 0.93
DISTVERSIONPREFIX= v
+PORTREVISION= 1
CATEGORIES= net
MAINTAINER= sunpoet at FreeBSD.org
Added: head/net/mtr/files/patch-packet-probe.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/net/mtr/files/patch-packet-probe.c Mon Jan 6 14:45:39 2020 (r522253)
@@ -0,0 +1,20 @@
+--- packet/probe.c.orig 2019-08-03 08:31:26 UTC
++++ packet/probe.c
+@@ -323,7 +323,7 @@ int find_source_addr(
+ anything to the port.
+ */
+ *sockaddr_port_offset(&dest_with_port) = htons(1);
+- len = sockaddr_addr_size(&dest_with_port);
++ len = sockaddr_size(&dest_with_port);
+
+ sock = socket(destaddr->ss_family, SOCK_DGRAM, IPPROTO_UDP);
+ if (sock == -1) {
+@@ -364,7 +364,7 @@ int find_source_addr(
+ Zero the port, as we may later use this address to finding, and
+ we don't want to use the port from the socket we just created.
+ */
+- *sockaddr_port_offset(&srcaddr) = 0;
++ *sockaddr_port_offset(srcaddr) = 0;
+
+ return 0;
+ }
Modified: head/net/mtr/files/patch-packet-probe_unix.c
==============================================================================
--- head/net/mtr/files/patch-packet-probe_unix.c Mon Jan 6 14:45:34 2020 (r522252)
+++ head/net/mtr/files/patch-packet-probe_unix.c Mon Jan 6 14:45:39 2020 (r522253)
@@ -1,14 +1,14 @@
--- packet/probe_unix.c.orig 2019-08-03 08:31:26 UTC
+++ packet/probe_unix.c
-@@ -798,6 +798,7 @@ void receive_replies_from_recv_socket(
- #endif
+@@ -795,7 +795,6 @@ void receive_replies_from_recv_socket(
+ memcpy(&remote_addr, SO_EE_OFFENDER(ee), sizeof(remote_addr));
+ }
+ }
+-#endif
#ifdef SO_PROTOCOL
-+#ifdef HAVE_LINUX_ERRQUEUE_H
if (icmp_connrefused_received) {
- /* using ICMP type ICMP_ECHOREPLY is not a bug, it is an
- indication of successfully reaching dst host.
-@@ -815,11 +816,14 @@ void receive_replies_from_recv_socket(
+@@ -815,11 +814,14 @@ void receive_replies_from_recv_socket(
packet, packet_length, ×tamp);
} else {
#endif
More information about the svn-ports-all
mailing list