Skip to content

Commit

Permalink
ipv4: Remove all RTCF_DIRECTSRC handliing.
Browse files Browse the repository at this point in the history
The last and final kernel user, ICMP address replies,
has been removed.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jul 23, 2012
1 parent 838942a commit fe3edf4
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions net/ipv4/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -1391,9 +1391,6 @@ static int __mkroute_input(struct sk_buff *skb,
goto cleanup;
}

if (err)
flags |= RTCF_DIRECTSRC;

if (out_dev == in_dev && err &&
(IN_DEV_SHARED_MEDIA(out_dev) ||
inet_addr_onlink(out_dev, saddr, FIB_RES_GW(*res))))
Expand All @@ -1416,7 +1413,7 @@ static int __mkroute_input(struct sk_buff *skb,

do_cache = false;
if (res->fi) {
if (!(flags & RTCF_DIRECTSRC) && !itag) {
if (!itag) {
rth = FIB_RES_NH(*res).nh_rth_input;
if (rt_cache_valid(rth)) {
dst_hold(&rth->dst);
Expand Down Expand Up @@ -1558,8 +1555,6 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
dev, in_dev, &itag);
if (err < 0)
goto martian_source_keep_err;
if (err)
flags |= RTCF_DIRECTSRC;
goto local_input;
}

Expand All @@ -1580,8 +1575,6 @@ out: return err;
in_dev, &itag);
if (err < 0)
goto martian_source_keep_err;
if (err)
flags |= RTCF_DIRECTSRC;
}
flags |= RTCF_BROADCAST;
res.type = RTN_BROADCAST;
Expand All @@ -1590,7 +1583,7 @@ out: return err;
local_input:
do_cache = false;
if (res.fi) {
if (!(flags & RTCF_DIRECTSRC) && !itag) {
if (!itag) {
rth = FIB_RES_NH(res).nh_rth_input;
if (rt_cache_valid(rth)) {
dst_hold(&rth->dst);
Expand Down

0 comments on commit fe3edf4

Please sign in to comment.