Hello!
I've found another bug.
I've following announce:
match fragment first-fragment last-fragment then discard
On opposite side with ExaBGP I'm getting:
update 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" } } } } } } } }
As you can see we saw only one flag here. But last-fragment have lost.
Same packet from GoBGP in Wireshark dissector looks like:
Path Attribute - MP_REACH_NLRI
Flags: 0x80, Optional: Optional, Non-transitive, Complete
1... .... = Optional: Optional
.0.. .... = Transitive: Non-transitive
..0. .... = Partial: Complete
...0 .... = Length: Regular length
Type Code: MP_REACH_NLRI (14)
Length: 9
Address family identifier (AFI): IPv4 (1)
Subsequent address family identifier (SAFI): Flow Spec Filter (133)
Next hop network address (0 bytes)
Number of Subnetwork points of attachment (SNPA): 0
Network layer reachability information (4 bytes)
FLOW_SPEC_NLRI (4 bytes)
NRLI length: 3
Filter: IP fragment filter ( FF)
Filter type: IP fragment filter (12)
Operator flags: 0x80, end-of-list, Value length: 1 byte: 1 <<
1... .... = end-of-list: Set
.0.. .... = and: Not set
..00 .... = Value length: 1 byte: 1 << (0)
.... 0... = Reserved: Not set
.... .0.. = Reserved: Not set
.... ..0. = logical negation: Not set
.... ...0 = Match bit: Not set
Fragment Flag: 0x04, First fragment
.... 0... = Last fragment: Not set
.... .1.. = First fragment: Set
.... ..0. = Is a fragment: Not set
.... ...0 = Don't fragment: Not set
Actually 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).
Hello!
I've found another bug.
I've following announce:
match fragment first-fragment last-fragment then discardOn opposite side with ExaBGP I'm getting:
update 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" } } } } } } } }As you can see we saw only one flag here. But last-fragment have lost.
Same packet from GoBGP in Wireshark dissector looks like:
Path Attribute - MP_REACH_NLRI Flags: 0x80, Optional: Optional, Non-transitive, Complete 1... .... = Optional: Optional .0.. .... = Transitive: Non-transitive ..0. .... = Partial: Complete ...0 .... = Length: Regular length Type Code: MP_REACH_NLRI (14) Length: 9 Address family identifier (AFI): IPv4 (1) Subsequent address family identifier (SAFI): Flow Spec Filter (133) Next hop network address (0 bytes) Number of Subnetwork points of attachment (SNPA): 0 Network layer reachability information (4 bytes) FLOW_SPEC_NLRI (4 bytes) NRLI length: 3 Filter: IP fragment filter ( FF) Filter type: IP fragment filter (12) Operator flags: 0x80, end-of-list, Value length: 1 byte: 1 << 1... .... = end-of-list: Set .0.. .... = and: Not set ..00 .... = Value length: 1 byte: 1 << (0) .... 0... = Reserved: Not set .... .0.. = Reserved: Not set .... ..0. = logical negation: Not set .... ...0 = Match bit: Not set Fragment Flag: 0x04, First fragment .... 0... = Last fragment: Not set .... .1.. = First fragment: Set .... ..0. = Is a fragment: Not set .... ...0 = Don't fragment: Not setActually 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).