Bug 202139 - security/nmap: make it actually work on 10.0 and up
Summary: security/nmap: make it actually work on 10.0 and up
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Olli Hauer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-06 17:53 UTC by Edward Tomasz Napierala
Modified: 2015-09-27 10:59 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (ohauer)


Attachments
Diff to put into files/. (931 bytes, text/x-c++src)
2015-08-06 17:53 UTC, Edward Tomasz Napierala
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Edward Tomasz Napierala freebsd_committer freebsd_triage 2015-08-06 17:53:39 UTC
Created attachment 159626 [details]
Diff to put into files/.

The attached patch (drop intoto files/) makes Nmap SYN scanning (and perhaps others, other than Connect scan, which already worked) work on FreeBSD 10.0 and up.

Without it, attempt to scan ("nmap -Av -sS localhost") would result in:

sendto in send_ip_packet_sd: sendto(5, packet, 44, 0, 127.0.0.1, 16) => Invalid argument
Offending packet: TCP 127.0.0.1:62353 > 127.0.0.1:995 S ttl=40 id=64012 iplen=11264 seq=1481935911 win=1024
Comment 1 Edward Tomasz Napierala freebsd_committer freebsd_triage 2015-08-06 17:54:14 UTC
Forgot to add:

Sponsored by: The FreeBSD Foundation
Comment 2 Olli Hauer freebsd_committer freebsd_triage 2015-09-27 10:03:21 UTC
Using (__FreeBSD_version < 1000022) all 10.x releases are affected.

Regarding https://svnweb.freebsd.org/base?view=revision&revision=270929 the correct __FreeBSD_version should be 1100030 (not 1000022)
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-09-27 10:33:27 UTC
A commit references this bug:

Author: ohauer
Date: Sun Sep 27 10:32:33 UTC 2015
New revision: 398033
URL: https://svnweb.freebsd.org/changeset/ports/398033

Log:
  - update to 6.49BETA5
  - use DOCS instead PORTDOCS
  - remove gcc workaround [1]
  - (hopefully) use the correct __FreeBSD_version for SOCK_RAW

  Changelog:
  https://nmap.org/changelog.html

  PR:		196065 [1]
  PR:		200558 [2]
  PR:		202139 [3]

  Submitted by:	sbruno@ , mikael.urankar@gmail.com [1]
  Submitted by:	truckman@ [2]
  Submitted by:	trasz@ [3]

Changes:
  head/security/nmap/Makefile
  head/security/nmap/distinfo
  head/security/nmap/files/patch-Makefile.in
  head/security/nmap/files/patch-configure
  head/security/nmap/files/patch-libdnet-stripped__configure
  head/security/nmap/files/patch-libdnet-stripped__src__eth-bsd.c
  head/security/nmap/files/patch-liblua-lua523
  head/security/nmap/files/patch-liblua__Makefile
  head/security/nmap/files/patch-liblua__liolib.c
  head/security/nmap/files/patch-libnetutil_netutil.cc
  head/security/nmap/files/patch-nmap.cc
  head/security/nmap/files/patch-output.cc
  head/security/nmap/files/patch-tcpip.cc
  head/security/nmap/pkg-plist
Comment 4 Olli Hauer freebsd_committer freebsd_triage 2015-09-27 10:59:37 UTC
Committed with different __FreeBSD_version,

Thanks!