diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-14 13:29:31 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-14 13:29:31 -0700 |
commit | d985524680b77a1cf90738db9a2d72065a746afa (patch) | |
tree | 101857c3e59f9238b0c7d4bbbf58e46476957387 /net/ipv4/cipso_ipv4.c | |
parent | 2007eafd9df71375d443192bbbe7aa2175992477 (diff) | |
parent | ef954844c7ace62f773f4f23e28d2d915adc419f (diff) | |
download | linux-d985524680b77a1cf90738db9a2d72065a746afa.tar.bz2 |
Merge 4.13-rc5 into char-misc-next
We want the firmware, and other changes, in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv4/cipso_ipv4.c')
-rw-r--r-- | net/ipv4/cipso_ipv4.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/ipv4/cipso_ipv4.c b/net/ipv4/cipso_ipv4.c index c4c6e1969ed0..2ae8f54cb321 100644 --- a/net/ipv4/cipso_ipv4.c +++ b/net/ipv4/cipso_ipv4.c @@ -1523,9 +1523,17 @@ unsigned char *cipso_v4_optptr(const struct sk_buff *skb) int taglen; for (optlen = iph->ihl*4 - sizeof(struct iphdr); optlen > 0; ) { - if (optptr[0] == IPOPT_CIPSO) + switch (optptr[0]) { + case IPOPT_CIPSO: return optptr; - taglen = optptr[1]; + case IPOPT_END: + return NULL; + case IPOPT_NOOP: + taglen = 1; + break; + default: + taglen = optptr[1]; + } optlen -= taglen; optptr += taglen; } |