summaryrefslogtreecommitdiffhomepage
path: root/table/policy.go
AgeCommit message (Collapse)Author
2018-07-07follow Standard Go Project LayoutFUJITA Tomonori
https://github.com/golang-standards/project-layout Now you can see clearly what are private and public library code. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-07-06table: Sort in table packageSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2018-06-22Fixing all megacheck errors.Jeff Bean
2018-06-13table: support AfiSafiIn Policy Condition matchMarcin Ptaszyński
2018-06-05table: support nexthop match policyurban
2018-05-23fix: missing validateCondition in ReplaceStatementlnever
2018-05-10make Path objects in rib read-onlyFUJITA Tomonori
Now you can read Path objects in rib safely. Nobody modifies them. GetRib() API doesn't need to clone the objects. With full routes, this avoid allocating temporary huge memory. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-05-07use sorted single master table for route server setupFUJITA Tomonori
https://github.com/osrg/gobgp/issues/1249 The IN policy was removed. The modification by the IMPORT policy are visible to all route server peers. This saves some dozens bytes memory per a path. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2018-01-24*: Use strconv.ParseUint instead of strconv.Atoi()IWASE Yusuke
For the 32-bit platform compatibility. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
2017-12-16table/policy: Support prefix representation in NeighborSetSatoshi Fujimoto
Currently, "neighbor-set" supports only IP address representation and IP prefix representation(such as "192.168.0.0/24") is not supported. This commit enables to accept the prefix representation for "neighbor-set" to allow neighbors to be specified as range. Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-07*: Support BGP Confederations (RFC 5065)Satoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-11-03table/policy: Nil check before reference in inUse()Satoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-09-14table/policy: fix ReplacePolicy with preserve=false to remove old statementsPiotr Wydrych
2017-07-19table: Include detailed information about RPKI in originInfoSatoshi Fujimoto
Signed-off-by: Satoshi Fujimoto <satoshi.fujimoto7@gmail.com>
2017-06-07replace github.com/Sirupsen/logrus with github.com/sirupsen/logrusFUJITA Tomonori
The usage of "github.com/sirupsen/logrus" is recommended. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-05-06cli: speed up showing a specific defined-setWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2017-03-19table: handle IPv4-Mapped IPv6 Address as v6FUJITA Tomonori
Currently, Prefix structure wrongly handles IPv4-Mapped IPv6 Address as v4. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-24policy: fix prefixset match about different familiesFUJITA Tomonori
currently wrongly try to match prefixset for v4 to v6 routes, and vice versa. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2017-02-17table: fix DeletePolicyAssignment() crash with bogus inputFUJITA Tomonori
len(cur)-len(ps) is negative if the caller tries to remove more than currently assigned policies. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-12-15policy: avoid crash when getting ext-communityHiroshi Yokoi
2016-12-14policy: allow using invert condition in statementHiroshi Yokoi
Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
2016-11-25policy: fix bug of multi policy applicationWataru Ishida
when multiple policies with modification actions are configured, use a path structure which was applied to the previous policy. Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-25policy: fix bug of rpki validation conditionWataru Ishida
when rpki validation condition is not configured ( c == "" ), don't create an instance for validation. this bug was breaking all policy mechanism when rpki server is configured. Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-17config: simplify route-disposition configurationWataru Ishida
before: ```yaml actions: route-disposition: accept-route: true reject-route: false ``` after ```yaml action: router-disposition: accept-route ``` Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-17add go vet testWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-14client: add golang client libraryWataru Ishida
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-11-14policy: fix bug of policy with multiple statementsWataru Ishida
policy can have multiple statements. In each statement, when condition is matched, route-action is finally evaluated after actions with mods. When route-action is 'none', we contine to next statement if it exists. When route-action is 'accept' or 'reject', we stop proceeding. This patch fixes a bug that route-action can't be set to 'none' which means route-action always be set to 'accept' or 'reject' and can't proceed to the next statement. Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-10-10policy: support large-community match/actionWataru Ishida
close #1133 Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-10-09policy: fix bug of handling multiple prefix-match with same IP prefix.Wataru Ishida
fix handling of prefix-match configuration like below [[defined-sets.prefix-sets]] prefix-set-name = "ps1" [[defined-sets.prefix-sets.prefix-list]] ip-prefix = "0.0.0.0/0" masklength-range = "0..7" [[defined-sets.prefix-sets.prefix-list]] ip-prefix = "0.0.0.0/0" masklength-range = "25..32" Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
2016-10-08table: ensure compatibility with archs where int == int32Vincent Bernat
MED actions are expected to be int64 and AS are expected to be uint32. Use ParseInt/ParseUint instead of Atoi for those until the tests pass on ARM.
2016-08-17policy: fix global default policy initializationISHIDA Wataru
Allow all routes coming in and going out by default Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-08-17policy: support route-type conditionISHIDA Wataru
// match with routes locally generated $ gobgp policy statement s0 add condition route-type local // match with routes received from eBGP peers $ gobgp policy statement s0 add condition route-type external // match with routes received from iBGP peers $ gobgp policy statement s0 add condition route-type internal Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-08-03table: make some RoutingPolicy methods unexportedFUJITA Tomonori
All the exported methods are properly serialized with mutex. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-08-03move policyMutex to policy/FUJITA Tomonori
It's more logical. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-07-30all logging is done with log.WithFieldsdsp
Signed-off-by: dsp <dsp@2f30.org> Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-07-20remove gRPC dependency from table/FUJITA Tomonori
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-07-20table: remove ToApiStruct methods from policy.goFUJITA Tomonori
Preparation for removing gRPC dependency. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-05-26policy: add support setting self ip address as next-hopISHIDA Wataru
from configuration file [policy-definitions.statements.actions.bgp-actions] set-next-hop = "self" from cli $ gobgp policy statement stmt1 add action next-hop self Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-05-25policy: add local-pref actionISHIDA Wataru
$ gobgp policy statement st01 add action local-pref 110 Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-04-26policy: don't apply policy when path is withdrawalISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-04-21policy: fix as-path match optimizationISHIDA Wataru
following as-path pattern will be optimized - ^<asn>_ # left-most - _<asn>$ # origin - _<asn>_ # include - ^<asn>$ # only Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-04-21config: add set-next-hop optiontamihiro
2016-04-20policy: check duplicated policy nameISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-04-20policy: don't allow same policy assigned twiceISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-04-20Revert "policy: remove unnecessary regexp special charactor"tamihiro
This reverts commit 76525a966bdfdfd10195e72fffcffbc3a6c69d78.
2016-04-20fix community-set match all evaluation and remove regexp special chars from ↵tamihiro
cli output of community strings
2016-03-31move packet/*.go to packet/bgp/*.go for Go's conventionFUJITA Tomonori
Later, we move non-bgp protocol stuff like mrt under their own direcotries. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-03-09policy: fix crash to remove statement from policy without statementsFUJITA Tomonori
https://github.com/osrg/gobgp/issues/754 Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2016-02-19policy: remove unnecessary regexp special charactorISHIDA Wataru
Since communities/ext-communities are tested one by one in policy-condition, we don't need '^' and '$' around match condition items. Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
2016-01-25config: add openconfig identity structs in bgp_configs.goISHIDA Wataru
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>