Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0ecde14 authored by David S. Miller's avatar David S. Miller
Browse files

net: Fix FDDI and TR config checks in ipv4 arp and LLC.



Need to check both CONFIG_FOO and CONFIG_FOO_MODULE

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bbd72543
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -661,13 +661,13 @@ struct sk_buff *arp_create(int type, int ptype, __be32 dest_ip,
#endif
#endif
#endif
#endif


#ifdef CONFIG_FDDI
#if defined(CONFIG_FDDI) || defined(CONFIG_FDDI_MODULE)
	case ARPHRD_FDDI:
	case ARPHRD_FDDI:
		arp->ar_hrd = htons(ARPHRD_ETHER);
		arp->ar_hrd = htons(ARPHRD_ETHER);
		arp->ar_pro = htons(ETH_P_IP);
		arp->ar_pro = htons(ETH_P_IP);
		break;
		break;
#endif
#endif
#ifdef CONFIG_TR
#if defined(CONFIG_TR) || defined(CONFIG_TR_MODULE)
	case ARPHRD_IEEE802_TR:
	case ARPHRD_IEEE802_TR:
		arp->ar_hrd = htons(ARPHRD_IEEE802);
		arp->ar_hrd = htons(ARPHRD_IEEE802);
		arp->ar_pro = htons(ETH_P_IP);
		arp->ar_pro = htons(ETH_P_IP);
@@ -1051,7 +1051,7 @@ static int arp_req_set(struct net *net, struct arpreq *r,
			return -EINVAL;
			return -EINVAL;
	}
	}
	switch (dev->type) {
	switch (dev->type) {
#ifdef CONFIG_FDDI
#if defined(CONFIG_FDDI) || defined(CONFIG_FDDI_MODULE)
	case ARPHRD_FDDI:
	case ARPHRD_FDDI:
		/*
		/*
		 * According to RFC 1390, FDDI devices should accept ARP
		 * According to RFC 1390, FDDI devices should accept ARP
+1 −1
Original line number Original line Diff line number Diff line
@@ -31,7 +31,7 @@ static int llc_mac_header_len(unsigned short devtype)
	case ARPHRD_ETHER:
	case ARPHRD_ETHER:
	case ARPHRD_LOOPBACK:
	case ARPHRD_LOOPBACK:
		return sizeof(struct ethhdr);
		return sizeof(struct ethhdr);
#ifdef CONFIG_TR
#if defined(CONFIG_TR) || defined(CONFIG_TR_MODULE)
	case ARPHRD_IEEE802_TR:
	case ARPHRD_IEEE802_TR:
		return sizeof(struct trh_hdr);
		return sizeof(struct trh_hdr);
#endif
#endif