summaryrefslogtreecommitdiffstats
path: root/net/ipv4/arp.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-03-09 20:33:35 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-03-09 20:33:35 +0000
commit116674acc97ba75a720329996877077d988443a2 (patch)
tree6a3f2ff0b612ae2ee8a3f3509370c9e6333a53b3 /net/ipv4/arp.c
parent71118c319fcae4a138f16e35b4f7e0a6d53ce2ca (diff)
Merge with Linux 2.4.2.
Diffstat (limited to 'net/ipv4/arp.c')
-rw-r--r--net/ipv4/arp.c32
1 files changed, 21 insertions, 11 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 51592202a..c43892ea5 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -65,19 +65,9 @@
* clean up the APFDDI & gen. FDDI bits.
* Alexey Kuznetsov: new arp state machine;
* now it is in net/core/neighbour.c.
+ * Krzysztof Halasa: Added Frame Relay ARP support.
*/
-/* RFC1122 Status:
- 2.3.2.1 (ARP Cache Validation):
- MUST provide mechanism to flush stale cache entries (OK)
- SHOULD be able to configure cache timeout (OK)
- MUST throttle ARP retransmits (OK)
- 2.3.2.2 (ARP Packet Queue):
- SHOULD save at least one packet from each "conversation" with an
- unresolved IP address. (OK)
- 950727 -- MS
-*/
-
#include <linux/types.h>
#include <linux/string.h>
#include <linux/kernel.h>
@@ -647,6 +637,20 @@ int arp_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
goto out;
break;
#endif
+#ifdef CONFIG_NET_FC
+ case ARPHRD_IEEE802:
+ /*
+ * According to RFC 2625, Fibre Channel devices (which are IEEE
+ * 802 devices) should accept ARP hardware types of 6 (IEEE 802)
+ * and 1 (Ethernet).
+ */
+ if (arp->ar_hrd != __constant_htons(ARPHRD_ETHER) &&
+ arp->ar_hrd != __constant_htons(ARPHRD_IEEE802))
+ goto out;
+ if (arp->ar_pro != __constant_htons(ETH_P_IP))
+ goto out;
+ break;
+#endif
#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
case ARPHRD_AX25:
if (arp->ar_pro != __constant_htons(AX25_P_IP))
@@ -689,6 +693,12 @@ int arp_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
goto out;
/*
+ * Special case: We must set Frame Relay source Q.922 address
+ */
+ if (dev_type == ARPHRD_DLCI)
+ sha = dev->broadcast;
+
+/*
* Process entry. The idea here is we want to send a reply if it is a
* request for us or if it is a request for someone else that we hold
* a proxy for. We want to add an entry to our cache if it is a reply