diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/mrouted/Makefile | 32 | ||||
-rw-r--r-- | net/mrouted/distinfo | 4 | ||||
-rw-r--r-- | net/mrouted/files/patch-Makefile | 19 | ||||
-rw-r--r-- | net/mrouted/files/patch-cfparse.y | 178 | ||||
-rw-r--r-- | net/mrouted/files/patch-config.c | 173 | ||||
-rw-r--r-- | net/mrouted/files/patch-main.c | 38 | ||||
-rw-r--r-- | net/mrouted/pkg-descr | 2 |
7 files changed, 18 insertions, 428 deletions
diff --git a/net/mrouted/Makefile b/net/mrouted/Makefile index bb37fefba51b..5acaaa0df702 100644 --- a/net/mrouted/Makefile +++ b/net/mrouted/Makefile @@ -6,31 +6,27 @@ # PORTNAME= mrouted -PORTVERSION= 3.9 -PORTREVISION= 1 +PORTVERSION= 3.9.5 CATEGORIES= net -MASTER_SITES= ftp://ftp.research.att.com/pub/fenner/mrouted/ \ - http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/distfiles/ -DISTNAME= ${PORTNAME}-${PORTVERSION}beta3+IOS12 +MASTER_SITES= ftp://ftp.vmlinux.org/pub/People/jocke/mrouted/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= johans@FreeBSD.org COMMENT= Multicast routing daemon providing DVMRP for IPv4 USE_RC_SUBR= mrouted -BUILD_ENV+= CFLAGS="-O2 -fno-strict-aliasing -DRSRR -Dlog=logit" +USE_BZIP2= yes +USE_GMAKE= yes +MAKE_ARGS= sysconfdir=${PREFIX}/etc \ + mandir=${MAN8PREFIX}/man/man8 -MAN8= map-mbone.8 mrouted.8 mrinfo.8 +MAN8= map-mbone.8 mrouted.8 mrinfo.8 mtrace.8 +PORTDOCS= * -MROUTED_BINARIES= map-mbone mrouted mrinfo +PLIST_FILES= sbin/map-mbone sbin/mrouted sbin/mrinfo sbin/mtrace \ + etc/mrouted.conf -PLIST_FILES= sbin/map-mbone sbin/mrouted sbin/mrinfo - -do-install: -.for i in ${MROUTED_BINARIES} - ${INSTALL_PROGRAM} ${WRKSRC}/${i} ${PREFIX}/sbin/${i} -.endfor -.for i in ${MAN8} - ${INSTALL_MAN} ${WRKSRC}/${i} ${PREFIX}/man/man8 -.endfor +.ifdef NOPORTDOCS +MAKE_ARGS+= datadir=${WRKDIR}/doc +.endif .include <bsd.port.mk> diff --git a/net/mrouted/distinfo b/net/mrouted/distinfo index e427702bcc6e..6a0c5693fcfe 100644 --- a/net/mrouted/distinfo +++ b/net/mrouted/distinfo @@ -1,2 +1,2 @@ -SHA256 (mrouted-3.9beta3+IOS12.tar.gz) = fa9ad8150ca11044288162cf3056cca94ad737ee822b710994aa178eb0100908 -SIZE (mrouted-3.9beta3+IOS12.tar.gz) = 110167 +SHA256 (mrouted-3.9.5.tar.bz2) = 10f0204f3a420033df7b5dfe4cac96dfba58649cbd813d7c6e2253367601b147 +SIZE (mrouted-3.9.5.tar.bz2) = 112746 diff --git a/net/mrouted/files/patch-Makefile b/net/mrouted/files/patch-Makefile deleted file mode 100644 index 1a2bce163acd..000000000000 --- a/net/mrouted/files/patch-Makefile +++ /dev/null @@ -1,19 +0,0 @@ ---- Makefile.orig Sun Mar 1 03:09:11 1998 -+++ Makefile Thu Sep 28 22:11:44 2006 -@@ -24,12 +24,13 @@ - # - # Uncomment the following three lines if you want to use RSRR (Routing - # Support for Resource Reservations), currently used by RSVP. --#RSRRDEF= -DRSRR --#RSRRC= rsrr.c --#RSRRO= rsrr.o -+RSRRDEF= -DRSRR -+RSRRC= rsrr.c -+RSRRO= rsrr.o - # - LDFLAGS= - CFLAGS= -O ${MCAST_INCLUDE} ${SNMPDEF} ${RSRRDEF} ## SunOS, OSF1, FreeBSD, IRIX -+CFLAGS+= -O2 -fno-strict-aliasing -pipe -Dlog=logit - #CFLAGS= -O ${MCAST_INCLUDE} ${SNMPDEF} ${RSRRDEF} -DSYSV -DSUNOS5 ## Solaris 2.x - #LIB2=-lsocket -lnsl ## Solaris 2.x - #CFLAGS= -O ${MCAST_INCLUDE} ${SNMPDEF} ${RSRRDEF} -D__BSD_SOURCE -DRAW_INPUT_IS_RAW -DRAW_OUTPUT_IS_RAW -DIOCTL_OK_ON_RAW_SOCKET ## Linux diff --git a/net/mrouted/files/patch-cfparse.y b/net/mrouted/files/patch-cfparse.y deleted file mode 100644 index 91d4d8b5ced2..000000000000 --- a/net/mrouted/files/patch-cfparse.y +++ /dev/null @@ -1,178 +0,0 @@ ---- cfparse.y.orig 1998-03-01 07:48:58.000000000 +0600 -+++ cfparse.y 2008-03-30 20:52:40.000000000 +0700 -@@ -4,6 +4,7 @@ - * - * Written by Bill Fenner, NRL, 1994 - * -+ * $FreeBSD: /tmp/pcvs/ports/net/mrouted/files/Attic/patch-cfparse.y,v 1.1 2008-03-31 10:13:37 bms Exp $ - * cfparse.y,v 3.8.4.30 1998/03/01 01:48:58 fenner Exp - */ - #include <stdio.h> -@@ -14,17 +15,18 @@ - #endif - #include "defs.h" - #include <netdb.h> -+#include <ifaddrs.h> - - /* - * Local function declarations - */ --static void fatal __P((char *fmt, ...)); --static void warn __P((char *fmt, ...)); -+static void fatal __P((char *fmt, ...)) __printflike(1, 2); -+static void warn __P((char *fmt, ...)) __printflike(1, 2); - static void yyerror __P((char *s)); - static char * next_word __P((void)); - static int yylex __P((void)); - static u_int32 valid_if __P((char *s)); --static struct ifreq * ifconfaddr __P((struct ifconf *ifcp, u_int32 a)); -+static const char * ifconfaddr(u_int32_t a); - int yyparse __P((void)); - - static FILE *f; -@@ -34,9 +36,6 @@ - extern int cache_lifetime; - extern int prune_lifetime; - --/* imported from config.c, with slight memory leak */ --extern struct ifconf ifc; -- - int allow_black_holes = 0; - - static int lineno; -@@ -127,15 +126,14 @@ - } - ifmods - | TUNNEL interface addrname { -- -- struct ifreq *ifr; -+ const char *ifname; - struct ifreq ffr; - vifi_t vifi; - - order++; - -- ifr = ifconfaddr(&ifc, $2); -- if (ifr == 0) -+ ifname = ifconfaddr($2); -+ if (ifname == 0) - fatal("Tunnel local address %s is not mine", - inet_fmt($2, s1)); - -@@ -144,7 +142,7 @@ - fatal("Tunnel local address %s is a loopback address", - inet_fmt($2, s1)); - -- if (ifconfaddr(&ifc, $3) != 0) -+ if (ifconfaddr($3) != 0) - fatal("Tunnel remote address %s is one of mine", - inet_fmt($3, s1)); - -@@ -164,7 +162,7 @@ - if (numvifs == MAXVIFS) - fatal("too many vifs"); - -- strncpy(ffr.ifr_name, ifr->ifr_name, IFNAMSIZ); -+ strlcpy(ffr.ifr_name, ifname, sizeof(ffr.ifr_name)); - if (ioctl(udp_socket, SIOCGIFFLAGS, (char *)&ffr)<0) - fatal("ioctl SIOCGIFFLAGS on %s", ffr.ifr_name); - -@@ -175,7 +173,7 @@ - v->uv_lcl_addr = $2; - v->uv_rmt_addr = $3; - v->uv_dst_addr = $3; -- strncpy(v->uv_name, ffr.ifr_name, IFNAMSIZ); -+ strlcpy(v->uv_name, ffr.ifr_name, sizeof(v->uv_name)); - - if (!(ffr.ifr_flags & IFF_UP)) { - v->uv_flags |= VIFF_DOWN; -@@ -577,7 +575,8 @@ - addrname : ADDR { $$ = $1; } - | STRING { struct hostent *hp; - -- if ((hp = gethostbyname($1)) == NULL) -+ if ((hp = gethostbyname($1)) == NULL || -+ hp->h_length != sizeof($$)) - fatal("No such host %s", $1); - - if (hp->h_addr_list[1]) -@@ -655,7 +654,7 @@ - fatal(char *fmt, ...) - { - va_list ap; -- char buf[200]; -+ char buf[MAXHOSTNAMELEN + 100]; - - va_start(ap, fmt); - #else -@@ -666,11 +665,11 @@ - va_dcl - { - va_list ap; -- char buf[200]; -+ char buf[MAXHOSTNAMELEN + 100]; - - va_start(ap); - #endif -- vsprintf(buf, fmt, ap); -+ vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - - log(LOG_ERR,0,"%s: %s near line %d", configfilename, buf, lineno); -@@ -696,7 +695,7 @@ - - va_start(ap); - #endif -- vsprintf(buf, fmt, ap); -+ vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); - - log(LOG_WARNING,0,"%s: %s near line %d", configfilename, buf, lineno); -@@ -902,28 +901,24 @@ - return 0; - } - --static struct ifreq * --ifconfaddr(ifcp, a) -- struct ifconf *ifcp; -- u_int32 a; --{ -- int n; -- struct ifreq *ifrp = (struct ifreq *)ifcp->ifc_buf; -- struct ifreq *ifend = (struct ifreq *)((char *)ifrp + ifcp->ifc_len); -- -- while (ifrp < ifend) { -- if (ifrp->ifr_addr.sa_family == AF_INET && -- ((struct sockaddr_in *)&ifrp->ifr_addr)->sin_addr.s_addr == a) -- return (ifrp); --#ifdef HAVE_SA_LEN -- n = ifrp->ifr_addr.sa_len + sizeof(ifrp->ifr_name); -- if (n < sizeof(*ifrp)) -- ++ifrp; -- else -- ifrp = (struct ifreq *)((char *)ifrp + n); --#else -- ++ifrp; --#endif -+static const char * -+ifconfaddr(u_int32_t a) -+{ -+ static char ifname[IFNAMSIZ]; -+ struct ifaddrs *ifap, *ifa; -+ -+ if (getifaddrs(&ifap) != 0) -+ return (NULL); -+ -+ for (ifa = ifap; ifa; ifa = ifa->ifa_next) { -+ if (ifa->ifa_addr->sa_family == AF_INET && -+ ((struct sockaddr_in *)ifa->ifa_addr)->sin_addr.s_addr == a) { -+ strlcpy(ifname, ifa->ifa_name, sizeof(ifname)); -+ freeifaddrs(ifap); -+ return (ifname); -+ } - } -- return (0); -+ -+ freeifaddrs(ifap); -+ return (NULL); - } diff --git a/net/mrouted/files/patch-config.c b/net/mrouted/files/patch-config.c deleted file mode 100644 index adb2e21063a9..000000000000 --- a/net/mrouted/files/patch-config.c +++ /dev/null @@ -1,173 +0,0 @@ ---- config.c.orig 1998-01-06 07:57:41.000000000 +0600 -+++ config.c 2008-03-30 20:39:31.000000000 +0700 -@@ -10,15 +10,13 @@ - * config.c,v 3.8.4.10 1998/01/06 01:57:41 fenner Exp - */ - -- --#include "defs.h" -- - #ifndef lint --static char rcsid[] = "@(#) $Id: \ --config.c,v 3.8.4.10 1998/01/06 01:57:41 fenner Exp $"; --#endif -+static const char rcsid[] = -+ "$FreeBSD: /tmp/pcvs/ports/net/mrouted/files/Attic/patch-config.c,v 1.1 2008-03-31 10:13:37 bms Exp $"; -+#endif /* not lint */ - --struct ifconf ifc; -+#include "defs.h" -+#include <ifaddrs.h> - - /* - * Query the kernel to find network interfaces that are multicast-capable -@@ -27,94 +25,47 @@ - void - config_vifs_from_kernel() - { -- struct ifreq *ifrp, *ifend; -+ struct ifaddrs *ifa, *ifap; - register struct uvif *v; - register vifi_t vifi; -- int n; - u_int32 addr, mask, subnet; -- short flags; -- int num_ifreq = 32; -- -- ifc.ifc_len = num_ifreq * sizeof(struct ifreq); -- ifc.ifc_buf = malloc(ifc.ifc_len); -- while (ifc.ifc_buf) { -- if (ioctl(udp_socket, SIOCGIFCONF, (char *)&ifc) < 0) -- log(LOG_ERR, errno, "ioctl SIOCGIFCONF"); -- -- /* -- * If the buffer was large enough to hold all the addresses -- * then break out, otherwise increase the buffer size and -- * try again. -- * -- * The only way to know that we definitely had enough space -- * is to know that there was enough space for at least one -- * more struct ifreq. ??? -- */ -- if ((num_ifreq * sizeof(struct ifreq)) >= -- ifc.ifc_len + sizeof(struct ifreq)) -- break; -- -- num_ifreq *= 2; -- ifc.ifc_len = num_ifreq * sizeof(struct ifreq); -- ifc.ifc_buf = realloc(ifc.ifc_buf, ifc.ifc_len); -- } -- if (ifc.ifc_buf == NULL) -- log(LOG_ERR, 0, "config_vifs_from_kernel: ran out of memory"); -+ int flags; - -- ifrp = (struct ifreq *)ifc.ifc_buf; -- ifend = (struct ifreq *)(ifc.ifc_buf + ifc.ifc_len); -+ if (getifaddrs(&ifap) < 0) -+ log(LOG_ERR, errno, "getifaddrs"); - /* - * Loop through all of the interfaces. - */ -- for (; ifrp < ifend; ifrp = (struct ifreq *)((char *)ifrp + n)) { -- struct ifreq ifr; --#ifdef HAVE_SA_LEN -- n = ifrp->ifr_addr.sa_len + sizeof(ifrp->ifr_name); -- if (n < sizeof(*ifrp)) -- n = sizeof(*ifrp); --#else -- n = sizeof(*ifrp); --#endif -+ for (ifa = ifap; ifa; ifa = ifa->ifa_next) { - /* - * Ignore any interface for an address family other than IP. - */ -- if (ifrp->ifr_addr.sa_family != AF_INET) -+ if (ifa->ifa_addr->sa_family != AF_INET) - continue; - -- addr = ((struct sockaddr_in *)&ifrp->ifr_addr)->sin_addr.s_addr; -- -- /* -- * Need a template to preserve address info that is -- * used below to locate the next entry. (Otherwise, -- * SIOCGIFFLAGS stomps over it because the requests -- * are returned in a union.) -- */ -- bcopy(ifrp->ifr_name, ifr.ifr_name, sizeof(ifr.ifr_name)); -+ addr = ((struct sockaddr_in *)ifa->ifa_addr)->sin_addr.s_addr; - - /* - * Ignore loopback interfaces and interfaces that do not support - * multicast. - */ -- if (ioctl(udp_socket, SIOCGIFFLAGS, (char *)&ifr) < 0) -- log(LOG_ERR, errno, "ioctl SIOCGIFFLAGS for %s", ifr.ifr_name); -- flags = ifr.ifr_flags; -- if ((flags & (IFF_LOOPBACK|IFF_MULTICAST)) != IFF_MULTICAST) continue; -+ flags = ifa->ifa_flags; -+ if ((flags & (IFF_LOOPBACK|IFF_MULTICAST)) != IFF_MULTICAST) -+ continue; - - /* - * Ignore any interface whose address and mask do not define a - * valid subnet number, or whose address is of the form {subnet,0} - * or {subnet,-1}. - */ -- if (ioctl(udp_socket, SIOCGIFNETMASK, (char *)&ifr) < 0) -- log(LOG_ERR, errno, "ioctl SIOCGIFNETMASK for %s", ifr.ifr_name); -- mask = ((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr.s_addr; -+ mask = ((struct sockaddr_in *)ifa->ifa_netmask)->sin_addr.s_addr; - subnet = addr & mask; - if (!inet_valid_subnet(subnet, mask) || - addr == subnet || - addr == (subnet | ~mask)) { - log(LOG_WARNING, 0, - "ignoring %s, has invalid address (%s) and/or mask (%s)", -- ifr.ifr_name, inet_fmt(addr, s1), inet_fmt(mask, s2)); -+ ifa->ifa_name, inet_fmt(addr, s1), inet_fmt(mask, s2)); - continue; - } - -@@ -123,7 +74,7 @@ - * one already installed in the uvifs array. - */ - for (vifi = 0, v = uvifs; vifi < numvifs; ++vifi, ++v) { -- if (strcmp(v->uv_name, ifr.ifr_name) == 0) { -+ if (strcmp(v->uv_name, ifa->ifa_name) == 0) { - log(LOG_DEBUG, 0, "skipping %s (%s on subnet %s) (alias for vif#%u?)", - v->uv_name, inet_fmt(addr, s1), - inet_fmts(subnet, mask, s2), vifi); -@@ -132,7 +83,7 @@ - if ((addr & v->uv_subnetmask) == v->uv_subnet || - (v->uv_subnet & mask) == subnet) { - log(LOG_WARNING, 0, "ignoring %s, same subnet as %s", -- ifr.ifr_name, v->uv_name); -+ ifa->ifa_name, v->uv_name); - break; - } - } -@@ -142,7 +93,7 @@ - * If there is room in the uvifs array, install this interface. - */ - if (numvifs == MAXVIFS) { -- log(LOG_WARNING, 0, "too many vifs, ignoring %s", ifr.ifr_name); -+ log(LOG_WARNING, 0, "too many vifs, ignoring %s", ifa->ifa_name); - continue; - } - v = &uvifs[numvifs]; -@@ -151,7 +102,7 @@ - v->uv_subnet = subnet; - v->uv_subnetmask = mask; - v->uv_subnetbcast = subnet | ~mask; -- strncpy(v->uv_name, ifr.ifr_name, IFNAMSIZ); -+ strlcpy(v->uv_name, ifa->ifa_name, sizeof(v->uv_name)); - - if (flags & IFF_POINTOPOINT) - v->uv_flags |= VIFF_REXMIT_PRUNES; -@@ -171,4 +122,6 @@ - vifs_down = TRUE; - } - } -+ -+ freeifaddrs(ifap); - } diff --git a/net/mrouted/files/patch-main.c b/net/mrouted/files/patch-main.c deleted file mode 100644 index a45a764cb388..000000000000 --- a/net/mrouted/files/patch-main.c +++ /dev/null @@ -1,38 +0,0 @@ ---- main.c.orig Sun Mar 1 01:49:00 1998 -+++ main.c Thu Sep 28 21:44:08 2006 -@@ -934,6 +934,7 @@ - static char fmt[211] = "warning - "; - char *msg; - struct timeval now; -+ time_t now_sec; - struct tm *thyme; - #ifdef RINGBUFFER - static int ringbufinit = 0; -@@ -953,6 +954,7 @@ - char *msg; - char tbuf[20]; - struct timeval now; -+ time_t now_sec; - struct tm *thyme; - #ifdef RINGBUFFER - static int ringbufinit = 0; -@@ -979,7 +981,8 @@ - ringbufinit = 1; - } - gettimeofday(&now,NULL); -- thyme = localtime(&now.tv_sec); -+ now_sec = now.tv_sec; -+ thyme = localtime(&now_sec); - sprintf(logmsg[logmsgno++], "%02d:%02d:%02d.%03ld %s err %d", - thyme->tm_hour, thyme->tm_min, thyme->tm_sec, - now.tv_usec / 1000, msg, syserr); -@@ -992,7 +995,8 @@ - */ - if (haveterminal && (debug || severity <= LOG_WARNING)) { - gettimeofday(&now,NULL); -- thyme = localtime(&now.tv_sec); -+ now_sec = now.tv_sec; -+ thyme = localtime(&now_sec); - if (!debug) - fprintf(stderr, "%s: ", progname); - fprintf(stderr, "%02d:%02d:%02d.%03ld %s", thyme->tm_hour, diff --git a/net/mrouted/pkg-descr b/net/mrouted/pkg-descr index b51e70a9af3c..bf9dd577a138 100644 --- a/net/mrouted/pkg-descr +++ b/net/mrouted/pkg-descr @@ -1,3 +1,5 @@ mrouted is an implementation of the DVMRP multicast routing protocol. It turns a UNIX workstation into a DVMRP multicast router with tunnel support, in order to cross non-multicast-aware routers. + +WWW: http://troglobit.com/mrouted.shtml |