Correctly use AS_SEQUENCE in path attributes.
The spec requires route originators to specify their ASN
in an AS_SEQUENCE path segment (which makes sense if you
think about it... AS_SET encodes a path that goes "via one
of these ASNs", which is impossible fo the *originating* ASN).
Fixes
@@ -338,7 +338,7 @@ func encodePathAttrs(b *bytes.Buffer, asn uint32, defaultNextHop net.IP, adv *Ad
} else {
b.Write([]byte{
6, // len
- 1, // AS_SET
+ 2, // AS_SEQUENCE
1, // len (in number of ASes)
})
if err := binary.Write(b, binary.BigEndian, asn); err != nil {
