Commit 3660019e authored by Adrian Bunk's avatar Adrian Bunk Committed by Herbert Xu

[IPV4]: Remove bogus ifdef mess in arp_process

The #ifdef's in arp_process() were not only a mess, they were also wrong 
in the CONFIG_NET_ETHERNET=n and (CONFIG_NETDEV_1000=y or 
CONFIG_NETDEV_10000=y) cases.

Since they are not required this patch removes them.

Also removed are some #ifdef's around #include's that caused compile 
errors after this change.
Signed-off-by: default avatarAdrian Bunk <bunk@kernel.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 2d4baff8
...@@ -111,12 +111,8 @@ ...@@ -111,12 +111,8 @@
#include <net/tcp.h> #include <net/tcp.h>
#include <net/sock.h> #include <net/sock.h>
#include <net/arp.h> #include <net/arp.h>
#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
#include <net/ax25.h> #include <net/ax25.h>
#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
#include <net/netrom.h> #include <net/netrom.h>
#endif
#endif
#if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE) #if defined(CONFIG_ATM_CLIP) || defined(CONFIG_ATM_CLIP_MODULE)
#include <net/atmclip.h> #include <net/atmclip.h>
struct neigh_table *clip_tbl_hook; struct neigh_table *clip_tbl_hook;
...@@ -731,20 +727,10 @@ static int arp_process(struct sk_buff *skb) ...@@ -731,20 +727,10 @@ static int arp_process(struct sk_buff *skb)
htons(dev_type) != arp->ar_hrd) htons(dev_type) != arp->ar_hrd)
goto out; goto out;
break; break;
#ifdef CONFIG_NET_ETHERNET
case ARPHRD_ETHER: case ARPHRD_ETHER:
#endif
#ifdef CONFIG_TR
case ARPHRD_IEEE802_TR: case ARPHRD_IEEE802_TR:
#endif
#ifdef CONFIG_FDDI
case ARPHRD_FDDI: case ARPHRD_FDDI:
#endif
#ifdef CONFIG_NET_FC
case ARPHRD_IEEE802: case ARPHRD_IEEE802:
#endif
#if defined(CONFIG_NET_ETHERNET) || defined(CONFIG_TR) || \
defined(CONFIG_FDDI) || defined(CONFIG_NET_FC)
/* /*
* ETHERNET, Token Ring and Fibre Channel (which are IEEE 802 * ETHERNET, Token Ring and Fibre Channel (which are IEEE 802
* devices, according to RFC 2625) devices will accept ARP * devices, according to RFC 2625) devices will accept ARP
...@@ -759,21 +745,16 @@ static int arp_process(struct sk_buff *skb) ...@@ -759,21 +745,16 @@ static int arp_process(struct sk_buff *skb)
arp->ar_pro != htons(ETH_P_IP)) arp->ar_pro != htons(ETH_P_IP))
goto out; goto out;
break; break;
#endif
#if defined(CONFIG_AX25) || defined(CONFIG_AX25_MODULE)
case ARPHRD_AX25: case ARPHRD_AX25:
if (arp->ar_pro != htons(AX25_P_IP) || if (arp->ar_pro != htons(AX25_P_IP) ||
arp->ar_hrd != htons(ARPHRD_AX25)) arp->ar_hrd != htons(ARPHRD_AX25))
goto out; goto out;
break; break;
#if defined(CONFIG_NETROM) || defined(CONFIG_NETROM_MODULE)
case ARPHRD_NETROM: case ARPHRD_NETROM:
if (arp->ar_pro != htons(AX25_P_IP) || if (arp->ar_pro != htons(AX25_P_IP) ||
arp->ar_hrd != htons(ARPHRD_NETROM)) arp->ar_hrd != htons(ARPHRD_NETROM))
goto out; goto out;
break; break;
#endif
#endif
} }
/* Understand only these message types */ /* Understand only these message types */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment