From df903fee842e2ac0c8a81ce8d15337274b4e92c2 Mon Sep 17 00:00:00 2001 From: Andre Oppermann Date: Sat, 15 Nov 2003 17:03:37 +0000 Subject: [PATCH] Correct a cast to make it compile on 64bit platforms (noticed by tinderbox) and remove two unneccessary variable initializations. Make the introduction comment more clear with regard which parts of the packet are touched. Requested by: luigi --- sys/netinet/ip_fastfwd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c index 46cb504bf573..2b81b6af9746 100644 --- a/sys/netinet/ip_fastfwd.c +++ b/sys/netinet/ip_fastfwd.c @@ -36,8 +36,10 @@ * driver calls ip_fastforward, we do our routing table lookup and directly * send it off to the outgoing interface which DMAs the packet to the * network card. The only part of the packet we touch with the CPU is the - * IP header. We are essentially limited by bus bandwidth and how fast the - * network card/driver can set up receives and transmits. + * IP header (unless there are complex firewall rules touching other parts + * of the packet, but that is up to you). We are essentially limited by bus + * bandwidth and how fast the network card/driver can set up receives and + * transmits. * * We handle basic errors, ip header errors, checksum errors, * destination unreachable, fragmentation and fragmentation needed and @@ -344,7 +346,6 @@ ip_fastforward(struct mbuf *m) if (fw_enable && IPFW_LOADED) { bzero(&args, sizeof(args)); args.m = m; - ipfw = 0; ipfw = ip_fw_chk_ptr(&args); m = args.m; @@ -528,10 +529,9 @@ ip_fastforward(struct mbuf *m) dest = ip->ip_dst.s_addr; #endif if (fw_enable && IPFW_LOADED && !args.next_hop) { - bzero(&args, sizeof(args)); + bzero(&args, sizeof(args)); args.m = m; args.oif = ifp; - ipfw = 0; ipfw = ip_fw_chk_ptr(&args); m = args.m; @@ -567,7 +567,7 @@ ip_fastforward(struct mbuf *m) goto drop; } tag->m_flags = PACKET_TAG_DIVERT; - tag->m_data = (caddr_t)(u_int32_t)args.divert_rule; + tag->m_data = (caddr_t)(u_long)args.divert_rule; tag->m_next = m; /* XXX: really bloody hack, see ip_input */ tag->m_nextpkt = (struct mbuf *)1;