Author: tuexen
Date: Sat Sep 12 11:24:36 2020
New Revision: 365658
URL: https://svnweb.freebsd.org/changeset/base/365658

Log:
  Fix the length of probe packets when using UDP.
  Since https://svnweb.freebsd.org/changeset/base/365378 a raw socket is
  used for sending UDP probe packets instead of a UDP socket. So don't
  compensate for the UDP header anymore.

Modified:
  head/usr.sbin/traceroute6/traceroute6.c

Modified: head/usr.sbin/traceroute6/traceroute6.c
==============================================================================
--- head/usr.sbin/traceroute6/traceroute6.c     Sat Sep 12 11:19:54 2020        
(r365657)
+++ head/usr.sbin/traceroute6/traceroute6.c     Sat Sep 12 11:24:36 2020        
(r365658)
@@ -677,8 +677,6 @@ main(int argc, char *argv[])
                    minlen, MAXPACKET);
                exit(1);
        }
-       if (useproto == IPPROTO_UDP)
-               datalen -= sizeof(struct udphdr);
        if ((useproto == IPPROTO_SCTP) && (datalen & 3)) {
                fprintf(stderr, 
                    "traceroute6: packet size must be a multiple of 4.\n");
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to