[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 <ramirose@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
f0b5a0dcf1
commit
cb7928a528
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user