bgpd: lcommunity: fix whitespace & copyright

(to match surrounding code)
"git diff -w" should be almost empty.

Copyright edited to say FRR, this is not GNU Zebra :)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2017-01-25 22:29:31 +01:00
parent 47350fd9f4
commit 2acb4ac250
8 changed files with 225 additions and 229 deletions

View File

@ -1272,7 +1272,7 @@ const u_int8_t attr_flags_values [] = {
[BGP_ATTR_EXT_COMMUNITIES] = BGP_ATTR_FLAG_OPTIONAL | BGP_ATTR_FLAG_TRANS, [BGP_ATTR_EXT_COMMUNITIES] = BGP_ATTR_FLAG_OPTIONAL | BGP_ATTR_FLAG_TRANS,
[BGP_ATTR_AS4_PATH] = BGP_ATTR_FLAG_OPTIONAL | BGP_ATTR_FLAG_TRANS, [BGP_ATTR_AS4_PATH] = BGP_ATTR_FLAG_OPTIONAL | BGP_ATTR_FLAG_TRANS,
[BGP_ATTR_AS4_AGGREGATOR] = BGP_ATTR_FLAG_OPTIONAL | BGP_ATTR_FLAG_TRANS, [BGP_ATTR_AS4_AGGREGATOR] = BGP_ATTR_FLAG_OPTIONAL | BGP_ATTR_FLAG_TRANS,
[BGP_ATTR_LARGE_COMMUNITIES] = BGP_ATTR_FLAG_TRANS | BGP_ATTR_FLAG_OPTIONAL [BGP_ATTR_LARGE_COMMUNITIES]= BGP_ATTR_FLAG_OPTIONAL | BGP_ATTR_FLAG_TRANS,
}; };
static const size_t attr_flags_values_max = array_size(attr_flags_values) - 1; static const size_t attr_flags_values_max = array_size(attr_flags_values) - 1;

View File

@ -412,15 +412,14 @@ community_str_get (struct community *com, int i)
} }
/* Internal function to perform regular expression match for /* Internal function to perform regular expression match for
* * a single community. */ * a single community. */
static int static int
community_regexp_include (regex_t * reg, struct community *com, int i) community_regexp_include (regex_t * reg, struct community *com, int i)
{ {
char *str; char *str;
int rv; int rv;
/* When there is no communities attribute it is treated as empty /* When there is no communities attribute it is treated as empty string. */
* string. */
if (com == NULL || com->size == 0) if (com == NULL || com->size == 0)
str = XSTRDUP(MTYPE_COMMUNITY_STR, ""); str = XSTRDUP(MTYPE_COMMUNITY_STR, "");
else else
@ -503,14 +502,13 @@ lcommunity_str_get (struct lcommunity *lcom, int i)
} }
/* Internal function to perform regular expression match for /* Internal function to perform regular expression match for
* * a single community. */ * a single community. */
static int static int
lcommunity_regexp_include (regex_t * reg, struct lcommunity *lcom, int i) lcommunity_regexp_include (regex_t * reg, struct lcommunity *lcom, int i)
{ {
const char *str; const char *str;
/* When there is no communities attribute it is treated as empty /* When there is no communities attribute it is treated as empty string. */
* string. */
if (lcom == NULL || lcom->size == 0) if (lcom == NULL || lcom->size == 0)
str = ""; str = "";
else else

View File

@ -1,23 +1,22 @@
/* BGP Large Communities Attribute /* BGP Large Communities Attribute
*
Copyright (C) 2016 Keyur Patel <keyur@arrcus.com> * Copyright (C) 2016 Keyur Patel <keyur@arrcus.com>
*
This file is part of GNU Zebra. * This file is part of FreeRangeRouting (FRR).
*
GNU Zebra is free software; you can redistribute it and/or modify it * FRR is free software; you can redistribute it and/or modify it under the
under the terms of the GNU General Public License as published by the * terms of the GNU General Public License as published by the Free Software
Free Software Foundation; either version 2, or (at your option) any * Foundation; either version 2, or (at your option) any later version.
later version. *
* FRR is distributed in the hope that it will be useful, but WITHOUT ANY
GNU Zebra is distributed in the hope that it will be useful, but * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
WITHOUT ANY WARRANTY; without even the implied warranty of * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * details.
General Public License for more details. *
* You should have received a copy of the GNU General Public License along
You should have received a copy of the GNU General Public License * with FRR; see the file COPYING. If not, write to the Free Software
along with GNU Zebra; see the file COPYING. If not, write to the Free * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA */
02111-1307, USA. */
#include <zebra.h> #include <zebra.h>

View File

@ -1,23 +1,22 @@
/* BGP Large Communities Attribute. /* BGP Large Communities Attribute.
*
Copyright (C) 2016 Keyur Patel <keyur@arrcus.com> * Copyright (C) 2016 Keyur Patel <keyur@arrcus.com>
*
This file is part of GNU Zebra. * This file is part of FreeRangeRouting (FRR).
*
GNU Zebra is free software; you can redistribute it and/or modify it * FRR is free software; you can redistribute it and/or modify it under the
under the terms of the GNU General Public License as published by the * terms of the GNU General Public License as published by the Free Software
Free Software Foundation; either version 2, or (at your option) any * Foundation; either version 2, or (at your option) any later version.
later version. *
* FRR is distributed in the hope that it will be useful, but WITHOUT ANY
GNU Zebra is distributed in the hope that it will be useful, but * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
WITHOUT ANY WARRANTY; without even the implied warranty of * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * details.
General Public License for more details. *
* You should have received a copy of the GNU General Public License along
You should have received a copy of the GNU General Public License * with FRR; see the file COPYING. If not, write to the Free Software
along with GNU Zebra; see the file COPYING. If not, write to the Free * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA */
02111-1307, USA. */
#ifndef _QUAGGA_BGP_LCOMMUNITY_H #ifndef _QUAGGA_BGP_LCOMMUNITY_H
#define _QUAGGA_BGP_LCOMMUNITY_H #define _QUAGGA_BGP_LCOMMUNITY_H

View File

@ -1651,9 +1651,9 @@ route_set_lcommunity (void *rule, struct prefix *prefix,
if (rcs->none) if (rcs->none)
{ {
attr->flag &= ~(ATTR_FLAG_BIT (BGP_ATTR_LARGE_COMMUNITIES)); attr->flag &= ~(ATTR_FLAG_BIT (BGP_ATTR_LARGE_COMMUNITIES));
if (attr->extra) { if (attr->extra)
attr->extra->lcommunity = NULL; attr->extra->lcommunity = NULL;
}
/* See the longer comment down below. */ /* See the longer comment down below. */
if (old && old->refcnt == 0) if (old && old->refcnt == 0)
lcommunity_free(&old); lcommunity_free(&old);
@ -1677,9 +1677,9 @@ route_set_lcommunity (void *rule, struct prefix *prefix,
new = lcommunity_dup (rcs->lcom); new = lcommunity_dup (rcs->lcom);
/* will be interned by caller if required */ /* will be interned by caller if required */
if (attr->extra) { if (attr->extra)
attr->extra->lcommunity = new; attr->extra->lcommunity = new;
}
attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_LARGE_COMMUNITIES); attr->flag |= ATTR_FLAG_BIT (BGP_ATTR_LARGE_COMMUNITIES);
} }