Fix setsockopt for setting Traffic Class in IPv6
Fix setsockopt for setting Traffic Class in IPv6

HiOLSR-developers,

For your consideration:

Setting Traffic Class (the counterpart of TOS in IPv4) on OLSR IPv6 packets is currently broken.
The code does not distinguish between the IPv4 and IPv6 cases, but it should, as the required
'level' and 'optname' arguments to setsockopt differ.

I tested this patch by monitoring OLSR IPv6 packets with 'tcpdump -v': it appears to be working.

Note this is for Linux only.

This is my modest contribution to Dave Täht's quest to fix "TOS setting" in IPv6 :-)
See: http://www.bufferbloat.net/issues/249

Thanks,
Ronald

Signed-off-by: Ronald in 't Velt <6f3f56288d5114101db498952bad7462eefe2999@xs4all.nl>

diogomg/olsrd,diogomg/olsrd,diogomg/olsrd-binary-heap,zioproto/olsrd,ninuxorg/olsrd,nolith/olsrd,diogomg/olsrd-binary-heap,diogomg/olsrd,cholin/olsrd,diogomg/olsrd-binary-heap,diogomg/olsrd,sebkur/olsrd,sebkur/olsrd,nolith/olsrd,sebkur/olsrd,nolith/olsrd,diogomg/olsrd,tdz/olsrd,tdz/olsrd,zioproto/olsrd,ninuxorg/olsrd,cholin/olsrd,ninuxorg/olsrd,cholin/olsrd,nolith/olsrd,sebkur/olsrd,zioproto/olsrd,ninuxorg/olsrd,tdz/olsrd,sebkur/olsrd,diogomg/olsrd-binary-heap,zioproto/olsrd,cholin/olsrd,diogomg/olsrd-binary-heap,cholin/olsrd,diogomg/olsrd-binary-heap,sebkur/olsrd,ninuxorg/olsrd,tdz/olsrd,nolith/olsrd,zioproto/olsrd,tdz/olsrd,diogomg/olsrd-binary-heap,diogomg/olsrd,diogomg/olsrd