> Source: [sk108497](https://support.checkpoint.com/results/sk/sk108497)

# sk108497 - BGP routemaps stop working correctly after upgrade 

| Property | Value |
|----------|-------|
| Solution ID | sk108497 |
| Date Created | 2015-11-02 |
| Last Modified | 2017-07-24 |
| Technical Level | Advanced |
| Products | Security Gateway |
| Versions | R82.10, R82, R81.20 |
| OS | Gaia |

## Symptoms

- * BGP routemaps stop working correctly after Security Gateway upgrade.

* Comparing the BGP settings in Gaia Database from the original machine and from the upgrade machine shows that BGP "aspath-regex" settings are saved in different ways:

  *Example*:
  * Taken from original R76:

    ```
    
    set routemap Import_Map_1 id 30 match aspath-regex "65002 | 65002 64513 64513 | 65002 64513" origin any
    set routemap Import_Map_2 id 20 match aspath-regex "64513 64513 65002 | 64513 64513 | 64513" origin any
    ```

  * Taken after the upgrade to R77.30:

    ```
    
    set routemap Import_Map_1 id 30 match aspath-regex "65002\\|\\65002\\64513\\64513\\|\\65002\\64513" origin any
    set routemap Import_Map_2 id 20 match aspath-regex "64513\\64513\\65002\\|\\64513\\64513\\|\\64513" origin any
    ```

* "`RTGRTG0019 compile_regex: Regex ... is not a valid GNU regex`" error when trying to remove the involved BGP routemap in Clish.

  *Example* :

  ```
  
  HostName> set routemap Import_Map_2 id 20 off
  RTGRTG0019 compile_regex: Regex "64513\\64513\\65002\\|\\64513\\64513\\|\\64513" is not a valid GNU regex
  ```

## Cause

Format of BGP "aspath-regex" settings in Gaia Database changed in R77.10 and later versions.

During the upgrade from R77 and lower versions, BGP "aspath-regex" settings are not translated correctly to the new format.

## Solution

This solution requires authentication. Please log in to view the full solution.

---

# Agent Instructions

This content is from the Check Point Support Center (https://support.checkpoint.com), the official knowledge base for Check Point cybersecurity products.

## Navigating This Knowledge Base

- **Complete index**: [llms.txt](https://support.checkpoint.com/llms.txt)
- **All SK articles**: [SecureKnowledge Sitemap](https://support.checkpoint.com/sitemaps/secureknowledge-sitemap-index.xml)
- **SK article URL pattern**: `https://support.checkpoint.com/results/sk/{skId}`
- **Markdown responses**: AI bot User-Agents automatically receive `text/markdown` content
