]> git.baikalelectronics.ru Git - kernel.git/commit
ipvs: Use network byte order for sync message size
authorSimon Horman <horms@verge.net.au>
Fri, 19 Apr 2013 01:43:44 +0000 (10:43 +0900)
committerSimon Horman <horms@verge.net.au>
Tue, 23 Apr 2013 02:43:06 +0000 (11:43 +0900)
commitefefe0809549170396c56312aa377dd7d9c0d9ae
treec6f67709dac0112b4bd59b5a861a3008fc67ec7f
parentf0103db09caaa7568d02fcd36a3a63a595cf9509
ipvs: Use network byte order for sync message size

struct ip_vs_sync_mesg and ip_vs_sync_mesg_v0 are both sent across the wire
and used internally to store IPVS synchronisation messages.

Up until now the scheme used has been to convert the size field
to network byte order before sending a message on the wire and
convert it to host byte order when sending a message.

This patch changes that scheme to always treat the field
as being network byte order. This seems appropriate as
the structure is sent across the wire. And by consistently
treating the field has network byte order it is now possible
to take advantage of sparse to flag any future miss-use.

Acked-by: Julian Anastasov <ja@ssi.bg>
Acked-by: Hans Schillstrom <hans@schillstrom.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
net/netfilter/ipvs/ip_vs_sync.c