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>
Šī revīzija ir iekļauta:
@@ -1104,15 +1104,12 @@ static inline int mini_cm_accelerated(struct nes_cm_core *cm_core,
|
||||
static int nes_addr_resolve_neigh(struct nes_vnic *nesvnic, u32 dst_ip, int arpindex)
|
||||
{
|
||||
struct rtable *rt;
|
||||
struct flowi fl;
|
||||
struct neighbour *neigh;
|
||||
int rc = arpindex;
|
||||
struct net_device *netdev;
|
||||
struct nes_adapter *nesadapter = nesvnic->nesdev->nesadapter;
|
||||
|
||||
memset(&fl, 0, sizeof fl);
|
||||
fl.nl_u.ip4_u.daddr = htonl(dst_ip);
|
||||
rt = ip_route_output_key(&init_net, &fl);
|
||||
rt = ip_route_output(&init_net, htonl(dst_ip), 0, 0, 0);
|
||||
if (IS_ERR(rt)) {
|
||||
printk(KERN_ERR "%s: ip_route_output_key failed for 0x%08X\n",
|
||||
__func__, dst_ip);
|
||||
|
Atsaukties uz šo jaunā problēmā
Block a user