]>
Commit | Line | Data |
---|---|---|
2581e8f3 | 1 | diff -ur v2.5.50/linux/net/ipv4/arp.c linux/net/ipv4/arp.c |
2 | --- v2.5.50/linux/net/ipv4/arp.c Tue Nov 19 00:13:40 2002 | |
3 | +++ linux/net/ipv4/arp.c Sun Dec 1 18:19:47 2002 | |
4 | @@ -319,16 +319,21 @@ | |
5 | ||
6 | static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb) | |
7 | { | |
8 | + struct rtable *rt; | |
9 | u32 saddr; | |
10 | u8 *dst_ha = NULL; | |
11 | struct net_device *dev = neigh->dev; | |
12 | u32 target = *(u32*)neigh->primary_key; | |
13 | int probes = atomic_read(&neigh->probes); | |
14 | + struct flowi fl = { .nl_u = { .ip4_u = { .daddr = target } }, | |
15 | + .oif = dev->ifindex }; | |
16 | ||
17 | - if (skb && inet_addr_type(skb->nh.iph->saddr) == RTN_LOCAL) | |
18 | - saddr = skb->nh.iph->saddr; | |
19 | - else | |
20 | - saddr = inet_select_addr(dev, target, RT_SCOPE_LINK); | |
21 | + if (ip_route_output_key(&rt, &fl) < 0) | |
22 | + return; | |
23 | + saddr = rt->rt_src; | |
24 | + ip_rt_put(rt); | |
25 | + if (!saddr) | |
26 | + return; | |
27 | ||
28 | if ((probes -= neigh->parms->ucast_probes) < 0) { | |
29 | if (!(neigh->nud_state&NUD_VALID)) |