2017 Commits

Author SHA1 Message Date
FUJITA Tomonori
f77f84942f Ryu 3.13
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v3.13
2014-09-01 20:10:03 +09:00
Satoshi Kobayashi
5b8e7178c2 ws_topology: bugfix an event is dropped
When SocketError occurs, an event may not be notified to an other client.
It is because rpc_clients is changed in the loop.

Signed-off-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-09-01 15:16:05 +09:00
Satoshi Kobayashi
4cfc239b30 bgp: should not use dict comprehension
Dict Comprehension is available in Python 2.7+ but Ryu should work
with Python2.6. Currently, It will become syntax error when we try to
operate BGP of Ryu on the platform of Python2.6.

Signed-off-by: Satoshi Kobayashi <satoshi-k@stratosphere.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-09-01 15:16:05 +09:00
John-Lin
bbb7724423 Snort integrate: Add the snort lib supporting snort integration. Add an sample application simple_switch_snort.py which can dump alert message.
When there is a Snort alert message, Ryu will receive an event called EventAlert.
You can easily define the event handler in the method which using ‘set_ev_cls’
decorator with snortlib.EventAlert parameter.

The simple_switch_snort.py can install a flow that mirroring incoming packets to the snort's NIC
which correspond the OpenFlow switch on port 3 (by default).

There are two methods that sending alert message to Ryu.

1. Ryu and Snort are both on the same machine.
Ryu receives alert message via Unix Domain Socket.

2. Ryu and Snort are separate on different machines.
Ryu receives alert message via Network Socket.

More detail see doc/snort_integrate.rst

Signed-off-by: Che-Wei Lin <linton.tw@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-09-01 15:16:05 +09:00
FUJITA Tomonori
86550bf898 packet lib: add linux cooked header support
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-30 19:26:33 +09:00
FUJITA Tomonori
2651909844 doc: update obsolete Linux kernel SubmittingPatches url
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-29 22:39:33 +09:00
FUJITA Tomonori
6b5cec7a51 packet bmp: fix Peer Down Reason
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-27 15:04:46 +09:00
Toshiki Tsuboi
dd795150f3 bgp: add parameter 'label_ranges' for 'core.start' method in BGPSpeaker
In case of locating some Ryu-BGPs in the same Topology for BGP/MPLS VPNs :
When same label has been assigned '100 (defalut label)' by each Ryu-BGP, it is difficult to analyze for trouble shooting of RIB for vpnv4 .
Therefore, each Ryu-BGPs should assign different label for vpnv4 prefix according to own label_range .

bgpd> show rib all
Status codes: * valid, > best
Origin codes: i - IGP, e - EGP, ? - incomplete
     Network                          Labels   Next Hop             Reason          Metric LocPrf Path
Family: rtfilter
 *>  65001:65010:101                  None     0.0.0.0              Only Path                     ?
Family: vpnv6
Family: vpnv4
 *>  65010:101:192.168.104.0/30       [100]    172.16.0.102         Only Path                     65002 ?
 *>  65010:101:192.168.201.0/24       [43]     192.168.100.101      Only Path       100           65010 65011 i
 *>  65010:101:10.10.10.1/32          [38]     192.168.100.101      Only Path       100           65010 65011 ?
 *>  65010:101:192.168.103.0/30       [100]    0.0.0.0              Only Path                     ?
 *>  65010:101:192.168.101.0/30       [42]     192.168.100.101      Only Path       100           65010 ?
 *>  65010:101:192.168.102.0/30       [40]     192.168.100.101      Only Path       100           65010 ?
 *>  65010:101:10.10.10.2/32          [37]     192.168.100.101      Only Path       100           65010 65012 ?
 *>  65010:101:192.168.202.0/24       [44]     192.168.100.101      Only Path       100           65010 65012 i

Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-22 01:27:28 -07:00
Yusuke Iwase
04766aaa93 ofctl_rest: support OFPFlowStats filtered by fields
this patch enables ofctl_rest to get OFPFlowStats messages
filtered by the OFPFlowStatsRequest fields in OpenFlow specification.

