diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-12 00:00:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-12 18:08:42 -0500 |
commit | 78fbfd8a653ca972afe479517a40661bfff6d8c3 (patch) | |
tree | 9dccc5c16bf269d53d8499064ec95a998e84c646 /net/atm | |
parent | 1561747ddf9d28185548687b11aae7074d6129c4 (diff) |
ipv4: Create and use route lookup helpers.
The idea here is this minimizes the number of places one has to edit
in order to make changes to how flows are defined and used.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm')
-rw-r--r-- | net/atm/clip.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/atm/clip.c b/net/atm/clip.c index 810a1294eddb..1d4be60e1390 100644 --- a/net/atm/clip.c +++ b/net/atm/clip.c | |||
@@ -502,8 +502,6 @@ static int clip_setentry(struct atm_vcc *vcc, __be32 ip) | |||
502 | struct atmarp_entry *entry; | 502 | struct atmarp_entry *entry; |
503 | int error; | 503 | int error; |
504 | struct clip_vcc *clip_vcc; | 504 | struct clip_vcc *clip_vcc; |
505 | struct flowi fl = { .fl4_dst = ip, | ||
506 | .fl4_tos = 1 }; | ||
507 | struct rtable *rt; | 505 | struct rtable *rt; |
508 | 506 | ||
509 | if (vcc->push != clip_push) { | 507 | if (vcc->push != clip_push) { |
@@ -520,7 +518,7 @@ static int clip_setentry(struct atm_vcc *vcc, __be32 ip) | |||
520 | unlink_clip_vcc(clip_vcc); | 518 | unlink_clip_vcc(clip_vcc); |
521 | return 0; | 519 | return 0; |
522 | } | 520 | } |
523 | rt = ip_route_output_key(&init_net, &fl); | 521 | rt = ip_route_output(&init_net, ip, 0, 1, 0); |
524 | if (IS_ERR(rt)) | 522 | if (IS_ERR(rt)) |
525 | return PTR_ERR(rt); | 523 | return PTR_ERR(rt); |
526 | neigh = __neigh_lookup(&clip_tbl, &ip, rt->dst.dev, 1); | 524 | neigh = __neigh_lookup(&clip_tbl, &ip, rt->dst.dev, 1); |