]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
net: Make IP alignment calulations clearer.
authorDavid S. Miller <davem@davemloft.net>
Mon, 22 May 2017 16:27:07 +0000 (12:27 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 22 May 2017 16:27:07 +0000 (12:27 -0400)
commite4eda884db7930cee434828759064b4711604078
treeb4a5875c74a19036e863ac1be67fab65fbd28c09
parent751da2a69b7cc82d83dc310ed7606225f2d6e014
net: Make IP alignment calulations clearer.

The assignmnet:

ip_align = strict ? 2 : NET_IP_ALIGN;

in compare_pkt_ptr_alignment() trips up Coverity because we can only
get to this code when strict is true, therefore ip_align will always
be 2 regardless of NET_IP_ALIGN's value.

So just assign directly to '2' and explain the situation in the
comment above.

Reported-by: "Gustavo A. R. Silva" <garsilva@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
kernel/bpf/verifier.c