Multicast is no longer optional.

This commit is contained in:
hpeyerl 1994-02-02 05:58:50 +00:00
parent 8faef0c310
commit d7038296be
17 changed files with 21 additions and 146 deletions

View File

@ -20,7 +20,7 @@
*/
/*
* $Id: if_ed.c,v 1.19 1994/02/01 17:22:22 ws Exp $
* $Id: if_ed.c,v 1.20 1994/02/02 06:14:54 hpeyerl Exp $
*/
/*
@ -997,9 +997,7 @@ ed_attach(isa_dev)
| IFF_ALTPHYS);
else
ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS);
#ifdef MULTICAST
ifp->if_flags |= IFF_MULTICAST;
#endif
/*
* Attach the interface
@ -1225,7 +1223,6 @@ ed_init(unit)
for (i = 0; i < ETHER_ADDR_LEN; ++i)
outb(sc->nic_addr + ED_P1_PAR0 + i, sc->arpcom.ac_enaddr[i]);
#ifdef MULTICAST
/* set up multicast addresses and filter modes */
if (sc != 0 && (ifp->if_flags & IFF_MULTICAST) != 0) {
u_long mcaf[2];
@ -1242,7 +1239,6 @@ ed_init(unit)
for (i = 0; i < 8; i++)
outb(sc->nic_addr + ED_P1_MAR0 + i, ((u_char *)mcaf)[i]);
}
#endif
/*
* Set Current Page pointer to next_packet (initialized above)
*/
@ -1289,9 +1285,7 @@ ed_init(unit)
for (j = 0; j < 8; j++)
outb(sc->nic_addr + ED_P1_MAR0 + j, 0xff);
}
#ifdef MULTICAST
i |= ED_RCR_AM;
#endif
}
outb(sc->nic_addr + ED_P0_RCR, i);
@ -1942,7 +1936,6 @@ ed_ioctl(ifp, command, data)
*/
break;
#ifdef MULTICAST
case SIOCADDMULTI:
case SIOCDELMULTI:
/*
@ -1962,7 +1955,6 @@ ed_ioctl(ifp, command, data)
error = 0;
}
break;
#endif
default:
error = EINVAL;
}
@ -2422,7 +2414,6 @@ ed_ring_to_mbuf(sc,src,dst,total_len)
return (m);
}
#ifdef MULTICAST
/*
* Compute crc for ethernet address
*/
@ -2480,5 +2471,3 @@ ds_getmcaf(sc, mcaf)
}
}
#endif
#endif

View File

