patch-2.0.24 linux/net/ipv4/rarp.c
Next file: linux/net/ipv4/tcp_input.c
Previous file: linux/net/ipv4/ipmr.c
Back to the patch index
Back to the overall index
- Lines: 51
- Date:
Wed Oct 30 03:42:42 1996
- Orig file:
v2.0.23/linux/net/ipv4/rarp.c
- Orig date:
Mon Aug 5 10:13:55 1996
diff -u --recursive --new-file v2.0.23/linux/net/ipv4/rarp.c linux/net/ipv4/rarp.c
@@ -28,7 +28,7 @@
* Fixes
* Alan Cox : Rarp delete on device down needed as
* reported by Walter Wolfgang.
- *
+ * Lawrence V. Stefani : Added FDDI support.
*/
#include <linux/module.h>
@@ -204,13 +204,40 @@
/*
* If this test doesn't pass, it's not IP, or we should ignore it anyway
*/
-
+#ifdef CONFIG_FDDI
+ if (dev->type == ARPHRD_FDDI)
+ {
+ /*
+ * Since the dev->type for FDDI is "made up", compare the rarp->ar_hrd
+ * field against ARPHRD_ETHER and ARPHRD_IEEE802.
+ *
+ * Ought to move to a device specifc 'arp_type_ok()'
+ */
+ if (rarp->ar_hln != dev->addr_len
+ || ((ntohs(rarp->ar_hrd) != ARPHRD_ETHER) && (ntohs(rarp->ar_hrd) != ARPHRD_IEEE802))
+ || dev->flags&IFF_NOARP)
+ {
+ kfree_skb(skb, FREE_READ);
+ return 0;
+ }
+ }
+ else
+ {
+ if (rarp->ar_hln != dev->addr_len || dev->type != ntohs(rarp->ar_hrd)
+ || dev->flags&IFF_NOARP)
+ {
+ kfree_skb(skb, FREE_READ);
+ return 0;
+ }
+ }
+#else
if (rarp->ar_hln != dev->addr_len || dev->type != ntohs(rarp->ar_hrd)
|| dev->flags&IFF_NOARP)
{
kfree_skb(skb, FREE_READ);
return 0;
}
+#endif
/*
* If it's not a RARP request, delete it.
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov