diff --git a/bgpd/bgp_attr.c b/bgpd/bgp_attr.c
index 5dc118b..888f11a 100644
--- a/bgpd/bgp_attr.c
+++ b/bgpd/bgp_attr.c
@@ -511,11 +511,9 @@
       if (extra->transit)
         MIX(transit_hash_key_make (extra->transit));
 
-#ifdef HAVE_IPV6
       MIX(extra->mp_nexthop_len);
       key = jhash(extra->mp_nexthop_global.s6_addr, 16, key);
       key = jhash(extra->mp_nexthop_local.s6_addr, 16, key);
-#endif /* HAVE_IPV6 */
     }
 
   return key;
@@ -542,11 +540,9 @@
           && ae1->aggregator_as == ae2->aggregator_as
           && ae1->aggregator_addr.s_addr == ae2->aggregator_addr.s_addr
           && ae1->weight == ae2->weight
-#ifdef HAVE_IPV6
           && ae1->mp_nexthop_len == ae2->mp_nexthop_len
           && IPV6_ADDR_SAME (&ae1->mp_nexthop_global, &ae2->mp_nexthop_global)
           && IPV6_ADDR_SAME (&ae1->mp_nexthop_local, &ae2->mp_nexthop_local)
-#endif /* HAVE_IPV6 */
           && IPV4_ADDR_SAME (&ae1->mp_nexthop_global_in, &ae2->mp_nexthop_global_in)
           && ae1->ecommunity == ae2->ecommunity
           && ae1->cluster == ae2->cluster
@@ -696,9 +692,7 @@
   attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_AS_PATH);
   attr->extra->weight = BGP_ATTR_DEFAULT_WEIGHT;
   attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_NEXT_HOP);
-#ifdef HAVE_IPV6
   attr->extra->mp_nexthop_len = IPV6_MAX_BYTELEN;
-#endif
 
   return attr;
 }
@@ -757,9 +751,8 @@
     }
 
   attre.weight = BGP_ATTR_DEFAULT_WEIGHT;
-#ifdef HAVE_IPV6
   attre.mp_nexthop_len = IPV6_MAX_BYTELEN;
-#endif
+
   if (! as_set)
     attr.flag |= ATTR_FLAG_BIT (BGP_ATTR_ATOMIC_AGGREGATE);
   attr.flag |= ATTR_FLAG_BIT (BGP_ATTR_AGGREGATOR);
@@ -1658,7 +1651,6 @@
       stream_getl (s); /* RD low */
       stream_get (&attre->mp_nexthop_global_in, s, 4);
       break;
-#ifdef HAVE_IPV6
     case 24:
       {
         u_int32_t rd_high __attribute__((unused));
@@ -1705,7 +1697,6 @@
 	  attre->mp_nexthop_len = 16;
 	}
       break;
-#endif /* HAVE_IPV6 */
     default:
       zlog_info ("%s: (%s) Wrong multiprotocol next hop length: %d", 
 		 __func__, peer->host, attre->mp_nexthop_len);
@@ -2434,7 +2425,6 @@
 	  break;
 	}
       break;
-#ifdef HAVE_IPV6
     case AFI_IP6:
       switch (safi)
       {
@@ -2480,7 +2470,6 @@
 	break;
       }
       break;
-#endif /*HAVE_IPV6*/
     default:
       break;
     }
@@ -3063,9 +3052,7 @@
   /* Nexthop attribute. */
   /* If it's an IPv6 prefix, don't dump the IPv4 nexthop to save space */
   if(prefix != NULL
-#ifdef HAVE_IPV6
      && prefix->family != AF_INET6
-#endif /* HAVE_IPV6 */
      )
     {
       stream_putc (s, BGP_ATTR_FLAG_TRANS);
@@ -3129,7 +3116,6 @@
       stream_put (s, attr->community->val, attr->community->size * 4);
     }
 
-#ifdef HAVE_IPV6
   /* Add a MP_NLRI attribute to dump the IPv6 next hop */
   if (prefix != NULL && prefix->family == AF_INET6 && attr->extra &&
      (attr->extra->mp_nexthop_len == 16 || attr->extra->mp_nexthop_len == 32) )
@@ -3161,7 +3147,6 @@
       /* Set MP attribute length. */
       stream_putc_at (s, sizep, (stream_get_endp (s) - sizep) - 1);
     }
-#endif /* HAVE_IPV6 */
 
   /* Return total size of attribute. */
   len = stream_get_endp (s) - cp - 2;