@ -20,7 +20,7 @@
*/
/*
* $Id: if_ed.c,v 1.19 1994/02/01 17:22:22 ws Exp $
* $Id: if_ed.c,v 1.20 1994/02/02 06:14:54 hpeyerl Exp $
*/
/*
@ -997,9 +997,7 @@ ed_attach(isa_dev)
| IFF_ALTPHYS);
else
ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS);
#ifdef MULTICAST
ifp->if_flags |= IFF_MULTICAST;
#endif
/*
* Attach the interface
@ -1225,7 +1223,6 @@ ed_init(unit)
for (i = 0; i < ETHER_ADDR_LEN; ++i)
outb(sc->nic_addr + ED_P1_PAR0 + i, sc->arpcom.ac_enaddr[i]);
#ifdef MULTICAST
/* set up multicast addresses and filter modes */
if (sc != 0 && (ifp->if_flags & IFF_MULTICAST) != 0) {
u_long mcaf[2];
@ -1242,7 +1239,6 @@ ed_init(unit)
for (i = 0; i < 8; i++)
outb(sc->nic_addr + ED_P1_MAR0 + i, ((u_char *)mcaf)[i]);
}
#endif
/*
* Set Current Page pointer to next_packet (initialized above)
*/
@ -1289,9 +1285,7 @@ ed_init(unit)
for (j = 0; j < 8; j++)
outb(sc->nic_addr + ED_P1_MAR0 + j, 0xff);
}
#ifdef MULTICAST
i |= ED_RCR_AM;
#endif
}
outb(sc->nic_addr + ED_P0_RCR, i);
@ -1942,7 +1936,6 @@ ed_ioctl(ifp, command, data)
*/
break;
#ifdef MULTICAST
case SIOCADDMULTI:
case SIOCDELMULTI:
/*
@ -1962,7 +1955,6 @@ ed_ioctl(ifp, command, data)
error = 0;
}
break;
#endif
default:
error = EINVAL;
}
@ -2422,7 +2414,6 @@ ed_ring_to_mbuf(sc,src,dst,total_len)
return (m);
}
#ifdef MULTICAST
/*
* Compute crc for ethernet address
*/
@ -2480,5 +2471,3 @@ ds_getmcaf(sc, mcaf)
}
}
#endif
#endif

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)if_ether.h 7.5 (Berkeley) 6/28/90
* $Id: if_ether.h,v 1.7 1994/01/08 21:21:31 mycroft Exp $
* $Id: if_ether.h,v 1.8 1994/02/02 05:58:54 hpeyerl Exp $
*/
#ifndef _NETINET_IF_ETHER_H_
@ -120,10 +120,8 @@ struct arpcom {
struct ifnet ac_if; /* network-visible interface */
u_char ac_enaddr[6]; /* ethernet hardware address */
struct in_addr ac_ipaddr; /* copy of ip address- XXX */
#ifdef MULTICAST
struct ether_multi *ac_multiaddrs; /* list of ether multicast addrs */
int ac_multicnt; /* length of ac_multiaddrs list */
#endif
};
/*
@ -139,18 +137,12 @@ struct arptab {
#ifdef KERNEL
u_char etherbroadcastaddr[6];
#if defined(ISO) && !defined(MULTICAST)
#define MULTICAST 1
#endif
#ifdef MULTICAST
u_char ether_ipmulticast_min[6];
u_char ether_ipmulticast_max[6];
#endif
struct arptab *arptnew();
int ether_output(), ether_input();
char *ether_sprintf();
#ifdef MULTICAST
/*
* Ethernet multicast address structure. There is one of these for each
* multicast address or range of multicast addresses that we are supposed
@ -217,6 +209,5 @@ struct ether_multistep {
ETHER_NEXT_MULTI((step), (enm)); \
}
#endif
#endif
#endif /* !_NETINET_IF_ETHER_H_ */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)if_ether.c 7.13 (Berkeley) 10/31/90
* $Id: if_arp.c,v 1.7 1994/01/23 23:42:50 deraadt Exp $
* $Id: if_arp.c,v 1.8 1994/02/02 05:58:50 hpeyerl Exp $
*/
/*
@ -194,12 +194,10 @@ arpresolve(ac, m, destip, desten, usetrailers)
sizeof(etherbroadcastaddr));
return (1);
}
#ifdef MULTICAST
if (m->m_flags & M_MCAST) { /* multicast */
ETHER_MAP_IP_MULTICAST(destip, desten);
return(1);
}
#endif
lna = in_lnaof(*destip);
/* if for us, use software loopback driver if up */
for (ia = in_ifaddr; ia; ia = ia->ia_next)

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)if_ether.h 7.5 (Berkeley) 6/28/90
* $Id: if_arp.h,v 1.7 1994/01/08 21:21:31 mycroft Exp $
* $Id: if_arp.h,v 1.8 1994/02/02 05:58:54 hpeyerl Exp $
*/
#ifndef _NETINET_IF_ETHER_H_
@ -120,10 +120,8 @@ struct arpcom {
struct ifnet ac_if; /* network-visible interface */
u_char ac_enaddr[6]; /* ethernet hardware address */
struct in_addr ac_ipaddr; /* copy of ip address- XXX */
#ifdef MULTICAST
struct ether_multi *ac_multiaddrs; /* list of ether multicast addrs */
int ac_multicnt; /* length of ac_multiaddrs list */
#endif
};
/*
@ -139,18 +137,12 @@ struct arptab {
#ifdef KERNEL
u_char etherbroadcastaddr[6];
#if defined(ISO) && !defined(MULTICAST)
#define MULTICAST 1
#endif
#ifdef MULTICAST
u_char ether_ipmulticast_min[6];
u_char ether_ipmulticast_max[6];
#endif
struct arptab *arptnew();
int ether_output(), ether_input();
char *ether_sprintf();
#ifdef MULTICAST
/*
* Ethernet multicast address structure. There is one of these for each
* multicast address or range of multicast addresses that we are supposed
@ -217,6 +209,5 @@ struct ether_multistep {
ETHER_NEXT_MULTI((step), (enm)); \
}
#endif
#endif
#endif /* !_NETINET_IF_ETHER_H_ */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)if_ether.c 7.13 (Berkeley) 10/31/90
* $Id: if_ether.c,v 1.7 1994/01/23 23:42:50 deraadt Exp $
* $Id: if_ether.c,v 1.8 1994/02/02 05:58:50 hpeyerl Exp $
*/
/*
@ -194,12 +194,10 @@ arpresolve(ac, m, destip, desten, usetrailers)
sizeof(etherbroadcastaddr));
return (1);
}
#ifdef MULTICAST
if (m->m_flags & M_MCAST) { /* multicast */
ETHER_MAP_IP_MULTICAST(destip, desten);
return(1);
}
#endif
lna = in_lnaof(*destip);
/* if for us, use software loopback driver if up */
for (ia = in_ifaddr; ia; ia = ia->ia_next)

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)if_ether.h 7.5 (Berkeley) 6/28/90
* $Id: if_ether.h,v 1.7 1994/01/08 21:21:31 mycroft Exp $
* $Id: if_ether.h,v 1.8 1994/02/02 05:58:54 hpeyerl Exp $
*/
#ifndef _NETINET_IF_ETHER_H_
@ -120,10 +120,8 @@ struct arpcom {
struct ifnet ac_if; /* network-visible interface */
u_char ac_enaddr[6]; /* ethernet hardware address */
struct in_addr ac_ipaddr; /* copy of ip address- XXX */
#ifdef MULTICAST
struct ether_multi *ac_multiaddrs; /* list of ether multicast addrs */
int ac_multicnt; /* length of ac_multiaddrs list */
#endif
};
/*
@ -139,18 +137,12 @@ struct arptab {
#ifdef KERNEL
u_char etherbroadcastaddr[6];
#if defined(ISO) && !defined(MULTICAST)
#define MULTICAST 1
#endif
#ifdef MULTICAST
u_char ether_ipmulticast_min[6];
u_char ether_ipmulticast_max[6];
#endif
struct arptab *arptnew();
int ether_output(), ether_input();
char *ether_sprintf();
#ifdef MULTICAST
/*
* Ethernet multicast address structure. There is one of these for each
* multicast address or range of multicast addresses that we are supposed
@ -217,6 +209,5 @@ struct ether_multistep {
ETHER_NEXT_MULTI((step), (enm)); \
}
#endif
#endif
#endif /* !_NETINET_IF_ETHER_H_ */

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)if_ether.h 7.5 (Berkeley) 6/28/90
* $Id: if_inarp.h,v 1.7 1994/01/08 21:21:31 mycroft Exp $
* $Id: if_inarp.h,v 1.8 1994/02/02 05:58:54 hpeyerl Exp $
*/
#ifndef _NETINET_IF_ETHER_H_
@ -120,10 +120,8 @@ struct arpcom {
struct ifnet ac_if; /* network-visible interface */
u_char ac_enaddr[6]; /* ethernet hardware address */
struct in_addr ac_ipaddr; /* copy of ip address- XXX */
#ifdef MULTICAST
struct ether_multi *ac_multiaddrs; /* list of ether multicast addrs */
int ac_multicnt; /* length of ac_multiaddrs list */
#endif
};
/*
@ -139,18 +137,12 @@ struct arptab {
#ifdef KERNEL
u_char etherbroadcastaddr[6];
#if defined(ISO) && !defined(MULTICAST)
#define MULTICAST 1
#endif
#ifdef MULTICAST
u_char ether_ipmulticast_min[6];
u_char ether_ipmulticast_max[6];
#endif
struct arptab *arptnew();
int ether_output(), ether_input();
char *ether_sprintf();
#ifdef MULTICAST
/*
* Ethernet multicast address structure. There is one of these for each
* multicast address or range of multicast addresses that we are supposed
@ -217,6 +209,5 @@ struct ether_multistep {
ETHER_NEXT_MULTI((step), (enm)); \
}
#endif
#endif
#endif /* !_NETINET_IF_ETHER_H_ */

