diff options
author | truckman <truckman@FreeBSD.org> | 2001-03-04 03:22:36 +0000 |
---|---|---|
committer | truckman <truckman@FreeBSD.org> | 2001-03-04 03:22:36 +0000 |
commit | e6aaaa86e747dbb30c826a8a40c976d336d709f6 (patch) | |
tree | 0d171aeef518bdb39b4f71c668c0755a6d9db9d6 /sys/netinet/ip_input.c | |
parent | e85d61bbf0bd1d90c6d1abd5e6552df4c0c3782c (diff) | |
download | FreeBSD-src-e6aaaa86e747dbb30c826a8a40c976d336d709f6.zip FreeBSD-src-e6aaaa86e747dbb30c826a8a40c976d336d709f6.tar.gz |
Disable interface checking for packets subject to "ipfw fwd".
Chris Johnson <cjohnson@palomine.net> tested this fix in -stable.
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r-- | sys/netinet/ip_input.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 985d34c..a90069c 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -515,7 +515,6 @@ pass: /* * Don't accept packets with a loopback destination address * unless they arrived via the loopback interface. - * XXX - should ip->ip_dst.s_addr be pkt_dst.s_addr? */ if ((ntohl(ip->ip_dst.s_addr) & IN_CLASSA_NET) == (IN_LOOPBACKNET << IN_CLASSA_NSHIFT) && @@ -531,10 +530,12 @@ pass: * Enable a consistency check between the destination address * and the arrival interface for a unicast packet (the RFC 1122 * strong ES model) if IP forwarding is disabled and the packet - * is not locally generated. + * is not locally generated and the packet is not subject to + * 'ipfw fwd'. */ checkif = ip_checkinterface && (ipforwarding == 0) && - ((m->m_pkthdr.rcvif->if_flags & IFF_LOOPBACK) == 0); + ((m->m_pkthdr.rcvif->if_flags & IFF_LOOPBACK) == 0) && + (ip_fw_fwd_addr == NULL); TAILQ_FOREACH(ia, &in_ifaddrhead, ia_link) { #define satosin(sa) ((struct sockaddr_in *)(sa)) |