Question #675656 on rohc changed:
https://answers.launchpad.net/rohc/+question/675656

    Status: Open => Answered

Didier Barvaux proposed the following answer:
yiyuechan,

According to the code snippet that you included in your question, you
seem to use a 1.7.x version of the ROHC library. The 1.7.x releases were
released in 2014. They are very outdated. Please upgrade to  the latest
version 2.2.0.

Back on your problem. You are right. The code is incomplete. It should
count the number of IPv4 headers with value(RND) = 0 and decide which
UOR-2* packet to use in consequence. Such a code is available a few
lines later : https://github.com/didier-
barvaux/rohc/blob/1.7.x/src/comp/c_rtp.c#L571  . Newer versions up to
2.2.0 contain the very same mistake.

I was surprised not to have found such a bug since ages despite a large corpus 
of network flow for testing and fuzzing. So I analyzed the code further and I 
discovered that that code is in fact dead code :
 * The only STATIC field for the RFC3095-based profiles is the IPv4 Protocol or 
IPv6 Next Header field. A change of value requires an IR, IR-DYN or UOR-2 
packet.
 * The Protocol/NH field is however part of the definition of one ROHC context, 
so a change of value would cause a change of context. A given context can never 
see a change of Protocol or NH.
 * The code that checks for Protocol/NH changes and forces an IR, IR-DYN or 
UOR-2 packet is therefore never used. This is dead code. It can be removed 
safely.

So, I removed the related code on the master branch (it will be released
in the next 2.3.0 release): https://github.com/didier-
barvaux/rohc/commit/7f2810441a89433261926e6269d122242706b6fa

Regards,
Didier

-- 
You received this question notification because your team ROHC Team is
an answer contact for rohc.

_______________________________________________
Mailing list: https://launchpad.net/~rohc
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~rohc
More help   : https://help.launchpad.net/ListHelp

Reply via email to