View File

@ -39,7 +39,6 @@
/* Internet Group Management Protocol (IGMP) routines. */
#ifdef MULTICAST
#include <sys/param.h>
#include <sys/mbuf.h>
@ -317,4 +316,3 @@ igmp_sendreport(inm)
++igmpstat.igps_snd_reports;
}
#endif

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)in.c 7.17 (Berkeley) 4/20/91
* $Id: in.c,v 1.8 1994/01/09 01:06:05 mycroft Exp $
* $Id: in.c,v 1.9 1994/02/02 05:59:13 hpeyerl Exp $
*/
#include <sys/param.h>
@ -94,10 +94,8 @@ in_netof(in)
net = i & IN_CLASSA_NET;
else if (IN_CLASSB(i))
net = i & IN_CLASSB_NET;
#ifdef MULTICAST
else if (IN_CLASSD(i))
net = i & IN_CLASSD_NET;
#endif
else if (IN_CLASSC(i))
net = i & IN_CLASSC_NET;
else
@ -181,11 +179,9 @@ in_lnaof(in)
} else if (IN_CLASSC(i)) {
net = i & IN_CLASSC_NET;
host = i & IN_CLASSC_HOST;
#ifdef MULTICAST
} else if (IN_CLASSD(i)) {
net = i & IN_CLASSD_NET;
host = i & IN_CLASSD_HOST;
#endif
} else
return (i);
@ -571,7 +567,6 @@ in_ifinit(ifp, ia, sin, scrub)
}
if ((error = rtinit(&(ia->ia_ifa), (int)RTM_ADD, flags)) == 0)
ia->ia_flags |= IFA_ROUTE;
#ifdef MULTICAST
/*
* If the interface supports multicast, join the "all hosts"
* multicast group on that interface.
@ -582,7 +577,6 @@ in_ifinit(ifp, ia, sin, scrub)
addr.s_addr = htonl(INADDR_ALLHOSTS_GROUP);
in_addmulti(&addr, ifp);
}
#endif
return (error);
}
@ -630,7 +624,6 @@ in_broadcast(in)
return (0);
}
#ifdef MULTICAST
/*
* Add an address to the list of IP multicast addresses for a given interface.
*/
@ -738,4 +731,3 @@ in_delmulti(inm)
splx(s);
}
#endif
#endif

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)in_pcb.c 7.14 (Berkeley) 4/20/91
* $Id: in_pcb.c,v 1.8 1994/01/08 21:21:40 mycroft Exp $
* $Id: in_pcb.c,v 1.9 1994/02/02 05:58:59 hpeyerl Exp $
*/
#include <sys/param.h>
@ -51,9 +51,7 @@
#include <netinet/ip.h>
#include <netinet/in_pcb.h>
#include <netinet/in_var.h>
#ifdef MULTICAST
#include <netinet/ip_var.h>
#endif
struct in_addr zeroin_addr;
@ -220,7 +218,6 @@ in_pcbconnect(inp, nam)
if (ia == 0)
return (EADDRNOTAVAIL);
}
#ifdef MULTICAST
/*
* If the destination address is multicast and an outgoing
* interface has been set as a multicast option, use the
@ -241,7 +238,6 @@ in_pcbconnect(inp, nam)
return (EADDRNOTAVAIL);
}
}
#endif
ifaddr = (struct sockaddr_in *)&ia->ia_addr;
}
if (in_pcblookup(inp->inp_head,
@ -282,9 +278,7 @@ in_pcbdetach(inp)
(void)m_free(inp->inp_options);
if (inp->inp_route.ro_rt)
rtfree(inp->inp_route.ro_rt);
#ifdef MULTICAST
ip_freemoptions(inp->inp_moptions);
#endif
remque(inp);
(void) m_free(dtom(inp));
}

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)in_proto.c 7.5 (Berkeley) 6/28/90
* $Id: in_proto.c,v 1.6 1994/01/08 21:21:42 mycroft Exp $
* $Id: in_proto.c,v 1.7 1994/02/02 05:59:00 hpeyerl Exp $
*/
#include <sys/param.h>
@ -49,9 +49,7 @@
int ip_output(),ip_ctloutput();
int ip_init(),ip_slowtimo(),ip_drain();
int icmp_input();
#ifdef MULTICAST
int igmp_init(), igmp_input(), igmp_fasttimo();
#endif
int udp_input(),udp_ctlinput();
int udp_usrreq();
int udp_init();
@ -124,13 +122,11 @@ struct protosw inetsw[] = {
eonprotoinit, 0, 0, 0,
},
#endif
#ifdef MULTICAST
{ SOCK_RAW, &inetdomain, IPPROTO_IGMP, PR_ATOMIC|PR_ADDR,
igmp_input, rip_output, 0, rip_ctloutput,
rip_usrreq,
igmp_init, igmp_fasttimo, 0, 0,
},
#endif
#ifdef NSIP
{ SOCK_RAW, &inetdomain, IPPROTO_IDP, PR_ATOMIC|PR_ADDR,
idpip_input, rip_output, nsip_ctlinput, 0,

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)ip_icmp.c 7.15 (Berkeley) 4/20/91
* $Id: ip_icmp.c,v 1.7 1994/01/10 20:14:18 mycroft Exp $
* $Id: ip_icmp.c,v 1.8 1994/02/02 05:59:02 hpeyerl Exp $
*/
#include <sys/param.h>
@ -100,11 +100,9 @@ icmp_error(n, type, code, dest)
icmpstat.icps_oldicmp++;
goto freeit;
}
#ifdef MULTICAST
/* Don't send error in response to a multicast or broadcast packet */
if (n->m_flags & (M_MCAST | M_BCAST))
goto freeit;
#endif
/*
* First, formulate icmp message
*/

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)ip_input.c 7.19 (Berkeley) 5/25/91
* $Id: ip_input.c,v 1.10 1994/01/29 11:58:01 brezak Exp $
* $Id: ip_input.c,v 1.11 1994/02/02 05:59:04 hpeyerl Exp $
*/
#include <sys/param.h>
@ -273,7 +273,6 @@ next:
goto ours;
}
}
#ifdef MULTICAST
if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
struct in_multi *inm;
#ifdef MROUTING
@ -327,7 +326,6 @@ next:
}
goto ours;
}
#endif
if (ip->ip_dst.s_addr == (u_long)INADDR_BROADCAST)
goto ours;
if (ip->ip_dst.s_addr == INADDR_ANY)

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)ip_output.c 7.23 (Berkeley) 11/12/90
* $Id: ip_output.c,v 1.16 1994/01/19 21:36:56 brezak Exp $
* $Id: ip_output.c,v 1.17 1994/02/02 05:59:06 hpeyerl Exp $
*/
#include <sys/param.h>
@ -155,7 +155,6 @@ ip_output(m0, opt, ro, flags, imo)
if (ro->ro_rt->rt_flags & RTF_GATEWAY)
dst = (struct sockaddr_in *)ro->ro_rt->rt_gateway;
}
#ifdef MULTICAST
if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) {
struct in_multi *inm;
extern struct ifnet loif;
@ -245,7 +244,6 @@ ip_output(m0, opt, ro, flags, imo)
goto sendit;
}
#endif
#ifndef notdef
/*
* If source address not specified yet, use address
@ -286,9 +284,7 @@ ip_output(m0, opt, ro, flags, imo)
}
m->m_flags |= M_BCAST;
}
#ifdef MULTICAST
sendit:
#endif
/*
* If small enough for interface, can just send directly.
@ -543,7 +539,6 @@ ip_ctloutput(op, so, level, optname, mp)
}
break;
#undef OPTSET
#ifdef MULTICAST
case IP_MULTICAST_IF:
case IP_MULTICAST_TTL:
case IP_MULTICAST_LOOP:
@ -551,7 +546,6 @@ ip_ctloutput(op, so, level, optname, mp)
case IP_DROP_MEMBERSHIP:
error = ip_setmoptions(optname, &inp->inp_moptions, m);
break;
#endif
default:
error = EINVAL;
@ -607,7 +601,6 @@ ip_ctloutput(op, so, level, optname, mp)
}
*mtod(m, int *) = optval;
break;
#ifdef MULTICAST
case IP_MULTICAST_IF:
case IP_MULTICAST_TTL:
case IP_MULTICAST_LOOP:
@ -615,7 +608,6 @@ ip_ctloutput(op, so, level, optname, mp)
case IP_DROP_MEMBERSHIP:
error = ip_getmoptions(optname, inp->inp_moptions, mp);
break;
#endif
default:
error = EINVAL;
@ -733,7 +725,6 @@ bad:
return (EINVAL);
}
#ifdef MULTICAST
/*
* Set the IP multicast options in response to user setsockopt().
*/
@ -1067,4 +1058,3 @@ ip_mloopback(ifp, m, dst)
(void) looutput(ifp, copym, (struct sockaddr *)dst, 0);
}
}
#endif

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)raw_ip.c 7.8 (Berkeley) 7/25/90
* $Id: raw_ip.c,v 1.10 1994/01/10 20:14:28 mycroft Exp $
* $Id: raw_ip.c,v 1.11 1994/02/02 05:59:08 hpeyerl Exp $
*/
#include <sys/param.h>
@ -124,12 +124,7 @@ rip_output(m, so)
}
return (ip_output(m, opts, &rp->rinp_route,
(so->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST
#ifdef MULTICAST
, rp->rinp_rcb.rcb_moptions
#else
, NULL
#endif
));
, rp->rinp_rcb.rcb_moptions ));
}
/*
@ -165,7 +160,6 @@ rip_ctloutput(op, so, level, optname, m)
else
rp->rinp_flags &= ~RINPF_HDRINCL;
break;
#ifdef MULTICAST
case IP_MULTICAST_IF:
case IP_MULTICAST_TTL:
case IP_MULTICAST_LOOP:
@ -181,11 +175,6 @@ rip_ctloutput(op, so, level, optname, m)
error = EINVAL;
#endif
break;
#else
default:
error = EINVAL;
break;
#endif
}
break;
@ -206,7 +195,6 @@ rip_ctloutput(op, so, level, optname, m)
(*m)->m_len = sizeof (int);
*mtod(*m, int *) = rp->rinp_flags & RINPF_HDRINCL;
break;
#ifdef MULTICAST
case IP_MULTICAST_IF:
case IP_MULTICAST_TTL:
case IP_MULTICAST_LOOP:
@ -215,7 +203,6 @@ rip_ctloutput(op, so, level, optname, m)
error = ip_getmoptions(optname,
rp->rinp_rcb.rcb_moptions, m);
break;
#endif
default:
error = EINVAL;
m_freem(*m);
@ -238,7 +225,7 @@ rip_usrreq(so, req, m, nam, control)
{
register int error = 0;
register struct raw_inpcb *rp = sotorawinpcb(so);
#if defined(MULTICAST) && defined(MROUTING)
#if defined(MROUTING)
extern struct socket *ip_mrouter;
#endif
switch (req) {
@ -256,16 +243,14 @@ rip_usrreq(so, req, m, nam, control)
case PRU_DETACH:
if (rp == 0)
panic("rip_detach");
#if defined(MULTICAST) && defined(MROUTING)
#if defined(MROUTING)
if (so == ip_mrouter)
ip_mrouter_done();
#endif
if (rp->rinp_options)
m_freem(rp->rinp_options);
#ifdef MULTICAST
if (rp->rinp_rcb.rcb_moptions)
ip_freemoptions(rp->rinp_rcb.rcb_moptions);
#endif
if (rp->rinp_route.ro_rt)
RTFREE(rp->rinp_route.ro_rt);
if (rp->rinp_rcb.rcb_laddr)

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)udp_usrreq.c 7.20 (Berkeley) 4/20/91
* $Id: udp_usrreq.c,v 1.10 1994/01/10 20:14:34 mycroft Exp $
* $Id: udp_usrreq.c,v 1.11 1994/02/02 05:59:10 hpeyerl Exp $
*/
#include <sys/param.h>
@ -151,7 +151,6 @@ udp_input(m, iphlen)
return;
}
}
#ifdef MULTICAST
if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) ||
in_broadcast(ip->ip_dst)) {
struct socket *last;
@ -236,7 +235,6 @@ udp_input(m, iphlen)
sorwakeup(last);
return;
}
#endif
/*
* Locate pcb for datagram.
*/
@ -254,13 +252,6 @@ udp_input(m, iphlen)
if (inp == 0) {
/* don't send ICMP response for broadcast packet */
udpstat.udps_noport++;
#ifndef MULTICAST
/* XXX why don't we do this with MULTICAST? */
if (m->m_flags & (M_BCAST | M_MCAST)) {
udpstat.udps_noportbcast++;
goto bad;
}
#endif
*ip = save_ip;
ip->ip_len += iphlen;
{
@ -449,12 +440,7 @@ udp_output(inp, m, addr, control)
udpstat.udps_opackets++;
error = ip_output(m, inp->inp_options, &inp->inp_route,
inp->inp_socket->so_options & (SO_DONTROUTE | SO_BROADCAST)
#ifdef MULTICAST
, inp->inp_moptions
#else
, NULL
#endif
);
, inp->inp_moptions );
if (addr) {
in_pcbdisconnect(inp);