diff options
author | andre <andre@FreeBSD.org> | 2003-11-14 21:48:57 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2003-11-14 21:48:57 +0000 |
commit | 30ed90673d6eaf49ce19a209ecba7e6f2c45ce3e (patch) | |
tree | 27563081cd19963af766c97746f7b1b600e28e70 /sys/netinet/ip_fw2.c | |
parent | e83306cda93c90d2842e30a1bc92c5b1089d702b (diff) | |
download | FreeBSD-src-30ed90673d6eaf49ce19a209ecba7e6f2c45ce3e.zip FreeBSD-src-30ed90673d6eaf49ce19a209ecba7e6f2c45ce3e.tar.gz |
Remove the global one-level rtcache variable and associated
complex locking and rework ip_rtaddr() to do its own rtlookup.
Adopt all its callers to this and make ip_output() callable
with NULL rt pointer.
Reviewed by: sam (mentor)
Diffstat (limited to 'sys/netinet/ip_fw2.c')
-rw-r--r-- | sys/netinet/ip_fw2.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index e5960df..0767634 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -1160,7 +1160,6 @@ send_pkt(struct ipfw_flow_id *id, u_int32_t seq, u_int32_t ack, int flags) struct mbuf *m; struct ip *ip; struct tcphdr *tcp; - struct route sro; /* fake route */ MGETHDR(m, M_DONTWAIT, MT_HEADER); if (m == 0) @@ -1226,12 +1225,8 @@ send_pkt(struct ipfw_flow_id *id, u_int32_t seq, u_int32_t ack, int flags) */ ip->ip_ttl = ip_defttl; ip->ip_len = m->m_pkthdr.len; - bzero (&sro, sizeof (sro)); - ip_rtaddr(ip->ip_dst, &sro); m->m_flags |= M_SKIP_FIREWALL; - ip_output(m, NULL, &sro, 0, NULL, NULL); - if (sro.ro_rt) - RTFREE(sro.ro_rt); + ip_output(m, NULL, NULL, 0, NULL, NULL); } /* |