| Age | Commit message (Collapse) | Author |
|
whith the following config
router bgp 65001
no bgp ebgp-requires-policy
neighbor 192.168.1.2 remote-as external
neighbor 192.168.1.2 timers 3 10
!
address-family ipv4 unicast
neighbor 192.168.1.2 route-map r2 in
exit-address-family
exit
!
bgp as-path access-list FIRST seq 5 permit ^65
bgp as-path access-list SECOND seq 5 permit 2$
!
route-map r2 permit 6
match ip address prefix-list p2
set as-path exclude as-path-access-list SECOND
exit
!
route-map r2 permit 10
match ip address prefix-list p1
set as-path exclude 65003
exit
!
route-map r2 permit 20
match ip address prefix-list p3
set as-path exclude all
exit
making some
no bgp as-path access-list SECOND permit 2$
bgp as-path access-list SECOND permit 3$
clear bgp *
no bgp as-path access-list SECOND permit 3$
bgp as-path access-list SECOND permit 2$
clear bgp *
will induce some crashes
thus we rework the links between aslists and aspath_exclude
Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
|
|
router bgp 65001
no bgp ebgp-requires-policy
neighbor 192.168.1.2 remote-as external
neighbor 192.168.1.2 timers 3 10
address-family ipv4 unicast
neighbor 192.168.1.2 route-map r2 in
exit-address-family
!
ip prefix-list p1 seq 5 permit 172.16.255.31/32
!
route-map r2 permit 10
match ip address prefix-list p1
set as-path exclude 65003
route-map r2 permit 20
set as-path exclude all
!
we make the following commands
bgp as-path access-list FIRST permit ^65
bgp as-path access-list SECOND permit 2
route-map r2 permit 6
set as-path exclude as-path-access-list SECOND
and then
no bgp as-path access-list SECOND permit 2
clear bgp *
we have the following crash in bgp
Stack trace of thread 536083:
#0 0x00007f87f8aacfe1 raise (libpthread.so.0 + 0x12fe1)
#1 0x00007f87f8cf6870 core_handler (libfrr.so.0 +
0xf6870)
#2 0x00007f87f8aad140 __restore_rt (libpthread.so.0 +
0x13140)
#3 0x00007f87f89a5122 __GI___regexec (libc.so.6 +
0xdf122)
#4 0x000055d7f198b4a7 aspath_filter_exclude_acl (bgpd +
0x2054a7)
#5 0x000055d7f1902187 route_set_aspath_exclude (bgpd +
0x17c187)
#6 0x00007f87f8ce54b0 route_map_apply_ext (libfrr.so.0
+ 0xe54b0)
#7 0x000055d7f18da925 bgp_input_modifier (bgpd +
0x154925)
#8 0x000055d7f18e0647 bgp_update (bgpd + 0x15a647)
#9 0x000055d7f18e4772 bgp_nlri_parse_ip (bgpd +
0x15e772)
#10 0x000055d7f18c38ae bgp_nlri_parse (bgpd + 0x13d8ae)
#11 0x000055d7f18c6b7a bgp_update_receive (bgpd +
0x140b7a)
#12 0x000055d7f18c8ff3 bgp_process_packet (bgpd +
0x142ff3)
#13 0x00007f87f8d0dce0 thread_call (libfrr.so.0 +
0x10dce0)
#14 0x00007f87f8cacb28 frr_run (libfrr.so.0 + 0xacb28)
#15 0x000055d7f18435da main (bgpd + 0xbd5da)
#16 0x00007f87f88e9d0a __libc_start_main (libc.so.6 +
0x23d0a)
#17 0x000055d7f18415fa _start (bgpd + 0xbb5fa)
analysis
crash is due to the fact that there were always a pointer from
as-path exclude to deleted as-path access list.
fix
we add a backpointer mechanism to manage the dependency beetween
as-path access-list and aspath exclude.
Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
|
|
A route-map applied on incoming BGP updates is not able
to exclude the unwanted as segments, based on an AS path
access-list.
The below configuration illustrates the case:
router bgp 65001
address-family ipv4 unicast
neighbor 192.168.1.2 route-map rule_2 in
exit-address-family
bgp as-path access-list RULE permit ^65
route-map rule_2 permit 10
set as-path exclude as-path-access-list RULE
```
BGP routing table entry for 10.10.10.10/32, version 13
Paths: (1 available, best #1, table default)
Advertised to non peer-group peers:
192.168.10.65
65000 1 2 3 123
192.168.10.65 from 192.168.10.65 (10.10.10.11)
Origin IGP, metric 0, valid, external, best (First path received)
```
After:
```
do show ip bgp 10.10.10.10/32
BGP routing table entry for 10.10.10.10/32, version 15
Paths: (1 available, best #1, table default)
Advertised to non peer-group peers:
192.168.10.65
2 3 123
192.168.10.65 from 192.168.10.65 (10.10.10.11)
Origin IGP, metric 0, valid, external, best (First path
received)
```
Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
|
|
Done with a combination of regex'ing and banging my head against a wall.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
Before:
```
$ vtysh -c 'sh memory bgpd | include Temporary'; echo ; for x in $(seq 1 1000); do vtysh -c 'conf' -c 'bgp as-path access-list belekas permit wrong' >/dev/null; done; vtysh -c 'sh memory bgpd | include Temporary'
Temporary memory : 19 variable 504 22 656
Temporary memory : 1019 variable 24504 1023 24656
```
After:
```
$ vtysh -c 'sh memory bgpd | include Temporary'; echo ; for x in $(seq 1 1000); do vtysh -c 'conf' -c 'bgp as-path access-list belekas permit wrong' >/dev/null; done; vtysh -c 'sh memory bgpd | include Temporary'
Temporary memory : 19 variable 504 22 656
Temporary memory : 19 variable 504 24 680
```
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
|
|
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
|
|
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|
```
exit1-debian-9# show bgp as-path-access-list
<cr>
AS_PATH_FILTER_NAME AS path access list name
acl1 acl2
json JavaScript Object Notation
exit1-debian-9(config)# route-map testas permit 10
exit1-debian-9(config-route-map)# match as-path ?
AS_PATH_FILTER_NAME AS path access-list name
acl1 acl2
```
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
|
|
A long time ago there was a difference between number-named and string-named
access/prefix-lists. Currently we always treat the name as a string and
there is no need for a separate list for number-named lists.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
|
Add optional parameter seqno to bgp as-patch policy
to inline with other bgp policies commands at same
level.
Testing Done:
config t
bgp as-path access-list foo1 permit _40_
bgp as-path access-list foo1 seq 5 permit _41_
bgp as-path access-list foo1 seq 8 permit _42_
bgp as-path access-list foo2 permit _43_
no bgp as-path access-list foo1 permit _41_
bgp as-path access-list foo1 permit 41$
show run:
bgp as-path access-list foo1 seq 8 permit _42_
bgp as-path access-list foo1 seq 10 permit 41$
bgp as-path access-list foo2 seq 5 permit _43_
Signed-off-by: Chirag Shah <chirag@nvidia.com>
|
|
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
|
|
We had already removed the `ip as-path..` command
to have `bgp as-path` but for some reason a `no ip as-path..`
command ALIAS was still around. Kill with extreme prejudice.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
And again for the name. Why on earth would we centralize this, just so
people can forget to update it?
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
There is really no reason to not put this in the cmd_node.
And while we're add it, rename from pointless ".func" to ".config_write".
[v2: fix forgotten ldpd config_write]
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
The only nodes that have this as 0 don't have a "->func" anyway, so the
entire thing is really just pointless.
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
... and use named assignments everywhere (so I can change the struct.)
Signed-off-by: David Lamparter <equinox@diac24.net>
|
|
Some were converted to bool, where true/false status is needed.
Converted to void only those, where the return status was only false or true.
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|
The correct cast for these is (unsigned char), because "char" could be
signed and thus have some negative value. isalpha & co. expect an int
arg that is positive, i.e. 0-255. So we need to cast to (unsigned char)
when calling any of these.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
doc: Specify allowed chars in bgp regular expressions
|
|
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
|
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
The existing commands "ip as-path", "ip community list", "ip extcommunity
list" & "ip largecommunity list" is used to configure both for ipv4 and
ipv6. So the prefix "ip" is removed from these commands.
All the configuration, show related configuration, show running config
& boot up with write memory is also verified with the provided fix.
Signed-off-by: Sarita Patra <saritap@vmware.com>
|
|
Signed-off-by: Donatas Abraitis donatas.abraitis@gmail.com
|
|
Same fix than c31a793, alwas get the string so clang does not complain that
it can be NULL.
Signed-off-by: Vincent Jardin <vincent.jardin@6wind.com>
|
|
indent.py `git ls-files | pcregrep '\.[ch]$' | pcregrep -v '^(ldpd|babeld|nhrpd)/'`
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
Lots of conflicts from CMD_WARNING_CONFIG_FAILED...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
This allows frr-reload.py (or anything else that scripts via vtysh)
to know if the vtysh command worked or hit an error.
|
|
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Saves 400 lines
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
The FSF's address changed, and we had a mixture of comment styles for
the GPL file header. (The style with * at the beginning won out with
580 to 141 in existing files.)
Note: I've intentionally left intact other "variations" of the copyright
header, e.g. whether it says "Zebra", "Quagga", "FRR", or nothing.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Conflicts:
bgpd/bgp_route.c
bgpd/bgp_routemap.c
bgpd/bgp_vty.c
isisd/isis_redist.c
isisd/isis_routemap.c
isisd/isis_vty.c
isisd/isisd.c
lib/command.c
lib/distribute.c
lib/if.c
lib/keychain.c
lib/routemap.c
lib/routemap.h
ospf6d/ospf6_asbr.c
ospf6d/ospf6_interface.c
ospf6d/ospf6_neighbor.c
ospf6d/ospf6_top.c
ospf6d/ospf6_zebra.c
ospf6d/ospf6d.c
ospfd/ospf_routemap.c
ospfd/ospf_vty.c
ripd/rip_routemap.c
ripngd/ripng_routemap.c
vtysh/extract.pl.in
vtysh/vtysh.c
zebra/interface.c
zebra/irdp_interface.c
zebra/rt_netlink.c
zebra/rtadv.c
zebra/test_main.c
zebra/zebra_routemap.c
zebra/zebra_vty.c
|
|
If a command is put into the VIEW_NODE, it is going into the
ENABLE_NODE as well. This is especially true for show commands.
As such if a command is in both consolidate it down to VIEW_NODE.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
|
|
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
|
|
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
|
|
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
|
|
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
|
|
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
|
|
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
|
|
lib/zebra.h has FILTER_X #define's. These do not belong there.
Put them in lib/filter.h where they belong.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 0490729cc033a3483fc6b0ed45085ee249cac779)
|