From 4f2d7949f03e1c198bc888f2d05f421d35c57e21 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 9 Oct 2017 18:53:29 +0100 Subject: reinit the tree, so we can have metadata --- net-analyzer/dhcp_probe/Manifest | 16 ++++++++ net-analyzer/dhcp_probe/dhcp_probe-1.3.0-r3.ebuild | 46 +++++++++++++++++++++ .../dhcp_probe/files/1.3.0/01_dhcp_probe.5.patch | 47 ++++++++++++++++++++++ .../dhcp_probe/files/1.3.0/02_dhcp_probe.8.patch | 35 ++++++++++++++++ .../1.3.0/03_implicit_point_conv_bootp.c.patch | 21 ++++++++++ .../files/1.3.0/04_linux_32_or_64bits.patch | 33 +++++++++++++++ .../dhcp_probe/files/1.3.0/05-cleanup.patch | 29 +++++++++++++ .../dhcp_probe/files/1.3.0/06-return.patch | 11 +++++ .../dhcp_probe/files/1.3.0/07-comment.patch | 11 +++++ net-analyzer/dhcp_probe/files/1.3.0/08-man8.patch | 20 +++++++++ net-analyzer/dhcp_probe/files/dhcp_probe.confd | 9 +++++ net-analyzer/dhcp_probe/files/dhcp_probe.initd | 47 ++++++++++++++++++++++ net-analyzer/dhcp_probe/files/dhcp_probe_mail | 23 +++++++++++ net-analyzer/dhcp_probe/metadata.xml | 16 ++++++++ 14 files changed, 364 insertions(+) create mode 100644 net-analyzer/dhcp_probe/Manifest create mode 100644 net-analyzer/dhcp_probe/dhcp_probe-1.3.0-r3.ebuild create mode 100644 net-analyzer/dhcp_probe/files/1.3.0/01_dhcp_probe.5.patch create mode 100644 net-analyzer/dhcp_probe/files/1.3.0/02_dhcp_probe.8.patch create mode 100644 net-analyzer/dhcp_probe/files/1.3.0/03_implicit_point_conv_bootp.c.patch create mode 100644 net-analyzer/dhcp_probe/files/1.3.0/04_linux_32_or_64bits.patch create mode 100644 net-analyzer/dhcp_probe/files/1.3.0/05-cleanup.patch create mode 100644 net-analyzer/dhcp_probe/files/1.3.0/06-return.patch create mode 100644 net-analyzer/dhcp_probe/files/1.3.0/07-comment.patch create mode 100644 net-analyzer/dhcp_probe/files/1.3.0/08-man8.patch create mode 100644 net-analyzer/dhcp_probe/files/dhcp_probe.confd create mode 100644 net-analyzer/dhcp_probe/files/dhcp_probe.initd create mode 100644 net-analyzer/dhcp_probe/files/dhcp_probe_mail create mode 100644 net-analyzer/dhcp_probe/metadata.xml (limited to 'net-analyzer/dhcp_probe') diff --git a/net-analyzer/dhcp_probe/Manifest b/net-analyzer/dhcp_probe/Manifest new file mode 100644 index 000000000000..62e487765569 --- /dev/null +++ b/net-analyzer/dhcp_probe/Manifest @@ -0,0 +1,16 @@ +AUX 1.3.0/01_dhcp_probe.5.patch 2148 SHA256 7e6b1613ae8b258ae9dd1cec9b94f894f7c3516eb8cfef5cb3e72f9c925a5470 SHA512 490e9ad1e81e7e89133dfcd44d61806c0751c9b02616258d3037c03376a7277431d9e113aab4f1bc2aca4a9f0a2a93c83d2ebbff8ea3cfdeb3693f77711679e0 WHIRLPOOL 053cbd5e7b2940c687dfc9f64bd0ca821fecd183baa1f86166ae50882003f9e3a478c99ee1b9e97f3898b7d2c5d20350bf7a84559d7578da4fdb338ad70ae8fd +AUX 1.3.0/02_dhcp_probe.8.patch 1467 SHA256 5d7aee753c80eb158eb2e24d5685c279aee38471d2865bd480f2e9d68e9dec54 SHA512 f5640eb6c81beb6e8060b6e8d76e4bdabf690e2b4f5c2ce230738cf1c3b59c068b15c61816cf903279d79f76c02e31a9ac98cc05ddbee0ce11c3936c0f502e8c WHIRLPOOL 055b94a675640e85a871bfa05b84b76fa45284977960685ff64f56765a024535c5c2bed6bb8c4d8af9ffff04b4aa79e72a8625b51fb369895ef313cddf86ec8f +AUX 1.3.0/03_implicit_point_conv_bootp.c.patch 619 SHA256 2a6d89c8005a3ed83e53bd16f50fb3eef8a0a7ab47178f9f381935eaefb89334 SHA512 e42f3c97e867c21195875b87577cd3ae9e635da480c4fd7116a2fa2d3ae7a6b90ffd5977aa8a146e20684faa5f4745fb4b55fea6971a6b2661669a8972e1d4e3 WHIRLPOOL 0b42c625a241d9929e55111d68fa5ed66cea9c1f0e7380cda573a554a0dd2ab002192fbb865bbf9a24460ff06f75c5a4e2943d63e2b136ea0b68965213e3d37a +AUX 1.3.0/04_linux_32_or_64bits.patch 1216 SHA256 15f51ff259ef8a9b92cda47f5d39e503a4763bba30c3462fbd2ee44d8c957ef0 SHA512 1a55059f60f56e8bca8a07a0afd4ae472ae81aaf09ba7a2df01654770c1785abc2353bcd06318a96739b523646b17a28eaabf7e4db620c91f18cc371f7045a6c WHIRLPOOL 9969bc315ce44b8df21be3a96a4501b691a5f541b05f54f072893d30bfbbfdde8e89812cd8cc8a57962b7eba7f92292c42717bde33b7bee14870aec5c1d5246d +AUX 1.3.0/05-cleanup.patch 722 SHA256 f8dc06ccd4f600b4a6b59300431ec5ad7a3fb5201e9d9c10a0c6018146e50e50 SHA512 7cf04f916fdef88ae245d035b70a7081977f275b3fe8ddb4c43bb1106a82dc282f8caaac6e79d4ffa332ec4f548f90a381283503f09294ad889e0a197ed790be WHIRLPOOL f4c757d69fd703204cc71a802736b54b695a0bdf49a7c30e91831bdb4777fa54aed4a3b91975699b51c9d66bbead2698cbc6a3ba208b2bd7e56d9833bffddbf1 +AUX 1.3.0/06-return.patch 271 SHA256 8688939b4abf962c6da1d2610ed0a3ee5a35150f0855758a868a2d282e52e620 SHA512 608588d4b6ab9be136493b5bbfd44461525b3e8f767c0a834b502aebcb418ba620792a29b65568e951f38565a2972cac62d09c4c957ef90f2b11a7991cecb726 WHIRLPOOL 66f4b4d323064b58b77b2ca8270b7bd916b543ed30636d3b90880c292a5704c668a7482254499872c92ce5b8680a5bb4fe11df009940f8faaff8530da6130d5d +AUX 1.3.0/07-comment.patch 747 SHA256 66129bcd66fe4cede6db6f9954b0d27a01d9a61060f4d3451cc52c6c8997f9b6 SHA512 1509363c088d7a30373d3a93dfb8d702154050de5adcd743f370174d113c54330f5728f970f297a4202ad2b1538cb316325adac267e1079ac3710b2c8dfb86d8 WHIRLPOOL 7f839957cad3818d4fd944b0fd2293744865aa32beaa314f9d211fb6116013b422339c9d81810e36a1585d1f88cc337bfefe679f5a49a782d2525dd18bc24bee +AUX 1.3.0/08-man8.patch 612 SHA256 e4112e698ec27b19b7bd99f1a46523675e82fd4be5f3e40f7b6fd4925fe48db7 SHA512 5bdd6f26bc60624aaa529b57a6290a9c03ef7ebc3f25881025c4b0cd1a69424249920adaa3ec513c5475808744f49e683965a836eea5fea8321b441dfdc9e8b9 WHIRLPOOL e96c6747cf00e2bef3941b1ff5b980d4badc5207df56713ab939ae1129401425f0cb3cb9835b36cf0a2ffe75ff8b073c3af4eba25f0b0331c452ff8636008efc +AUX dhcp_probe.confd 221 SHA256 302fac43247ae3c94f25b16784579d0e1ed09c875f6b3c1a3228f9d303b343fe SHA512 c12c574da59c4727470c4add4f1bad1a6787329218f2af5cfa17dac46de1bde546011b24e95c06900c173885eb9d152965d8edaed07117cc36f19755da157f47 WHIRLPOOL a6b268659ddbb606d75ef54093824b4e43085027f2dfb977bc3944edbb028df8e3cd75a7d3a03708e80c0670d9536ac0b8fa025d41128d2ab7be839ad8c45065 +AUX dhcp_probe.initd 1189 SHA256 2bb38467a6bee615b7b3de711dccefd68a5d34e7a1d9716326500634099701df SHA512 bca85a97c55625a7a72241edf738b61dc13b2c96b8ef53fef6d7594d744b0b65f0c0b0d3aad209b629906f13bb39591240a224bb0d59a2516a924ec921463742 WHIRLPOOL 8b7af281c222d3c562b42f55346a5215d2f27e4c958fbd6b1f2ee8a3ef8aebd08e85b52788cd798c226d4b746440c8d0248eb6e010d169b51a69cbe84b4259a4 +AUX dhcp_probe_mail 627 SHA256 13837b61cf7e29e311b5cf81fc7cad93d42ceecea76777e1a4e9ae8667d98341 SHA512 2a66c702d71835115a0a3b340d2c9e256ce2de6a983247dd4e2c3c0d908a5ac9f0cf7ffbbe45c1e441e906833c7091eb0c19b6c6034ca46edf1d635dfa15b0c0 WHIRLPOOL faf492e8a8b7583b6b65834e9d98276195271a001bea26ce78587b477b8c2d8b8a90c95471dfc49a344e6105eb468227fdcb11fb2d562bb298543cd064164918 +DIST dhcp_probe-1.3.0.tar.gz 211613 SHA256 227cd6a82a7fa4d989994cb076f18092bc2c82592ceaeb31c4fdd09294b9265f SHA512 d643012529ee5149adbc0c1f19f8e579c55201e86de2aec9b3313be9412db4e973162f864d1baaf79fa340b7bd9a7385f0f1406d1b616e801ced3c7bb387c854 WHIRLPOOL 86a48b10f4a843b95b1b0ec0a3938d831966c701f5d341902595fb0d0b6fede2d9d5ba03a3e3ebaab6a311a6536df02ace1f36613a177392302b6e523a5e98f6 +EBUILD dhcp_probe-1.3.0-r3.ebuild 933 SHA256 11eee424bea1382bb521aaba6ba6793b158cb6f3a73a4a41e057c39cc64c37e3 SHA512 3bd008e5a8299dc9a8799f03ad23032e10d85e390ab218a25609db1180a2083b7ce51b7773c2be6689c4ae42783350f6646272e90fa0e8d15cf62b9057b45f7c WHIRLPOOL 4b51cfcb0f494c04ce3d27c8fb705cd620c1067e06846d1d64d18e8aceb9f86883aa4f7c4587e525fd741ac10ea39e496e7f8c1da5aece8fa14c047f1171589b +MISC ChangeLog 2950 SHA256 88c01d3b335ce44af838adfc6cea450d8e2195cf783b81d17f3dd50b5880e3e5 SHA512 ff184946a9ed3bb2aa3abd61bafdee8a07a90df3e4d4246199f4720576ca881d821832e4f452baffc6f22618916375db9fe45e7f24ee42759108b24805e5769a WHIRLPOOL 50aae39db80fffd1bfe263156360dffc9fe884d45a9cd13cb4a349ae717d61a0cd1395756f605eef01cb4564e4c1db7787f1331b8cacb290f0b02082170fae76 +MISC ChangeLog-2015 1810 SHA256 c6a2d4711d486b3401560a62db11efc98be6b483606765ff2e5b8a466ef5119d SHA512 7bebb084a5cde93c575a2fae30dd63cf6d9e655708d48931e75e4df121a2c594995e89ef3a049d02675d36d471b22252e47942ecb9c457ec2d452820033d7d95 WHIRLPOOL 3bf72dc7037ce4d8b355884304b58e38c5aff94f9054d677b7d2a5b0cc83bd0db53446f35bf416a95c01998b1b91f28302bae118b45504b886efd26d3c9e5e1a +MISC metadata.xml 521 SHA256 2ad258e9ff1bb391fd69b67d553ee7b82e9822c9345c7e5a51370c9a3365dace SHA512 c04b196d9e86da49576a5300f10039f9d82df0684e626c1d0517ba70b4eccd5306f681821ba6e2539d557b1cc1b33680ac2137879ab11f247db1fd62c1626c9f WHIRLPOOL fae2f0bc00a7da4ebe0a0fbf2f0e7734e2a8d11cecb6b96e3e644555f8c867789135eba26059b0634c416427532adf2b9ac21c1354678dab875cc7ad28a779d5 diff --git a/net-analyzer/dhcp_probe/dhcp_probe-1.3.0-r3.ebuild b/net-analyzer/dhcp_probe/dhcp_probe-1.3.0-r3.ebuild new file mode 100644 index 000000000000..83aad9792a35 --- /dev/null +++ b/net-analyzer/dhcp_probe/dhcp_probe-1.3.0-r3.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="2" + +inherit eutils flag-o-matic + +DESCRIPTION="dhcp_probe attempts to discover DHCP and BootP servers on a directly-attached Ethernet network" +HOMEPAGE="http://www.net.princeton.edu/software/dhcp_probe/" +SRC_URI="http://www.net.princeton.edu/software/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="" + +DEPEND=" + net-libs/libpcap + >=net-libs/libnet-1.1.2.1-r2 + " +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${PV}/*.patch +} + +src_configure() { + use amd64 && append-flags -D__ARCH__=64 + STRIP=true econf || die "econf failed" +} + +src_install() { + emake install DESTDIR="${D}" + + newinitd "${FILESDIR}/${PN}.initd" ${PN} + newconfd "${FILESDIR}/${PN}.confd" ${PN} + + dodoc \ + extras/dhcp_probe.cf.sample \ + NEWS \ + README \ + ChangeLog \ + AUTHORS \ + TODO \ + || die "dodoc failed" +} diff --git a/net-analyzer/dhcp_probe/files/1.3.0/01_dhcp_probe.5.patch b/net-analyzer/dhcp_probe/files/1.3.0/01_dhcp_probe.5.patch new file mode 100644 index 000000000000..2d5599c06224 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/01_dhcp_probe.5.patch @@ -0,0 +1,47 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 01_dhcp_probe.5.dpatch by Laurent Guignard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Change a syntax problem in groff file for hyphenation problem +## Note: +## Submitted to upstream programmer Irwin Tillman. +## This patch will be applied in the next version of the upstream code. + + +@DPATCH@ +diff -urNad trunk~/doc/dhcp_probe.cf.5 trunk/doc/dhcp_probe.cf.5 +--- trunk~/doc/dhcp_probe.cf.5 2009-03-30 14:53:40.000000000 +0200 ++++ trunk/doc/dhcp_probe.cf.5 2009-03-30 14:57:05.000000000 +0200 +@@ -472,10 +472,10 @@ + .PP + .RS + .nf +--p the name of the calling program (e.g. dhcp_probe), +--I the name of the interface on which the unexpected response packet was received +--i the IP source address of the packet +--m Ethernet source address of the packet ++\-p the name of the calling program (e.g. dhcp_probe), ++\-I the name of the interface on which the unexpected response packet was received ++\-i the IP source address of the packet ++\-m Ethernet source address of the packet + .fi + .RE + .PP +@@ -483,7 +483,7 @@ + .PP + .RS + .nf +--y the non-zero yiaddr value from the packet, when it falls inside a "Lease Network of Concern" ++\-y the non-zero yiaddr value from the packet, when it falls inside a "Lease Network of Concern" + .fi + .RE + .PP +@@ -723,7 +723,7 @@ + # alert_program_name2 /absolute/path/name + # + # The program specified via 'alert_program_name2' will be called as follows: +-# /absolute/path/name -p name_of_calling_program -I name_of_interface_on_which_the_response_was_received -i IP_source_of_the_response -m ether_src_of_the_response [-y yiaddr_when_in_lease_networks_of_concern] ++# /absolute/path/name \-p name_of_calling_program \-I name_of_interface_on_which_the_response_was_received \-i IP_source_of_the_response \-m ether_src_of_the_response [\-y yiaddr_when_in_lease_networks_of_concern] + # The options may appear in any order. + # The program must silently ignore any options or arguments it does not recognize, + # so as to be forward-compatible with future enhancements to dhcp_probe. diff --git a/net-analyzer/dhcp_probe/files/1.3.0/02_dhcp_probe.8.patch b/net-analyzer/dhcp_probe/files/1.3.0/02_dhcp_probe.8.patch new file mode 100644 index 000000000000..d9d3d5aa898a --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/02_dhcp_probe.8.patch @@ -0,0 +1,35 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 02_dhcp_probe.8.dpatch by Laurent Guignard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Change a syntax problem in groff file for hyphenation problem +## Note: +## Submitted to upstream programmer Irwin Tillman. +## This patch will be applied in the next version of the upstream code. + + +@DPATCH@ +diff -urNad trunk~/doc/dhcp_probe.8 trunk/doc/dhcp_probe.8 +--- trunk~/doc/dhcp_probe.8 2009-03-30 14:53:40.000000000 +0200 ++++ trunk/doc/dhcp_probe.8 2009-03-30 15:18:09.000000000 +0200 +@@ -380,15 +380,15 @@ + file, + that program is executed, with the following required options: + .nf +- -p the name of the calling program (e.g. dhcp_probe) +- -I the name of the interface on which the unexpected response packet was received +- -i the IP source address of the packet +- -m and the Ethernet source address of the packet ++ \-p the name of the calling program (e.g. dhcp_probe) ++ \-I the name of the interface on which the unexpected response packet was received ++ \-i the IP source address of the packet ++ \-m and the Ethernet source address of the packet + .fi + If the response packet's yiaddr is non-zero and falls within a "Lease Networks of Concern", + the following optional options are also passed: + .nf +- -y the non-zero yiaddr value ++ \-y the non-zero yiaddr value + .fi + (We do not wait for the + .I alert_program_name2 diff --git a/net-analyzer/dhcp_probe/files/1.3.0/03_implicit_point_conv_bootp.c.patch b/net-analyzer/dhcp_probe/files/1.3.0/03_implicit_point_conv_bootp.c.patch new file mode 100644 index 000000000000..41af750416bf --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/03_implicit_point_conv_bootp.c.patch @@ -0,0 +1,21 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 03_implicit_point_conv_bootp.c.dpatch by Laurent Guignard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: Fix implicit Pointer Converstion in bootp.c file. +## Fix bug #529635 discovered by Dann Frazier +## + +@DPATCH@ +diff -urNad trunk~/src/bootp.c trunk/src/bootp.c +--- trunk~/src/bootp.c 2009-03-31 14:19:06.000000000 +0200 ++++ trunk/src/bootp.c 2009-05-21 09:51:26.000000000 +0200 +@@ -11,7 +11,7 @@ + #include "bootp.h" + #include "configfile.h" + #include "report.h" +- ++#include "utils.h" + + + diff --git a/net-analyzer/dhcp_probe/files/1.3.0/04_linux_32_or_64bits.patch b/net-analyzer/dhcp_probe/files/1.3.0/04_linux_32_or_64bits.patch new file mode 100644 index 000000000000..dcd79ffc58b2 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/04_linux_32_or_64bits.patch @@ -0,0 +1,33 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 04_linux_32_or_64bits.dpatch by Laurent Guignard +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: A solution to solve the bug #535361 +## May be this will be a solution with the right method ??? + +@DPATCH@ +diff -urNad trunk~/src/get_myipaddr.c trunk/src/get_myipaddr.c +--- trunk~/src/get_myipaddr.c 2009-09-03 13:10:32.000000000 +0200 ++++ trunk/src/get_myipaddr.c 2009-09-03 13:15:39.671451172 +0200 +@@ -118,7 +118,21 @@ + #endif /* not STRUCT_SOCKADDR_HAS_SA_LEN */ + + /* increment ptr to next interface for next time through the loop */ ++#ifdef __ARCH__ /* Debian GNU/Linux behavior for packaging goal */ ++ switch(__ARCH__) { ++ case 32: /* 32 bits architectures */ ++ ptr += sizeof(ifr->ifr_name) + len; ++ break; ++ case 64: /* 64 bits architectures */ ++ ptr += sizeof(struct ifreq); ++ break; ++ default: /* Default dhcp_probe behavior */ ++ ptr += sizeof(ifr->ifr_name) + len; ++ break; ++ } ++#else /* Default dhcp_probe behavior */ + ptr += sizeof(ifr->ifr_name) + len; ++#endif + + if (strcmp(ifname, ifr->ifr_name) != 0 ) /* is this the interface we're looking for? */ + continue; diff --git a/net-analyzer/dhcp_probe/files/1.3.0/05-cleanup.patch b/net-analyzer/dhcp_probe/files/1.3.0/05-cleanup.patch new file mode 100644 index 000000000000..4151b461bbfd --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/05-cleanup.patch @@ -0,0 +1,29 @@ +--- dhcp_probe-1.3.0/src/dhcp_probe.c.orig 2009-03-09 21:17:47.000000000 +0100 ++++ dhcp_probe-1.3.0/src/dhcp_probe.c 2009-11-19 18:09:26.000000000 +0100 +@@ -84,7 +84,6 @@ + struct sigaction sa; + FILE *pid_fp; + char *cwd = CWD; +- int i; + + int write_packet_len; + int bytes_written; +@@ -98,9 +97,6 @@ + int linktype; + char pcap_errbuf[PCAP_ERRBUF_SIZE], pcap_errbuf2[PCAP_ERRBUF_SIZE]; + +- /* for libnet */ +- char libnet_errbuf[LIBNET_ERRBUF_SIZE]; +- + /* get progname = last component of argv[0] */ + prog = strrchr(argv[0], '/'); + if (prog) +@@ -987,8 +983,6 @@ + Must not be called until after initial configuration is complete. + */ + +- int i; +- + if (! read_configfile(config_file)) { + my_exit(1, 1, 1); + } diff --git a/net-analyzer/dhcp_probe/files/1.3.0/06-return.patch b/net-analyzer/dhcp_probe/files/1.3.0/06-return.patch new file mode 100644 index 000000000000..c27ad646e6c9 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/06-return.patch @@ -0,0 +1,11 @@ +--- dhcp_probe-1.3.0/src/dhcp_probe.c.orig 2009-11-19 18:13:31.000000000 +0100 ++++ dhcp_probe-1.3.0/src/dhcp_probe.c 2009-11-19 18:13:59.000000000 +0100 +@@ -684,6 +684,8 @@ + pcap_close(pd_template); + + my_exit(0, 1, 1); ++ ++ return 0; /* will not be reached */ + } + + diff --git a/net-analyzer/dhcp_probe/files/1.3.0/07-comment.patch b/net-analyzer/dhcp_probe/files/1.3.0/07-comment.patch new file mode 100644 index 000000000000..c8184144a597 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/07-comment.patch @@ -0,0 +1,11 @@ +--- dhcp_probe-1.3.0/src/configfile.c.orig 2009-03-09 21:17:47.000000000 +0100 ++++ dhcp_probe-1.3.0/src/configfile.c 2009-11-19 18:17:03.000000000 +0100 +@@ -55,7 +55,7 @@ + + /* parallel arrays of "lease networks of concern" (address & mask), and number of elems in arrays. + We also precompute a parallel array of 'addr & mask' to save computing these repeatedly later. +-/* If a response already identified as being from a rogue DHCP server contains a yiaddr field field ++ If a response already identified as being from a rogue DHCP server contains a yiaddr field field + that falls into one of these networks, it is reported as a matter of special concern. + */ + struct in_addr lease_networks_of_concern_addr[MAX_LEASE_NETWORKS_OF_CONCERN]; diff --git a/net-analyzer/dhcp_probe/files/1.3.0/08-man8.patch b/net-analyzer/dhcp_probe/files/1.3.0/08-man8.patch new file mode 100644 index 000000000000..56f8686eaebd --- /dev/null +++ b/net-analyzer/dhcp_probe/files/1.3.0/08-man8.patch @@ -0,0 +1,20 @@ +--- dhcp_probe-1.3.0/doc/dhcp_probe.8.orig 2009-11-19 18:27:47.000000000 +0100 ++++ dhcp_probe-1.3.0/doc/dhcp_probe.8 2009-11-19 18:28:50.000000000 +0100 +@@ -141,7 +141,7 @@ + libraries. + .SH OPTIONS + .TP +-.IB \-c \ config_file ++.BI \-c \ config_file + Specifies the configuration file. + If not specified, this defaults to + .BR /etc/dhcp_probe.cf . +@@ -253,7 +253,7 @@ + .B \-v + Display the program's version number, then exit. + .TP +-.IB \-w \ cwd ++.BI \-w \ cwd + Specifies the working directory; shortly after starting the + program changes its current working directory to this. + If not specified, this defaults to diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe.confd b/net-analyzer/dhcp_probe/files/dhcp_probe.confd new file mode 100644 index 000000000000..62652eac45d3 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/dhcp_probe.confd @@ -0,0 +1,9 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# Config file for /etc/init.d/dhcp_probe + +# For more information, see dhcp_probe(8). + +DHCP_PROBE_OPTIONS="-d 1" + diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe.initd b/net-analyzer/dhcp_probe/files/dhcp_probe.initd new file mode 100644 index 000000000000..24d09fbc7116 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/dhcp_probe.initd @@ -0,0 +1,47 @@ +#!/sbin/openrc-run +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +extra_commands="reload" + +DHCP_PROBE_BINARY="/usr/sbin/dhcp_probe" +DHCP_PROBE_CONFIG="/etc/dhcp_probe.cf" +DHCP_PROBE_PIDFILE="/var/run/${SVCNAME}.pid" +DHCP_PROBE_INTERFACE="${SVCNAME#*.}" + +depend() { + use logger + need net +} + +checkconfig() { + if [ ! -e ${DHCP_PROBE_CONFIG} ]; then + eerror "You need an ${DHCP_PROBE_CONFIG} to run dhcp_probe." + eerror "A sample file is available in /usr/share/doc/dhcp_probe*" + return 1 + elif [ ${SVCNAME} = dhcp_probe ]; then + eerror "Do not run this script directly! Instead, create symbolic links like so:" + eerror " # cd /etc/init.d" + eerror " # ln -s dhcp_probe dhcp_probe.[INTERFACE_NAME]" + eerror "for each interface that should be monitored" + return 1 + fi +} + +start() { + checkconfig + ebegin "Starting ${SVCNAME}" + ${DHCP_PROBE_BINARY} ${DHCP_PROBE_OPTIONS} -p ${DHCP_PROBE_PIDFILE} ${DHCP_PROBE_INTERFACE} + eend ${?} +} + +stop() { + if [ "${RC_CMD}" = "restart" ] ; then + checkconfig || return 1 + fi + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --signal 9 \ + --pidfile ${DHCP_PROBE_PIDFILE} + eend ${?} +} + diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe_mail b/net-analyzer/dhcp_probe/files/dhcp_probe_mail new file mode 100644 index 000000000000..58b07766bbb3 --- /dev/null +++ b/net-analyzer/dhcp_probe/files/dhcp_probe_mail @@ -0,0 +1,23 @@ +#!/bin/bash +# Old style alert program: +# +# Syntax: +# alert_program_name /absolute/path/name +# +# The program specified via 'alert_program_name' will be called as follows: +# /absolute/path/name name_of_calling_program name_of_interface_on_which_the +#_response_was_received IP_source_of_the_response ether_src_of_the_response + +DHCP_PROBE_DOMAIN=$(dnsdomainname) + +sendmail root < + + + + jer@gentoo.org + Jeroen Roovers + + + netmon@gentoo.org + Gentoo network monitoring and analysis project + + + dchp_probe attempts to discover DHCP and BootP servers on a + directly-attached Ethernet network + + -- cgit v1.2.3