usage)

  URI:    /stats/flow/<dpid>
  method: POST

  the message body is as follows:

  table_id     ID of table.
  out_port     Require matching entries to include this as an output port.
  out_group    Require matching entries to include this as an output group.
               (Not supported in of1.0)
  cookie       Require matching entries to contain this cookie value.
               (Not supported in of1.0)
  cookie_mask  Mask used to restrict the cookie bits that must match.
               (Not supported in of1.0)
  match        Fields to match.

e.g.)

  curl -X POST -d '{"table_id": 0,
                    "out_port": 2,
                    "cookie": 1,
                    "cookie_mask": 1,
                    "match":{"in_port":1}}'
  http://localhost:8080/stats/flow/1

Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-20 05:25:10 -07:00
Hiroshi Yokoi
7cc538a01a bgp: reduce duplicate codes with helper_function.
reduced duplicate codes and put together to a static function.

Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-20 05:01:54 -07:00
Minoru TAKAHASHI
06a38cf2a8 sw test tool: add a "note" for help to understand
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-20 04:46:32 -07:00
ISHIDA Wataru
950785ee8d bmpstation: make configurable through environment variables
you can specify listening HOST and PORT by setting env variable
'RYU_BMP_SERVER_HOST' and 'RYU_BMP_SERVER_PORT'.

'RYU_BMP_OUTPUT_FILE' specifes the output file name
'RYU_BMP_FAILED_DUMP' specifes the file name of the error dump

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-18 16:54:11 +09:00
ISHIDA Wataru
7a06df454b bgp: make reserved private variable
reserved field must be 0. this patch add an assertion and
make reserved field invisible when stringified

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-18 14:14:55 +09:00
ISHIDA Wataru
9606784f68 bgp: encode 'next_hop' in human readable format
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-18 14:14:55 +09:00
ISHIDA Wataru
f01af327c8 bgp: use _class_suffixes to support various AddrPrefix
the AddrPrefix which variable 'nlri' has is not limited to
_BinAddrPrefix. this patch enables to encode to/decode from json dict
with various AddrPrefix in 'nlri'.

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-18 14:14:55 +09:00
ISHIDA Wataru
fc2b0b0f9c stringify: introduce _class_suffixes for easy jsonize
class variable '_class_suffixes' can be used for the same purpose as
'_class_prefixes' but match with the suffix of the class name.

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-18 14:14:55 +09:00
ISHIDA Wataru
7a5b83daa6 bgp: move _TYPE declaration of IPAddrPrefix to the appropriate place.
_IPAddrPrefix can be inherited by labeled addr prefix.
In that case, variable 'addr' is tuple and not string. so declare to
parse 'addr' in 'ascii' format in _IPAddrPrefix cause following error.
this patch fix this bug.

p = LabelledIPAddrPrefix(28, ([1], '192.168.0.0'))
p.to_jsondict()

Traceback (most recent call last):
  File "./parse_labeled_addr_prefix.py", line 11, in <module>
    p.to_jsondict()
  File "/home/wataru/ryu/ryu/lib/stringify.py", line 210, in to_jsondict
    dict_[k] = encode(k, v)
  File "/home/wataru/ryu/ryu/lib/stringify.py", line 208, in <lambda>
    encode = lambda k, x: self._encode_value(k, x, encode_string)
  File "/home/wataru/ryu/ryu/lib/stringify.py", line 155, in
_encode_value
    return cls._get_encoder(k, encode_string)(v)
  File "/home/wataru/ryu/ryu/lib/stringify.py", line 56, in encode
    return unicode(v, 'ascii')
TypeError: coercing to Unicode: need string or buffer, tuple found

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-18 14:14:55 +09:00
ISHIDA Wataru
f92b674def bgp: add support for RFC3107
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-18 14:14:55 +09:00
Hiroaki KAWAI
cf4299457a fix setup.cfg entry
SubmittingPatches.rst was renamed to CONTRIBUTING.rst.
setup.py sdist will check this dependency.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-15 11:01:26 +09:00
FUJITA Tomonori
c37692cb10 bgp: simplify CLUSTER_LIST attribute parser
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-15 09:08:24 +09:00
Toshiki Tsuboi
1f90cddd20 bgp: fix bug of receiving 'RouteRefresh' Message
When Ryu BGP received 'RouteRefresh' Message from the peering router, BGP session has closed as follows .

DEBUG 2014-08-15 02:20:08,718 speaker 447 Received msg from ('192.168.100.100', '34939') << BGPRouteRefresh(afi=1,demarcation=1,len=23,safi=128,type=5)
DEBUG 2014-08-15 02:20:08,719 speaker 566 Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/speaker.py", line 560, in _recv_loop
    self.data_received(next_bytes)
  File "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/speaker.py", line 275, in data_received
    self._data_received(next_bytes)
  File "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/speaker.py", line 355, in _data_received
    self._handle_msg(msg)
  File "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/speaker.py", line 508, in _handle_msg
    self._peer.handle_msg(msg)
  File "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/peer.py", line 1585, in handle_msg
    self._handle_route_refresh_msg(msg)
  File "/usr/local/lib/python2.7/dist-packages/ryu/services/protocols/bgp/peer.py", line 1619, in _handle_route_refresh_msg
    afi = msg.route_family.afi
AttributeError: 'BGPRouteRefresh' object has no attribute 'route_family'

INFO 2014-08-15 02:20:08,722 peer 1901 Connection to peer 192.168.100.100 lost, reason: 'BGPRouteRefresh' object has no attribute 'route_family' Resetting retry connect loop: False

Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-15 09:01:52 +09:00
FUJITA Tomonori
a60c18207e bgp: refine the API for connecting to bmp server
We might want a bgp speaker to talk with multiple bmp servers in the
future so I renamed these functions. Note that currently a speaker can
connect to only one bmp server.

I also update the example code on how to make the speaker to connect
to a bmp server.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-14 18:07:45 +09:00
FUJITA Tomonori
ad2d267879 bgp: add BGP capability code 64 (graceful restart)
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-14 18:07:27 +09:00
Xiao Peng
6b28af2636 bgp: add attribute ORIGINATOR_ID and CLUSTER_LIST
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-14 17:09:27 +09:00
FUJITA Tomonori
afbf024447 bgp: move ssh configuration to bgp config file
You can't pass ssh.py to run command any more. If you need ssh CLI,
update the bgp config file and then:

ryu run —-config-file /path/to/ryu.conf /path/to/ryu/ryu/services/protocols/application.py

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-13 22:20:27 +09:00
ISHIDA Wataru
c637147484 bgp: add route server function to bgpspeaker
implemented draft-ietf-idr-ix-bgp-route-server-05 partially.

you can enable this function like below

>    speaker = BGPSpeaker(as_number=64512, router_id='10.10.0.1')
>    speaker.neighbor_add('10.0.0.1', 64514, is_route_server_client=True)
>    speaker.neighbor_add('10.10.0.2', 64513, is_route_server_client=True)

add multiple rib function is a future work

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-13 14:05:18 +09:00
FUJITA Tomonori
c451b6e4ec bgp: fix bug of labels formatting for show VPNv4 prefix information
The field of 'Labels' has not displayed in properly because of extracting 'label_list' in python slicing tuples.

INFO:bgpspeaker.api.base:API method operator.show called with args: {'params': ['rib', 'all'], 'format': 'cli'}
Status codes: * valid, > best
    Network                          Labels   Next Hop             Reason          Metric LocPrf Path/Origin
Family: rtfilter
*>  64512:64511:101                  None     0.0.0.0              Only Path                     2
Family: vpnv6
Family: vpnv4
*>  64511:101:10.10.0.1/32           ([17],)  192.168.100.100      Only Path       0             64511 2
*>  64511:101:10.20.2.0/24           ([100],) 0.0.0.0              Only Path                     2
*>  64511:101:10.20.1.0/24           ([100],) 0.0.0.0              Only Path                     2
*>  64511:101:10.20.3.0/24           ([100],) 0.0.0.0              Only Path                     2
Family: ipv4
Family: ipv6

Reported-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-13 13:56:21 +09:00
Toshiki Tsuboi
c4abf05e9e bgp: fix bug of Path(Origin) formatting for show VPNv4 prefix information
The field of 'Path(Origin)' has not displayed in properly ,because Origin codes '2 (incomplete)' is not defined in the latest code .
Therfore, I've patched the codes for formatting as follows .

INFO:bgpspeaker.api.base:API method operator.show called with args: {'params': ['rib', 'all'], 'format': 'cli'}
Status codes: * valid, > best
Origin codes: i - IGP, e - EGP, ? - incomplete
     Network                          Labels   Next Hop             Reason          Metric LocPrf Path
Family: rtfilter
 *>  64512:64511:101                  None     0.0.0.0              Only Path                     ?
Family: vpnv6
Family: vpnv4
 *>  64511:101:10.10.0.1/32           [17]     192.168.100.100      Only Path       0             64511 ?
 *>  64511:101:10.20.2.0/24           [100]    0.0.0.0              Only Path                     ?
 *>  64511:101:10.20.1.0/24           [100]    0.0.0.0              Only Path                     ?
 *>  64511:101:10.20.3.0/24           [100]    0.0.0.0              Only Path                     ?
Family: ipv4
Family: ipv6

Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-13 13:02:12 +09:00
Toshiki Tsuboi
4b07ae4714 bgp: show VPNv4 Prefix information
But the result looks unexpected regarding of show_command .
I can’t find the advertised labels or assigned labels for vpnv4 prefix .
 (reference: http://sourceforge.net/p/ryu/mailman/message/32686423/ )
Therfore, I've patched the codes for formatting as follows .
=> needs for fixing labels attribute after that .

INFO:bgpspeaker.api.base:API method operator.show called with args: {'params': ['rib', 'all'], 'format': 'cli'}
Status codes: * valid, > best
     Network                          Labels   Next Hop             Reason          Metric LocPrf Path/Origin
Family: rtfilter
 *>  64512:64511:101                  None     0.0.0.0              Only Path                     2
Family: vpnv6
Family: vpnv4
 *>  64511:101:10.10.0.1/32           ([17],)  192.168.100.100      Only Path       0             64511 2
 *>  64511:101:10.20.2.0/24           ([100],) 0.0.0.0              Only Path                     2
 *>  64511:101:10.20.1.0/24           ([100],) 0.0.0.0              Only Path                     2
 *>  64511:101:10.20.3.0/24           ([100],) 0.0.0.0              Only Path                     2
Family: ipv4
Family: ipv6

Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-09 23:37:00 +09:00
Xiao Peng
712460fa93 packet/bgp: add open capability code of 128
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-09 22:24:39 +09:00
Hiroshi Yokoi
7f3af19754 bgp: support add/delete vpnv6 prefix
added VPNv6 prefix support.
This patch enables addition and deletion of VPNv6 prefix.

Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-08 16:51:15 +09:00
Hiroshi Yokoi
0ee150ec52 bgp: support add/delete VPNv6 VRF
added VPNv6 route family VRF support.
This patch enables addition and deletion of VPNv6 VRF.

Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-08 16:51:14 +09:00
ISHIDA Wataru
4c98b346e2 app/bmpstation: fix to work with empty BMPMessage
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-07 09:28:39 +08:00
ISHIDA Wataru
2adfda55e6 packet/bmp: fix bug of BMP Peer Down Notification class
BMP Peer Down Notification packet must have a per-peer header.

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-07 09:28:38 +08:00
ISHIDA Wataru
5fb5b6c57d packet/bgp: add 32bit AS number support to BGPPathAttributeAsPath
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-06 08:46:19 +08:00
Toshiki Tsuboi
94d5d865f0 added parameter for vrfs_get (in case of format = 'cli')
this parameter will support to display like cli as follows.

    Status codes: * valid, > best
         Network                          Next Hop             Reason          Metric LocPrf Path
    VPN: ('64511:101', 'ipv4')
     *>  10.20.2.0/24                     0.0.0.0              Only Path                     2
     *>  10.20.1.0/24                     0.0.0.0              Only Path                     2
     *>  10.20.3.0/24                     0.0.0.0              Only Path                     2

Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-03 17:40:56 +08:00
Toshiki Tsuboi
4076adf5ed added parameter for rib_get
this parameter will support to display like cli as follows.

    Status codes: * valid, > best
         Network                          Next Hop             Reason          Metric LocPrf Path
     *>  10.20.2.0/24                     0.0.0.0              Only Path                     i
     *>  10.20.3.0/24                     0.0.0.0              Only Path                     i
     *>  10.20.1.0/24                     0.0.0.0              Only Path                     i

Signed-off-by: Toshiki Tsuboi <t.tsubo2000@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-03 17:40:55 +08:00
FUJITA Tomonori
d192aa92b7 Ryu 3.12
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
v3.12
2014-08-02 06:01:06 +09:00
Minoru TAKAHASHI
67328e0fb1 ofctl_rest: Add support for strict matching
ofctl_rest is now enable to modify and delete with strict matching.

usage)

  URI:    /stats/flowentry/modify_strict
          /stats/flowentry/delete_strict

  method: POST

