New commits:
commit b362c591d1059a8bbf4f51c840245e0b193fb338
Author: Paul Wouters <[email protected]>
Date: Sun Jun 3 23:39:16 2018 -0400
testing: fixup output for new IPsec SA priority numbers
commit 169b2bc9ba0af029371f0d048443399dfe73a272
Author: D. Hugh Redelmeier <[email protected]>
Date: Sun Jun 3 23:36:44 2018 -0400
pluto: fix IPsec SA priority calculation
- not enough priority bits were allocated for src and for dst. The max
value of each is 128 so 7 bit is too small.
- mixing protocol weight and port weight seemed confusing. I separated
them, at the cost of an extra bit.
- I carefully typed things uint32_t or unsigned (instead of the default
"int"). This probably doesn't affect actual results.
- the port weighting calculation referenced c->spd.this.port twice in
each test. I assume that the second should be c->spd.that.port.
Fix my version if I am wrong.
- I print priorities in hex since it makes each field easier to
discern. I use the correct formatting macro for uint32_t.
There are likely other places where a priority is still printed the
old way and they need to be updated.
- the final calculation of prio seemed to have a 2<<16 in it that I
didn't understand. So I deleted it. Possibly rash.
Signed-off-by: Paul Wouters <[email protected]>
_______________________________________________
Swan-commit mailing list
[email protected]
https://lists.libreswan.org/mailman/listinfo/swan-commit