diff options
author | wollman <wollman@FreeBSD.org> | 1995-03-16 16:25:55 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1995-03-16 16:25:55 +0000 |
commit | b6beceae27e1650af0e5a1ee94bb83a629d6530a (patch) | |
tree | d878fa17c7db5f8fb8d5da16fdf99ebdb6f5e3f4 /usr.sbin/mrouted/prune.c | |
parent | 965da3c27aad8b8260f2d9f4b1b580a4da6c1e04 (diff) | |
download | FreeBSD-src-b6beceae27e1650af0e5a1ee94bb83a629d6530a.zip FreeBSD-src-b6beceae27e1650af0e5a1ee94bb83a629d6530a.tar.gz |
This set of patches enables IP multicasting to work under FreeBSD. I am
submitting them as context diffs for the following files:
sys/netinet/ip_mroute.c
sys/netinet/ip_var.h
sys/netinet/raw_ip.c
usr.sbin/mrouted/igmp.c
usr.sbin/mrouted/prune.c
The routine rip_ip_input in raw_ip.c is suggested by Mark Tinguely
(tinguely@plains.nodak.edu). I have been running mrouted with these patches
for over a week and nothing has seemed seriously wrong. It is being run in
two places on our network as a tunnel on one and a subnet querier on the
other. The only problem I have run into is that mrouted on the tunnel must
start up last or the pruning isn't done correctly and multicast packets
flood your subnets.
Submitted by: Soochon Radee <slr@mitre.org>
Diffstat (limited to 'usr.sbin/mrouted/prune.c')
-rw-r--r-- | usr.sbin/mrouted/prune.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/usr.sbin/mrouted/prune.c b/usr.sbin/mrouted/prune.c index 04387a1..dfab604 100644 --- a/usr.sbin/mrouted/prune.c +++ b/usr.sbin/mrouted/prune.c @@ -7,7 +7,7 @@ * Leland Stanford Junior University. * * - * $Id: prune.c,v 1.4 1994/08/24 23:54:33 thyagara Exp $ + * $Id: prune.c,v 1.2 1994/09/08 02:51:23 wollman Exp $ */ @@ -530,7 +530,12 @@ void send_prune(kt) *p++ = ((char *)&(kt->kt_origin))[i]; for (i = 0; i < 4; i++) *p++ = ((char *)&(kt->kt_mcastgrp))[i]; +#if BYTE_ORDER == BIG_ENDIAN for (i = 0; i < 4; i++) +#endif +#if BYTE_ORDER == LITTLE_ENDIAN + for (i = 3; i >= 0; i--) +#endif *p++ = ((char *)&(kt->kt_prsent_timer))[i]; datalen += 12; @@ -589,7 +594,12 @@ void accept_prune(src, dst, p, datalen) ((char *)&prun_src)[i] = *p++; for (i = 0; i< 4; i++) ((char *)&prun_dst)[i] = *p++; +#if BYTE_ORDER == BIG_ENDIAN for (i = 0; i< 4; i++) +#endif +#if BYTE_ORDER == LITTLE_ENDIAN + for (i = 3; i >= 0; i--) +#endif ((char *)&prun_tmr)[i] = *p++; kt = find_src_grp(prun_src, prun_dst); @@ -1051,7 +1061,7 @@ void age_table_entry() krl; prev_krl = krl, krl = krl->rl_next) { if ((krl->rl_timer -= ROUTE_MAX_REPORT_DELAY) <= 0) { - log(LOG_DEBUG, 0, "forw again s %x g%x on vif %d", + log(LOG_DEBUG, 0, "forw again s %x g %x on vif %d", kt->kt_origin, kt->kt_mcastgrp, krl->rl_vifi); if (!VIFM_ISSET(krl->rl_vifi, kt->kt_grpmems)) { |