summaryrefslogtreecommitdiffstats
path: root/src/net/ipv6.c
diff options
context:
space:
mode:
authorMichael Brown2013-10-23 14:05:23 +0200
committerMichael Brown2013-10-23 15:07:56 +0200
commit595e32d7abca1292c2b2a0cfebf50e31eb287676 (patch)
tree22e7ae1fd0b4dc0c780834700fd8f3da1cbfb6d2 /src/net/ipv6.c
parent[intel] Add Intel I217 Gigabit Ethernet PCI ID (diff)
downloadipxe-595e32d7abca1292c2b2a0cfebf50e31eb287676.tar.gz
ipxe-595e32d7abca1292c2b2a0cfebf50e31eb287676.tar.xz
ipxe-595e32d7abca1292c2b2a0cfebf50e31eb287676.zip
[ipv6] Handle IPv6 option length correctly
The IPv6 option length field represents the length of the option data field, not the overall length of the option. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/ipv6.c')
-rw-r--r--src/net/ipv6.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/ipv6.c b/src/net/ipv6.c
index 08e8e100..c5f8d2d9 100644
--- a/src/net/ipv6.c
+++ b/src/net/ipv6.c
@@ -250,7 +250,7 @@ static int ipv6_check_options ( struct ipv6_header *iphdr,
if ( option->type == IPV6_OPT_PAD1 ) {
option = ( ( ( void * ) option ) + 1 );
} else {
- option = ( ( ( void * ) option ) + option->len );
+ option = ( ( ( void * ) option->value ) + option->len );
}
}
return 0;