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.
This commit is contained in:
bms 2007-02-08 23:05:08 +00:00
parent 51ca9a4740
commit ecb2edb6fa
2 changed files with 2 additions and 3 deletions

View File

@ -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);

View File

@ -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 */
};