{"action":"created","issue":{"url":"https://api.github.com/repos/osrg/gobgp/issues/716","repository_url":"https://api.github.com/repos/osrg/gobgp","labels_url":"https://api.github.com/repos/osrg/gobgp/issues/716/labels{/name}","comments_url":"https://api.github.com/repos/osrg/gobgp/issues/716/comments","events_url":"https://api.github.com/repos/osrg/gobgp/issues/716/events","html_url":"https://github.com/osrg/gobgp/issues/716","id":136397785,"number":716,"title":"Issue with encoding multiple flow spec fragmentation flags","user":{"login":"pavel-odintsov","id":2744166,"avatar_url":"https://avatars.githubusercontent.com/u/2744166?v=3","gravatar_id":"","url":"https://api.github.com/users/pavel-odintsov","html_url":"https://github.com/pavel-odintsov","followers_url":"https://api.github.com/users/pavel-odintsov/followers","following_url":"https://api.github.com/users/pavel-odintsov/following{/other_user}","gists_url":"https://api.github.com/users/pavel-odintsov/gists{/gist_id}","starred_url":"https://api.github.com/users/pavel-odintsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavel-odintsov/subscriptions","organizations_url":"https://api.github.com/users/pavel-odintsov/orgs","repos_url":"https://api.github.com/users/pavel-odintsov/repos","events_url":"https://api.github.com/users/pavel-odintsov/events{/privacy}","received_events_url":"https://api.github.com/users/pavel-odintsov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-25T14:14:18Z","updated_at":"2016-03-05T07:23:06Z","closed_at":null,"body":"Hello!\r\n\r\nI've found another bug.\r\n\r\nI've following announce:\r\n```bash\r\n match fragment first-fragment last-fragment then discard\r\n```\r\n\r\nOn opposite side with ExaBGP I'm getting:\r\n```bash\r\nupdate json { \"exabgp\": \"3.5.0\", \"host\" : \"Ubuntu-1404-trusty-64-minimal\", \"counter\": 1, \"type\": \"update\", \"neighbor\": { \"address\": { \"local\": \"127.0.0.1\", \"peer\": \"127.0.0.1\" }, \"asn\": { \"local\": \"1\", \"peer\": \"1\" }, \"direction\": \"in\", \"message\": { \"update\": { \"attribute\": { \"origin\": \"incomplete\", \"extended-community\": [ 9225060886715039744 ] }, \"announce\": { \"ipv4 flow\": { \"no-nexthop\": { \"flow-11\": { \"fragment\": [ \"first-fragment\" ], \"string\": \"flow fragment first-fragment\" } } } } } } } }\r\n```\r\n\r\nAs you can see we saw only one flag here. But last-fragment have lost.\r\n\r\nSame packet from GoBGP in Wireshark dissector looks like:\r\n```bash\r\n     Path Attribute - MP_REACH_NLRI\r\n            Flags: 0x80, Optional: Optional, Non-transitive, Complete\r\n                1... .... = Optional: Optional\r\n                .0.. .... = Transitive: Non-transitive\r\n                ..0. .... = Partial: Complete\r\n                ...0 .... = Length: Regular length\r\n            Type Code: MP_REACH_NLRI (14)\r\n            Length: 9\r\n            Address family identifier (AFI): IPv4 (1)\r\n            Subsequent address family identifier (SAFI): Flow Spec Filter (133)\r\n            Next hop network address (0 bytes)\r\n            Number of Subnetwork points of attachment (SNPA): 0\r\n            Network layer reachability information (4 bytes)\r\n                FLOW_SPEC_NLRI (4 bytes)\r\n                    NRLI length: 3\r\n                    Filter: IP fragment filter ( FF)\r\n                        Filter type: IP fragment filter (12)\r\n                        Operator flags: 0x80, end-of-list, Value length: 1 byte: 1 <<\r\n                            1... .... = end-of-list: Set\r\n                            .0.. .... = and: Not set\r\n                            ..00 .... = Value length: 1 byte: 1 << (0)\r\n                            .... 0... = Reserved: Not set\r\n                            .... .0.. = Reserved: Not set\r\n                            .... ..0. = logical negation: Not set\r\n                            .... ...0 = Match bit: Not set\r\n                        Fragment Flag: 0x04, First fragment\r\n                            .... 0... = Last fragment: Not set\r\n                            .... .1.. = First fragment: Set\r\n                            .... ..0. = Is a fragment: Not set\r\n                            .... ...0 = Don't fragment: Not set\r\n```\r\n\r\nActually we need some way to encode this cases. Because case \"last-fragment\" + \"first-fragment\" is actually useful for DDoS mitigation (for dropping whole fragmented traffic). \r\n"},"comment":{"url":"https://api.github.com/repos/osrg/gobgp/issues/comments/192601500","html_url":"https://github.com/osrg/gobgp/issues/716#issuecomment-192601500","issue_url":"https://api.github.com/repos/osrg/gobgp/issues/716","id":192601500,"user":{"login":"pavel-odintsov","id":2744166,"avatar_url":"https://avatars.githubusercontent.com/u/2744166?v=3","gravatar_id":"","url":"https://api.github.com/users/pavel-odintsov","html_url":"https://github.com/pavel-odintsov","followers_url":"https://api.github.com/users/pavel-odintsov/followers","following_url":"https://api.github.com/users/pavel-odintsov/following{/other_user}","gists_url":"https://api.github.com/users/pavel-odintsov/gists{/gist_id}","starred_url":"https://api.github.com/users/pavel-odintsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavel-odintsov/subscriptions","organizations_url":"https://api.github.com/users/pavel-odintsov/orgs","repos_url":"https://api.github.com/users/pavel-odintsov/repos","events_url":"https://api.github.com/users/pavel-odintsov/events{/privacy}","received_events_url":"https://api.github.com/users/pavel-odintsov/received_events","type":"User","site_admin":false},"created_at":"2016-03-05T07:23:06Z","updated_at":"2016-03-05T07:23:06Z","body":"Yes, it is! ;)\n\nOn Saturday, 5 March 2016, FUJITA Tomonori <notifications@github.com> wrote:\n\n> Is this the behavior that you expect?\n>\n> [image: 2016-03-05 13 27 12]\n> <https://cloud.githubusercontent.com/assets/726426/13545667/b01492a8-e2d6-11e5-941f-01c77bd1e526.png>\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/osrg/gobgp/issues/716#issuecomment-192567276>.\n>\n\n\n-- \nSincerely yours, Pavel Odintsov\n"}}