summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbms <bms@FreeBSD.org>2007-02-08 23:05:08 +0000
committerbms <bms@FreeBSD.org>2007-02-08 23:05:08 +0000
commitecb2edb6fadd01c991a33952528592df43770714 (patch)
treec0a19bf8b23ad521b28f36604627b762ba43c384
parent51ca9a4740b35cb1d740ba5773a23fd1820e841f (diff)
downloadFreeBSD-src-ecb2edb6fadd01c991a33952528592df43770714.zip
FreeBSD-src-ecb2edb6fadd01c991a33952528592df43770714.tar.gz
Store the cached route in vifp in the normal send_packet() case.
The VIFF_TUNNEL case no longer exists, therefore this field is free to use, and its use eliminates a static data member.
-rw-r--r--sys/netinet/ip_mroute.c3
-rw-r--r--sys/netinet/ip_mroute.h2
2 files changed, 2 insertions, 3 deletions
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c
index aa42937..979509c 100644
--- a/sys/netinet/ip_mroute.c
+++ b/sys/netinet/ip_mroute.c
@@ -1749,7 +1749,6 @@ send_packet(struct vif *vifp, struct mbuf *m)
struct ip_moptions imo;
struct in_multi *imm[2];
int error;
- static struct route ro; /* XXX */
VIF_LOCK_ASSERT();
@@ -1767,7 +1766,7 @@ send_packet(struct vif *vifp, struct mbuf *m)
* should get rejected because they appear to come from
* the loopback interface, thus preventing looping.
*/
- error = ip_output(m, NULL, &ro, IP_FORWARDING, &imo, NULL);
+ error = ip_output(m, NULL, &vifp->v_route, IP_FORWARDING, &imo, NULL);
if (mrtdebug & DEBUG_XMIT) {
log(LOG_DEBUG, "phyint_send on vif %td err %d\n",
vifp - viftable, error);
diff --git a/sys/netinet/ip_mroute.h b/sys/netinet/ip_mroute.h
index f2530a8..c756d84 100644
--- a/sys/netinet/ip_mroute.h
+++ b/sys/netinet/ip_mroute.h
@@ -262,7 +262,7 @@ struct vif {
u_long v_pkt_out; /* # pkts out on interface */
u_long v_bytes_in; /* # bytes in on interface */
u_long v_bytes_out; /* # bytes out on interface */
- struct route v_route; /* cached route if this is a tunnel */
+ struct route v_route; /* cached route */
u_int v_rsvp_on; /* RSVP listening on this vif */
struct socket *v_rsvpd; /* RSVP daemon socket */
};
OpenPOWER on IntegriCloud