Another problem: 

If SAN_1_1 is enabled, san.PassSan() will always first try san 1.1 as fallback 
and
also san 1.2. A invalid SAN package will always pass in san 1.2 parsing..

However if the first message received is a normal synchronization message,
we cannot differentiate whether this is a normal synchronization request from
a client or a SAN 1.1 package from a server. It is expected passSAN() should 
fail
if the message is not recognized as a SAN however that does not hold during san
1.2 parsing.

Two approaches I can think of:
1) Strict parsing for SAN 1.2, the 'version' field is the only appropriate 
value for checking,
and since we also support SAN 1.0/1.1, we should check this field with 
1.0/1.1/1.2, if failed
we consider this as an invalid SAN package. The drawback is we might lose 
interoperability
with some devices that implement the protocol wrong (sending a wrong version), 
does this
really exists? And also the invalid message may happens have this field equals 
1.0/1.1/1.2.. 

2) Change PassSan() to take a version parameter (because from the message 
content type we
already know for sure is this message a SAN 1.2 package or possibly SAN 1.1 
package). If it is
a SAN 1.2 package we will not try to think it as a normal synchronization 
package; if it is a SAN
1.1 package we will not try the SAN 1.2 parsing and it will fail during SAN 1.1 
parsing. This means
a slightly change in the API, what do you think?

Best Regards,
Congwu


>-----Original Message-----
>From: [email protected]
>[mailto:[email protected]] On Behalf Of Chen, Congwu
>Sent: Monday, March 01, 2010 1:49 PM
>To: Lukas Zeller
>Cc: Synthesis
>Subject: Re: [os-libsynthesis] SAN 1.0/1.1 support for server mode
>
>Thanks Lukas, here is a problem I encounter:
>
>It's about the MessageID, the first message now is the SAN package
>which need to have a MessageID (=1, I tried 0 but that fails opensync);
>however there is no specific way to tell synthesis server (we have already
>sent a message in this session), thus the first message sent by the engine
>also have a MessaegID (=1), this breaks the specification and fails opensync.
>
>Does it make sense to add a option for this? Does SessionID have the same
>problem?
>
>Best Regards,
>Congwu
>
>>
>
>
>_______________________________________________
>os-libsynthesis mailing list
>[email protected]
>http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis

_______________________________________________
os-libsynthesis mailing list
[email protected]
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis

Reply via email to