IPVS fixes for v3.10

This series fixes a number of problems which were flagged by
static analysis.

The first two patches in the series resolve problems that
have been introduced since v3.9.

* ipvs: fix sparse warnings for ip_vs_conn listing
* ipvs: properly dereference dest_dst in ip_vs_forget_dev

The remaining patches resolve problems that have been around for longer.

It is not obvious to me that any of the problems resolved by
these patches manifest as bugs.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iQIcBAABAgAGBQJRdfbPAAoJENfPZGlqN0++XwAP/3neiw2+d7y45y00acYEw2li
5Puc1bvo3Sb+Iyn6k1le+wERLau1jGZFeSB0ST68Q1/S5JOTAekzs3Hssw+xK2BK
3aQbtelu4z2gDQH0tfrPkp6ej0Pq8u6bzm8Ezw6W9/cJMV5biyzffvPIb0LTq8La
om02lXXIe7rc7iGh7u7TETRCJb85pe1/HROvHiVPzaJPG5NNxCFSm8k/KetVJX2z
CQE5s0FWvRaz2+8ziHgACwNaWXzcoogrjE6yBvhoQNV4wzOiP8bs4wyt/s6zTvlT
YjsRbdjj4NG246HNGsl/YA2jz4eqqfVDE739InVy0ZogYM1MI0pynO466FOFHUwF
WXj2VXgRXIZJKGgUUXhBenxybcmu3ZIbF/filN8oclwjDMwpHHbXoyJQnfNHMv1s
n/wmToF8MERC7QWEN7yMzELmtRgS2N1Z1LEehqrjivgBLd8zobyhUZTJLlUysUsE
epVYYAprqnwzuysqq2A7RTw8fd+ItYbcckVr+D8PpDgUsq1uzl/yujqRkDoPxa6B
G1XatpT7io36y2pytbdJCRNf6Kc8LNsSzpj78jYbWDCB/tNlpj6biJhGQ2QVmMY7
J5/J7vQfGEkF7pjO/pGjL3GqQxhZrA00bHZYX+09DV8v88MIjkG0JswnjBFQedTF
czBkWU5Kw056jGsY+8M1
=VIew
-----END PGP SIGNATURE-----
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>
1 file changed