patch-2.1.15 linux/net/ipv4/rarp.c
Next file: linux/net/ipv4/raw.c
Previous file: linux/net/ipv4/protocol.c
Back to the patch index
Back to the overall index
- Lines: 20
- Date:
Thu Dec 12 16:54:24 1996
- Orig file:
v2.1.14/linux/net/ipv4/rarp.c
- Orig date:
Tue Nov 19 15:54:01 1996
diff -u --recursive --new-file v2.1.14/linux/net/ipv4/rarp.c linux/net/ipv4/rarp.c
@@ -330,11 +330,14 @@
* Is it reachable directly ?
*/
- rt = ip_rt_route(ip, 0);
- if (rt == NULL)
- return -ENETUNREACH;
- dev = rt->rt_dev;
- ip_rt_put(rt);
+ err = ip_route_output(&rt, ip, 0, 1, NULL);
+ if (err)
+ return err;
+ if (rt->rt_flags&(RTF_LOCAL|RTF_BROADCAST|RTF_MULTICAST|RTF_NAT)) {
+ ip_rt_put(rt);
+ return -EINVAL;
+ }
+ dev = rt->u.dst.dev;
/*
* Is there an existing entry for this address? Find out...
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov