diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-03-19 22:11:20 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-03-19 22:12:14 +0900 |
commit | 66ac5a1051267c5d915461a2556ef33e8ac9e670 (patch) | |
tree | 9b8219d656b6774d77c83f4226a7533e13112980 /packet | |
parent | 714ed723a02701c9fbf60ee255347d2b64cf9551 (diff) |
packet: support flowspec "not-a-fragment" fragment type
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'packet')
-rw-r--r-- | packet/bgp.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/packet/bgp.go b/packet/bgp.go index 32ef2d32..1f0ee166 100644 --- a/packet/bgp.go +++ b/packet/bgp.go @@ -2309,6 +2309,8 @@ func flowSpecFragmentParser(rf RouteFamily, args []string) (FlowSpecComponentInt value = 0x4 case "last-fragment": value = 0x8 + case "not-a-fragment": + value = 0x0 default: return nil, fmt.Errorf("invalid flowspec fragment specifier") } @@ -2676,7 +2678,10 @@ func formatFlag(op int, value int) string { } func formatFragment(op int, value int) string { - ss := make([]string, 0, 4) + ss := make([]string, 0) + if value == 0 { + ss = append(ss, "not-a-fragment") + } if value&0x1 > 0 { ss = append(ss, "dont-fragment") } |