Date: Sun, 17 Dec 2006 19:41:35 +0100 (CET) From: Janos Mohacsi <janos.mohacsi@bsd.hu> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/106840: [NEW PORT] net-mgmt/ndpmon: On-link icmpv6 message monitoring and reporting daemon Message-ID: <200612171841.kBHIfZWB041169@scone.ki.iif.hu> Resent-Message-ID: <200612171850.kBHIoEuC087625@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 106840 >Category: ports >Synopsis: [NEW PORT] net-mgmt/ndpmon: On-link icmpv6 message monitoring and reporting daemon >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Dec 17 18:50:13 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Janos Mohacsi >Release: FreeBSD 6.2-PRERELEASE i386 >Organization: NIIF/HUNGARNET >Environment: System: FreeBSD scone.ki.iif.hu 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #17: Fri Oct 20 01:04:28 CEST 2006 >Description: NDPMon is an equivalent of ArpWatch for IPv6. NDPMon, Neighbor Discovery Protocol Monitor, is a tool working with ICMPv6 packets. NDPMon observes the local network to see if nodes using neighbor discovery messages behave properly. When it detects a suspicious Neighbor Discovery message, it notifies the administrator by writing in the syslog and in some cases by sending an email report. WWW: http://ndpmon.sourceforge.net Janos Mohacsi <janos.mohacsi@bsd.hu> Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- ndpmon-1.0.shar begins here --- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # ndpmon # ndpmon/pkg-descr # ndpmon/distinfo # ndpmon/Makefile # ndpmon/files # ndpmon/files/patch-print__packet__info.h # ndpmon/files/patch-utils.h # ndpmon/files/patch-ndpmon.h # ndpmon/files/patch-monitoring.h # ndpmon/files/patch-monitoring__ra.h # ndpmon/files/patch-monitoring__na.h # ndpmon/files/patch-monitoring__ns.h # ndpmon/files/patch-monitoring__rd.h # ndpmon/files/patch-ndpmon.c # ndpmon/files/patch-parser.c # ndpmon/files/patch-ndpmon.8 # ndpmon/files/patch-config__ndpmon.xml # ndpmon/files/patch-neighbor__list.xml # ndpmon/pkg-plist # echo c - ndpmon mkdir -p ndpmon > /dev/null 2>&1 echo x - ndpmon/pkg-descr sed 's/^X//' >ndpmon/pkg-descr << 'END-of-ndpmon/pkg-descr' XNDPMon is an equivalent of ArpWatch for IPv6. X XNDPMon, Neighbor Discovery Protocol Monitor, is a tool working with XICMPv6 packets. NDPMon observes the local network to see if nodes Xusing neighbor discovery messages behave properly. When it detects Xa suspicious Neighbor Discovery message, it notifies the administrator Xby writing in the syslog and in some cases by sending an email Xreport. X XWWW: http://ndpmon.sourceforge.net X XJanos Mohacsi <janos.mohacsi@bsd.hu> END-of-ndpmon/pkg-descr echo x - ndpmon/distinfo sed 's/^X//' >ndpmon/distinfo << 'END-of-ndpmon/distinfo' XMD5 (ndpmon-1.0b.tgz) = 80c2076de3399fde5fd9959d487538c1 XSHA256 (ndpmon-1.0b.tgz) = c8e26f1bdf69a9609b482afe05dacbab5c129fc80964b0fdf1e272948f098651 XSIZE (ndpmon-1.0b.tgz) = 49818 END-of-ndpmon/distinfo echo x - ndpmon/Makefile sed 's/^X//' >ndpmon/Makefile << 'END-of-ndpmon/Makefile' X# New ports collection makefile for: ndpmon X# Date created: 2006-12-17 X# Whom: janos.mohacsi@bsd.hu X# X# $FreeBSD$ X# X XPORTNAME= ndpmon XPORTVERSION= 1.0 XCATEGORIES= net-mgmt ipv6 XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE} XMASTER_SITE_SUBDIR= ${PORTNAME} XDISTFILES= ${PORTNAME}-${PORTVERSION}b.tgz X XMAINTAINER= janos.mohacsi@bsd.hu XCOMMENT= On-link icmpv6 message monitoring and reporting daemon X XUSE_GNOME= libxml2 X XGNU_CONFIGURE= yes X XMAN8= ndpmon.8 XPORTDOCS= INSTALL README X Xpost-patch: X @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \ X ${WRKSRC}/ndpmon.c \ X ${WRKSRC}/ndpmon.8 \ X ${WRKSRC}/config_ndpmon.xml \ X ${WRKSRC}/neighbor_list.xml X Xdo-install: X ${INSTALL_MAN} ${WRKSRC}/ndpmon.8 ${PREFIX}/man/man8 X ${INSTALL_PROGRAM} ${WRKSRC}/ndpmon ${PREFIX}/sbin X ${MKDIR} ${DATADIR} X ${INSTALL_DATA} ${WRKSRC}/*.dtd \ X ${DATADIR} X ${INSTALL_DATA} ${WRKSRC}/config_ndpmon.xml ${PREFIX}/etc/config_ndpmon.xml-dist X ${MKDIR} ${PREFIX}/var X ${INSTALL_DATA} ${WRKSRC}/neighbor_list.xml ${PREFIX}/var/ndpmon_neighbor_list.xml X X.if !defined(NOPORTDOCS) Xpost-install: X ${MKDIR} ${DOCSDIR} X cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} X.endif X X.include <bsd.port.mk> END-of-ndpmon/Makefile echo c - ndpmon/files mkdir -p ndpmon/files > /dev/null 2>&1 echo x - ndpmon/files/patch-print__packet__info.h sed 's/^X//' >ndpmon/files/patch-print__packet__info.h << 'END-of-ndpmon/files/patch-print__packet__info.h' X X$FreeBSD$ X X--- print_packet_info.h.orig X+++ print_packet_info.h X@@ -37,7 +37,9 @@ X X #include <stdio.h> X #include <stdlib.h> X-#include <netinet/ether.h> X+#include <sys/types.h> X+#include <netinet/in.h> X+#include <net/ethernet.h> X #include <netinet/ip6.h> X #include <netinet/icmp6.h> X END-of-ndpmon/files/patch-print__packet__info.h echo x - ndpmon/files/patch-utils.h sed 's/^X//' >ndpmon/files/patch-utils.h << 'END-of-ndpmon/files/patch-utils.h' X X$FreeBSD$ X X--- utils.h.orig X+++ utils.h X@@ -36,7 +36,7 @@ X #define ETHERNET_SIZE 14 /* ethernet headers are 14 bytes */ X #define IPV6_SIZE 40 /* ipv6 headers without fragment ... are 40 bytes */ X #define ICMP6_HEADER_SIZE 8 X-#define ETHERTYPE_IPV6 0x86dd X+/*#define ETHERTYPE_IPV6 0x86dd */ X X /*Size to build char* address in a readable form*/ X #define IP6_STR_SIZE 40 /*xxxx:xxxx:xxx:xxxx:xxxx:xxxx:xxxx:xxxx*/ END-of-ndpmon/files/patch-utils.h echo x - ndpmon/files/patch-ndpmon.h sed 's/^X//' >ndpmon/files/patch-ndpmon.h << 'END-of-ndpmon/files/patch-ndpmon.h' X X$FreeBSD$ X X--- ndpmon.h.orig X+++ ndpmon.h X@@ -38,7 +38,7 @@ X X #include <netinet/in.h> X #include <netinet/if_ether.h> X-#include <netinet/ether.h> X+#include <net/ethernet.h> X #include <netinet/ip6.h> X #include <netinet/icmp6.h> X #include <net/ethernet.h> END-of-ndpmon/files/patch-ndpmon.h echo x - ndpmon/files/patch-monitoring.h sed 's/^X//' >ndpmon/files/patch-monitoring.h << 'END-of-ndpmon/files/patch-monitoring.h' X X$FreeBSD$ X X--- monitoring.h.orig X+++ monitoring.h X@@ -36,8 +36,9 @@ X X #include <time.h> X X+#include <sys/types.h> X #include <netinet/in.h> X-#include <netinet/ether.h> X+#include <net/ethernet.h> X #include <netinet/ip6.h> X #include <netinet/icmp6.h> X #include <string.h> END-of-ndpmon/files/patch-monitoring.h echo x - ndpmon/files/patch-monitoring__ra.h sed 's/^X//' >ndpmon/files/patch-monitoring__ra.h << 'END-of-ndpmon/files/patch-monitoring__ra.h' X X$FreeBSD$ X X--- monitoring_ra.h.orig X+++ monitoring_ra.h X@@ -33,7 +33,9 @@ X #ifndef _MONITORING_RA_ X #define _MONITORING_RA_ 1 X X-#include <netinet/ether.h> X+#include <sys/types.h> X+#include <net/ethernet.h> X+#include <netinet/in.h> X #include <netinet/ip6.h> X #include <netinet/icmp6.h> X END-of-ndpmon/files/patch-monitoring__ra.h echo x - ndpmon/files/patch-monitoring__na.h sed 's/^X//' >ndpmon/files/patch-monitoring__na.h << 'END-of-ndpmon/files/patch-monitoring__na.h' X X$FreeBSD$ X X--- monitoring_na.h.orig X+++ monitoring_na.h X@@ -34,7 +34,9 @@ X #ifndef _MONITORING_NA_ X #define _MONITORING_NA_ 1 X X-#include <netinet/ether.h> X+#include <sys/types.h> X+#include <netinet/in.h> X+#include <net/ethernet.h> X #include <netinet/ip6.h> X #include <netinet/icmp6.h> X END-of-ndpmon/files/patch-monitoring__na.h echo x - ndpmon/files/patch-monitoring__ns.h sed 's/^X//' >ndpmon/files/patch-monitoring__ns.h << 'END-of-ndpmon/files/patch-monitoring__ns.h' X X$FreeBSD$ X X--- monitoring_ns.h.orig X+++ monitoring_ns.h X@@ -33,7 +33,9 @@ X #ifndef _MONITORING_NS_ X #define _MONITORING_NS_ 1 X X-#include <netinet/ether.h> X+#include <sys/types.h> X+#include <netinet/in.h> X+#include <net/ethernet.h> X #include <netinet/ip6.h> X #include <netinet/icmp6.h> X #include <netinet/in.h> END-of-ndpmon/files/patch-monitoring__ns.h echo x - ndpmon/files/patch-monitoring__rd.h sed 's/^X//' >ndpmon/files/patch-monitoring__rd.h << 'END-of-ndpmon/files/patch-monitoring__rd.h' X X$FreeBSD$ X X--- monitoring_rd.h.orig X+++ monitoring_rd.h X@@ -33,7 +33,9 @@ X #ifndef _MONITORING_RD_ X #define _MONITORING_RD_ 1 X X-#include <netinet/ether.h> X+#include <sys/types.h> X+#include <netinet/in.h> X+#include <net/ethernet.h> X #include <netinet/ip6.h> X #include <netinet/icmp6.h> X END-of-ndpmon/files/patch-monitoring__rd.h echo x - ndpmon/files/patch-ndpmon.c sed 's/^X//' >ndpmon/files/patch-ndpmon.c << 'END-of-ndpmon/files/patch-ndpmon.c' X X$FreeBSD$ X X--- ndpmon.c.orig X+++ ndpmon.c X@@ -43,10 +43,10 @@ X char admin_mail[128] = ""; X char syslog_facility[16] = ""; X int ignor_autoconf = 0; X-char config_path[128] = "/usr/local/ndpmon/config_ndpmon.xml"; X-char cache_path[128] = "/usr/local/ndpmon/neighbor_list.xml"; X-char dtd_path[128] = "/usr/local/ndpmon/neighbor_list.dtd"; X-char dtd_config_path[128] = "/usr/local/ndpmon/config_ndpmon.dtd"; X+char config_path[128] = "%%PREFIX%%/etc/config_ndpmon.xml"; X+char cache_path[128] = "%%PREFIX%%/var/ndpmon_neighbor_list.xml"; X+char dtd_path[128] = "%%PREFIX%%/share/ndpmon/neighbor_list.dtd"; X+char dtd_config_path[128] = "%%PREFIX%%/share/ndpmon/config_ndpmon.dtd"; X X #ifdef _MACRESOLUTION_ X manufacturer_t *manuf = NULL; X@@ -438,7 +438,7 @@ X X X /* open device for reading */ X- descr = pcap_open_live(interface,BUFSIZ,1,-1,errbuf); X+ descr = pcap_open_live(interface,BUFSIZ,1,1000,errbuf); X if(descr == NULL) X { X fprintf(stderr,"pcap_open_live(): %s\n",errbuf); exit(1); END-of-ndpmon/files/patch-ndpmon.c echo x - ndpmon/files/patch-parser.c sed 's/^X//' >ndpmon/files/patch-parser.c << 'END-of-ndpmon/files/patch-parser.c' X X$FreeBSD$ X X--- parser.c.orig X+++ parser.c X@@ -65,11 +65,13 @@ X /** note: it may be a good option to save values, and restore X * them when exiting X */ X+ /* X write_proc("/proc/sys/net/ipv6/conf/all/autoconf",flag); X write_proc("/proc/sys/net/ipv6/conf/all/accept_ra",flag); X write_proc("/proc/sys/net/ipv6/conf/all/accept_ra_defrtr",flag); X write_proc("/proc/sys/net/ipv6/conf/all/accept_ra_pinfo",flag); X write_proc("/proc/sys/net/ipv6/conf/all/accept_redirects",flag); X+ */ X } X X xmlXPathFreeObject (xmlobject); END-of-ndpmon/files/patch-parser.c echo x - ndpmon/files/patch-ndpmon.8 sed 's/^X//' >ndpmon/files/patch-ndpmon.8 << 'END-of-ndpmon/files/patch-ndpmon.8' X X$FreeBSD$ X X--- ndpmon.8.orig X+++ ndpmon.8 X@@ -57,12 +57,12 @@ X .B -f X flag is used to change the path of the configuration file. X The default is X-.IR /usr/local/ndpmon/config_ndpmon.xml X+.IR %%PREFIX%%/etc/config_ndpmon.xml X .LP X The X .B -e X flag is used to change the path to the DTD file for the configuration file. The default is X-.I /usr/local/ndpmon/config_ndpmon.dtd X+.I %%PREFIX%%/share/ndpmon/config_ndpmon.dtd X .LP X The X .B -n X@@ -83,12 +83,12 @@ X The X .B -d X flag is used to change the path to the DTD file for the neighbor cache. The default is X-.I /usr/local/ndpmon/neighbor_list.dtd X+.I %%PREFIX%%/share/ndpmon/neighbor_list.dtd X .LP X The X .B -g X flag is used to change the path to the neighbor cache. The default is X-.I /usr/local/ndpmon/neighbor_list.xml X+.I %%PREFIX%%/var/ndpmon_neighbor_list.xml X .LP X Note that an empty X .I neighbor_cache.xml END-of-ndpmon/files/patch-ndpmon.8 echo x - ndpmon/files/patch-config__ndpmon.xml sed 's/^X//' >ndpmon/files/patch-config__ndpmon.xml << 'END-of-ndpmon/files/patch-config__ndpmon.xml' X X$FreeBSD$ X X--- config_ndpmon.xml.orig X+++ config_ndpmon.xml X@@ -1,5 +1,5 @@ X <?xml version="1.0" encoding="ISO-8859-1"?> X-<!DOCTYPE config_ndpmon SYSTEM "config_ndpmon.dtd"> X+<!DOCTYPE config_ndpmon SYSTEM "%%PREFIX%%/share/ndpmon/config_ndpmon.dtd"> X <config_ndpmon> X <ignor_autoconf>1</ignor_autoconf> X <syslog_facility>LOG_LOCAL1</syslog_facility> END-of-ndpmon/files/patch-config__ndpmon.xml echo x - ndpmon/files/patch-neighbor__list.xml sed 's/^X//' >ndpmon/files/patch-neighbor__list.xml << 'END-of-ndpmon/files/patch-neighbor__list.xml' X X$FreeBSD$ X X--- neighbor_list.xml.orig X+++ neighbor_list.xml X@@ -1,5 +1,5 @@ X <?xml version="1.0" encoding="ISO-8859-1"?> X <!DOCTYPE neighbor_list X-SYSTEM "/usr/local/ndpmon/neighbor_list.dtd"> X+SYSTEM "%%PREFIX%%/share/ndpmon/neighbor_list.dtd"> X <neighbor_list> X </neighbor_list> END-of-ndpmon/files/patch-neighbor__list.xml echo x - ndpmon/pkg-plist sed 's/^X//' >ndpmon/pkg-plist << 'END-of-ndpmon/pkg-plist' Xsbin/ndpmon X%%DATADIR%%/config_ndpmon.dtd X%%DATADIR%%/neighbor_list.dtd X@dirrmtry %%DATADIR%% Xvar/ndpmon_neighbor_list.xml X@dirrmtry var Xetc/config_ndpmon.xml-dist END-of-ndpmon/pkg-plist exit --- ndpmon-1.0.shar ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612171841.kBHIfZWB041169>