e.g. )

  curl -X POST -d '{"dpid": 1,
                    "actions":[{"port":3, "type":"OUTPUT"}],
                    "match":{"in_port":2}}'
                    http://localhost:8080/stats/flowentry/modify_strict

  curl -X POST -d '{"dpid": 1,
                    "match":{"in_port":2}}'
                    http://localhost:8080/stats/flowentry/delete_strict

Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-08-01 18:05:35 +09:00
Hiroshi Yokoi
6096a49d2e bgp: fix conflict of PEER_NEXT_HOP and NEXT_HOP value
The third is fix to a conflict of PEER_NEXT_HOP value in neighbors.py.

There is a conflict between PEER_NEXT_HOP in neighbors.py and NEXT_HOP in api/base.py.
As a result of the conflict, the correct validator for PEER_NEXT_HOP is not used when
neighbir_add is executed.

Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-31 15:05:15 +09:00
Hiroshi Yokoi
7acda14a5d bgp: add code to handle RD 0:0 at the head of nexthop network address in MP_REACH_NLRI path attribute
The second is patch to add or skip RD 0:0 label for the next_hop address in MP_REACH_NLRI attribute.

According to RFC, next_hop address seems to be required to contain RD of 0 when advertise VPN prefix.
This is defined in RFC 4659(3.2.1.1.  BGP Speaker Requesting IPv6 Transport) for VPN-IPv6
and in RFC 4364(4.3.2.  Route Distribution Among PEs by BGP) for VPN-IPv4.

Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-31 15:05:15 +09:00
Hiroshi Yokoi
cc3c00b663 bgp: add parameter for site_of_origins to neighbor_add and vrf_add method
Fujita-san,
thank you for your comment and finding the bug that causes test case failure.
I fixed the second and resend the whole patch.

The first is the addition of site_of_origins parameter to neighbor_add and
vrf_add method and fixes to some import error.

Signed-off-by: Hiroshi Yokoi <yokoi.hiroshi@po.ntts.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-31 15:05:15 +09:00
FUJITA Tomonori
6630328fcc bmpstation: add copyright
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-30 17:55:59 +09:00
ISHIDA Wataru
915dd2ca82 app: add simple bmp station application
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-30 17:41:40 +09:00
ISHIDA Wataru
3ead62d37f bgp: add bmp client function
now ryu bgp can send internal information through BGP monitoring protocol

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-30 17:41:39 +09:00
ISHIDA Wataru
851b486df4 bmp: add unit test
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-30 17:41:38 +09:00
ISHIDA Wataru
7d3b02cfab packet lib: add bmp(BGP Monitoring Protocol)
implements I-D grow-bmp-07

Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-30 17:41:37 +09:00
Minoru TAKAHASHI
40a70a9336 packet lib: sctp: fix default arguments
Reported-by: Arne Goetje <arne_goetje@accton.com>
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-30 14:52:59 +09:00
Minoru TAKAHASHI
be9db8b3f2 packet lib: udp: fix default arguments
Reported-by: Arne Goetje <arne_goetje@accton.com>
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-30 14:52:59 +09:00
Minoru TAKAHASHI
27c0cd5b11 packet lib: tcp: fix default arguments
Reported-by: Arne Goetje <arne_goetje@accton.com>
Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
2014-07-30 14:52:59 +09:00