Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cb7928a528264a69b29b6001b490b64607ed0557
Commit:     cb7928a528264a69b29b6001b490b64607ed0557
Parent:     f0b5a0dcf125ce43855961ef4f965a91112bea23
Author:     Rami Rosen <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 9 00:18:24 2008 -0800
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Mon Jan 28 15:01:07 2008 -0800

    [IPV4]: Remove unsupported DNAT (RTCF_NAT and RTCF_NAT) in IPV4
    
    - The DNAT (Destination NAT) is not implemented in IPV4.
    
    - This patch remove the code which checks these flags
    in net/ipv4/arp.c and net/ipv4/route.c.
    
    The RTCF_NAT and RTCF_NAT should stay in the header (linux/in_route.h)
    because they are used in DECnet.
    
    Signed-off-by: Rami Rosen <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 net/ipv4/arp.c   |    5 ++---
 net/ipv4/route.c |    4 ++--
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 9eb6d3a..46edf1c 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -835,9 +835,8 @@ static int arp_process(struct sk_buff *skb)
                        }
                        goto out;
                } else if (IN_DEV_FORWARD(in_dev)) {
-                       if ((rt->rt_flags&RTCF_DNAT) ||
-                           (addr_type == RTN_UNICAST  && rt->u.dst.dev != dev 
&&
-                            (arp_fwd_proxy(in_dev, rt) || 
pneigh_lookup(&arp_tbl, &init_net, &tip, dev, 0)))) {
+                           if (addr_type == RTN_UNICAST  && rt->u.dst.dev != 
dev &&
+                            (arp_fwd_proxy(in_dev, rt) || 
pneigh_lookup(&arp_tbl, &init_net, &tip, dev, 0))) {
                                n = neigh_event_ns(&arp_tbl, sha, &sip, dev);
                                if (n)
                                        neigh_release(n);
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index 933b093..78c4ce4 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1768,7 +1768,7 @@ static inline int __mkroute_input(struct sk_buff *skb,
        if (err)
                flags |= RTCF_DIRECTSRC;
 
-       if (out_dev == in_dev && err && !(flags & (RTCF_NAT | RTCF_MASQ)) &&
+       if (out_dev == in_dev && err && !(flags & RTCF_MASQ) &&
            (IN_DEV_SHARED_MEDIA(out_dev) ||
             inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res))))
                flags |= RTCF_DOREDIRECT;
@@ -1777,7 +1777,7 @@ static inline int __mkroute_input(struct sk_buff *skb,
                /* Not IP (i.e. ARP). Do not create route, if it is
                 * invalid for proxy arp. DNAT routes are always valid.
                 */
-               if (out_dev == in_dev && !(flags & RTCF_DNAT)) {
+               if (out_dev == in_dev) {
                        err = -EINVAL;
                        goto cleanup;
                }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to