From 0fa5aacd8b3114a23ad18e09a3c7936ebe6d238c Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Sat, 2 May 2015 20:31:27 +0000 Subject: [PATCH] Remove #ifdef IFT_FOO. Submitted by: Guy Yur --- sys/netinet6/in6.c | 9 --------- sys/netinet6/in6_ifattach.c | 4 ---- sys/netinet6/nd6.c | 8 -------- sys/netinet6/nd6_nbr.c | 6 ------ usr.sbin/rtsold/if.c | 4 ---- 5 files changed, 31 deletions(-) diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index be5106aa3ec7..d2570c4a2b1b 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1997,18 +1997,9 @@ in6_if2idlen(struct ifnet *ifp) { switch (ifp->if_type) { case IFT_ETHER: /* RFC2464 */ -#ifdef IFT_PROPVIRTUAL case IFT_PROPVIRTUAL: /* XXX: no RFC. treat it as ether */ -#endif -#ifdef IFT_L2VLAN case IFT_L2VLAN: /* ditto */ -#endif -#ifdef IFT_IEEE80211 case IFT_IEEE80211: /* ditto */ -#endif -#ifdef IFT_MIP - case IFT_MIP: /* ditto */ -#endif case IFT_INFINIBAND: return (64); case IFT_FDDI: /* RFC2467 */ diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 06d931b297c6..8c25e982cdeb 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -274,9 +274,7 @@ in6_get_hw_ifid(struct ifnet *ifp, struct in6_addr *in6) case IFT_ISO88025: case IFT_ATM: case IFT_IEEE1394: -#ifdef IFT_IEEE80211 case IFT_IEEE80211: -#endif /* IEEE802/EUI64 cases - what others? */ /* IEEE1394 uses 16byte length address starting with EUI64 */ if (addrlen > 8) @@ -338,9 +336,7 @@ in6_get_hw_ifid(struct ifnet *ifp, struct in6_addr *in6) break; case IFT_GIF: -#ifdef IFT_STF case IFT_STF: -#endif /* * RFC2893 says: "SHOULD use IPv4 address as ifid source". * however, IPv4 address is not very suitable as unique diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index a344d6a2ae1d..83dda1a18427 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -2145,12 +2145,8 @@ nd6_need_cache(struct ifnet *ifp) case IFT_ETHER: case IFT_FDDI: case IFT_IEEE1394: -#ifdef IFT_L2VLAN case IFT_L2VLAN: -#endif -#ifdef IFT_IEEE80211 case IFT_IEEE80211: -#endif case IFT_INFINIBAND: case IFT_BRIDGE: case IFT_PROPVIRTUAL: @@ -2235,12 +2231,8 @@ nd6_storelladdr(struct ifnet *ifp, struct mbuf *m, switch (ifp->if_type) { case IFT_ETHER: case IFT_FDDI: -#ifdef IFT_L2VLAN case IFT_L2VLAN: -#endif -#ifdef IFT_IEEE80211 case IFT_IEEE80211: -#endif case IFT_BRIDGE: case IFT_ISO88025: ETHER_MAP_IPV6_MULTICAST(&SIN6(dst)->sin6_addr, diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 4b160f74f805..a4ae618bb37d 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -1149,12 +1149,8 @@ nd6_ifptomac(struct ifnet *ifp) case IFT_ETHER: case IFT_FDDI: case IFT_IEEE1394: -#ifdef IFT_L2VLAN case IFT_L2VLAN: -#endif -#ifdef IFT_IEEE80211 case IFT_IEEE80211: -#endif case IFT_INFINIBAND: case IFT_BRIDGE: case IFT_ISO88025: @@ -1549,9 +1545,7 @@ nd6_dad_duplicated(struct ifaddr *ifa, struct dadq *dp) case IFT_FDDI: case IFT_ATM: case IFT_IEEE1394: -#ifdef IFT_IEEE80211 case IFT_IEEE80211: -#endif case IFT_INFINIBAND: in6 = ia->ia_addr.sin6_addr; if (in6_get_hw_ifid(ifp, &in6) == 0 && diff --git a/usr.sbin/rtsold/if.c b/usr.sbin/rtsold/if.c index 6274d0f58c90..b8a90b6f5d47 100644 --- a/usr.sbin/rtsold/if.c +++ b/usr.sbin/rtsold/if.c @@ -247,9 +247,7 @@ lladdropt_length(struct sockaddr_dl *sdl) { switch (sdl->sdl_type) { case IFT_ETHER: -#ifdef IFT_IEEE80211 case IFT_IEEE80211: -#endif return (ROUNDUP8(ETHER_ADDR_LEN + 2)); default: return (0); @@ -265,9 +263,7 @@ lladdropt_fill(struct sockaddr_dl *sdl, struct nd_opt_hdr *ndopt) switch (sdl->sdl_type) { case IFT_ETHER: -#ifdef IFT_IEEE80211 case IFT_IEEE80211: -#endif ndopt->nd_opt_len = (ROUNDUP8(ETHER_ADDR_LEN + 2)) >> 3; addr = (char *)(ndopt + 1); memcpy(addr, LLADDR(sdl), ETHER_ADDR_LEN);