]> git.proxmox.com Git - mirror_frr.git/blobdiff - bgpd/bgp_encap.c
bgpd: Fix `ip as-path access-list ...` breakage
[mirror_frr.git] / bgpd / bgp_encap.c
index 499401bd4ff457e4d0868bd2220b8392c2a322f7..dd35bb2c3ce5e52cf36fdefb2ec0485d75f69e44 100644 (file)
@@ -85,14 +85,13 @@ ecom2prd(struct ecommunity *ecom, struct prefix_rd *prd)
 
 int
 bgp_nlri_parse_encap(
-    afi_t              afi,
     struct peer                *peer,
-    struct attr                *attr,          /* Need even for withdraw */
-    struct bgp_nlri    *packet,
-    int                        withdraw)       /* 0=update, !0 = withdraw */
+    struct attr                *attr,
+    struct bgp_nlri    *packet)
 {
   u_char *pnt;
   u_char *lim;
+  afi_t afi = packet->afi;
   struct prefix p;
   int psize = 0;
   int prefixlen;
@@ -186,7 +185,7 @@ bgp_nlri_parse_encap(
            inet_ntop (p.family, &p.u.prefix, buf, BUFSIZ),
            p.prefixlen);
 
-      if (!withdraw) {
+      if (attr) {
        bgp_update (peer, &p, 0, attr, afi, SAFI_ENCAP,
                    ZEBRA_ROUTE_BGP, BGP_ROUTE_NORMAL, &prd, NULL, 0);
 #if ENABLE_BGP_VNC
@@ -218,7 +217,7 @@ DEFUN (encap_network,
        encap_network_cmd,
        "network A.B.C.D/M rd ASN:nn_or_IP-address:nn tag WORD",
        "Specify a network to announce via BGP\n"
-       "IP prefix <network>/<length>, e.g., 35.0.0.0/8\n"
+       "IPv4 prefix\n"
        "Specify Route Distinguisher\n"
        "ENCAP Route Distinguisher\n"
        "BGP tag\n"
@@ -236,7 +235,7 @@ DEFUN (no_encap_network,
        "no network A.B.C.D/M rd ASN:nn_or_IP-address:nn tag WORD",
        NO_STR
        "Specify a network to announce via BGP\n"
-       "IP prefix <network>/<length>, e.g., 35.0.0.0/8\n"
+       "IPv4 prefix\n"
        "Specify Route Distinguisher\n"
        "ENCAP Route Distinguisher\n"
        "BGP tag\n"