mip6.c (9c70220b73908f64792422a2c39c593c4792f2c5) | mip6.c (27a884dc3cb63b93c2b3b643f5b31eed5f8a4d26) |
---|---|
1/* 2 * Copyright (C)2003-2006 Helsinki University of Technology 3 * Copyright (C)2003-2006 USAGI/WIDE Project 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 246 unchanged lines hidden (view full) --- 255 256static int mip6_destopt_offset(struct xfrm_state *x, struct sk_buff *skb, 257 u8 **nexthdr) 258{ 259 u16 offset = sizeof(struct ipv6hdr); 260 struct ipv6_opt_hdr *exthdr = 261 (struct ipv6_opt_hdr *)(ipv6_hdr(skb) + 1); 262 const unsigned char *nh = skb_network_header(skb); | 1/* 2 * Copyright (C)2003-2006 Helsinki University of Technology 3 * Copyright (C)2003-2006 USAGI/WIDE Project 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 246 unchanged lines hidden (view full) --- 255 256static int mip6_destopt_offset(struct xfrm_state *x, struct sk_buff *skb, 257 u8 **nexthdr) 258{ 259 u16 offset = sizeof(struct ipv6hdr); 260 struct ipv6_opt_hdr *exthdr = 261 (struct ipv6_opt_hdr *)(ipv6_hdr(skb) + 1); 262 const unsigned char *nh = skb_network_header(skb); |
263 unsigned int packet_len = skb->tail - nh; | 263 unsigned int packet_len = skb->tail - skb->network_header; |
264 int found_rhdr = 0; 265 266 *nexthdr = &ipv6_hdr(skb)->nexthdr; 267 268 while (offset + 1 <= packet_len) { 269 270 switch (**nexthdr) { 271 case NEXTHDR_HOP: --- 115 unchanged lines hidden (view full) --- 387 388static int mip6_rthdr_offset(struct xfrm_state *x, struct sk_buff *skb, 389 u8 **nexthdr) 390{ 391 u16 offset = sizeof(struct ipv6hdr); 392 struct ipv6_opt_hdr *exthdr = 393 (struct ipv6_opt_hdr *)(ipv6_hdr(skb) + 1); 394 const unsigned char *nh = skb_network_header(skb); | 264 int found_rhdr = 0; 265 266 *nexthdr = &ipv6_hdr(skb)->nexthdr; 267 268 while (offset + 1 <= packet_len) { 269 270 switch (**nexthdr) { 271 case NEXTHDR_HOP: --- 115 unchanged lines hidden (view full) --- 387 388static int mip6_rthdr_offset(struct xfrm_state *x, struct sk_buff *skb, 389 u8 **nexthdr) 390{ 391 u16 offset = sizeof(struct ipv6hdr); 392 struct ipv6_opt_hdr *exthdr = 393 (struct ipv6_opt_hdr *)(ipv6_hdr(skb) + 1); 394 const unsigned char *nh = skb_network_header(skb); |
395 unsigned int packet_len = skb->tail - nh; | 395 unsigned int packet_len = skb->tail - skb->network_header; |
396 int found_rhdr = 0; 397 398 *nexthdr = &ipv6_hdr(skb)->nexthdr; 399 400 while (offset + 1 <= packet_len) { 401 402 switch (**nexthdr) { 403 case NEXTHDR_HOP: --- 97 unchanged lines hidden --- | 396 int found_rhdr = 0; 397 398 *nexthdr = &ipv6_hdr(skb)->nexthdr; 399 400 while (offset + 1 <= packet_len) { 401 402 switch (**nexthdr) { 403 case NEXTHDR_HOP: --- 97 unchanged lines hidden --- |