]> git.proxmox.com Git - mirror_frr.git/commitdiff
Revert "bgpd: "Intern" communities in route maps"
authorPaul Jakma <paul@quagga.net>
Fri, 1 Apr 2011 14:58:27 +0000 (15:58 +0100)
committerPaul Jakma <paul@quagga.net>
Fri, 1 Apr 2011 14:58:27 +0000 (15:58 +0100)
This reverts commit 2c9fd7e07283b8904ef20030c9dadb032e999b12.

bgpd/bgp_community.c
bgpd/bgp_community.h
bgpd/bgp_routemap.c

index 68383adfd5718baf5fa653566b0734f748b3abae..ae1d7a15579e541dea02c8546dc4d821fb5470e8 100644 (file)
@@ -292,13 +292,6 @@ community_com2str  (struct community *com)
   return str;
 }
 
-/* Find an 'intern'ed community structure */
-struct community *
-community_lookup (struct community *com)
-{
-   return (struct community *) hash_lookup (comhash, com);
-}
-
 /* Intern communities attribute.  */
 struct community *
 community_intern (struct community *com)
index 78cbfe2b6f4c9636cb5876593a481db3c8a23263..bc1e56eff1e1592c45b935875efd94cc23800519 100644 (file)
@@ -70,6 +70,5 @@ extern int community_include (struct community *, u_int32_t);
 extern void community_del_val (struct community *, u_int32_t *);
 extern unsigned long community_count (void);
 extern struct hash *community_hash (void);
-extern struct community *community_lookup (struct community *);
 
 #endif /* _QUAGGA_BGP_COMMUNITY_H */
index 2b05e89822b00941f1a9e39b4ebaf580dbb7995e..81ff48dbd6cb5278568b371a95c6292c4926d4f9 100644 (file)
@@ -1297,7 +1297,7 @@ route_set_community (void *rule, struct prefix *prefix,
        new = community_dup (rcs->com);
       
       /* will be interned by caller if required */
-      attr->community = community_intern (new);
+      attr->community = new;
 
       attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_COMMUNITIES);
     }
@@ -1311,7 +1311,6 @@ route_set_community_compile (const char *arg)
 {
   struct rmap_com_set *rcs;
   struct community *com = NULL;
-  struct community *comint;
   char *sp;
   int additive = 0;
   int none = 0;
@@ -1338,9 +1337,8 @@ route_set_community_compile (const char *arg)
        return NULL;
     }
   
-  comint = community_intern (com);
   rcs = XCALLOC (MTYPE_ROUTE_MAP_COMPILED, sizeof (struct rmap_com_set));
-  rcs->com = comint;
+  rcs->com = com;
   rcs->additive = additive;
   rcs->none = none;
   
@@ -1403,7 +1401,7 @@ route_set_community_delete (void *rule, struct prefix *prefix,
            }
          else
            {
-             binfo->attr->community = community_intern (new);
+             binfo->attr->community = new;
              binfo->attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_COMMUNITIES);
            }
        }