esp6.c (f94f3cb37a1c4d44dd2070cc4a6165689bda9c92) | esp6.c (b71d1d426d263b0b6cb5760322efebbfc89d4463) |
---|---|
1/* 2 * Copyright (C)2002 USAGI/WIDE Project 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * --- 416 unchanged lines hidden (view full) --- 425 426 return mtu - 2; 427} 428 429static void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, 430 u8 type, u8 code, int offset, __be32 info) 431{ 432 struct net *net = dev_net(skb->dev); | 1/* 2 * Copyright (C)2002 USAGI/WIDE Project 3 * 4 * This program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2 of the License, or 7 * (at your option) any later version. 8 * --- 416 unchanged lines hidden (view full) --- 425 426 return mtu - 2; 427} 428 429static void esp6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, 430 u8 type, u8 code, int offset, __be32 info) 431{ 432 struct net *net = dev_net(skb->dev); |
433 struct ipv6hdr *iph = (struct ipv6hdr*)skb->data; | 433 const struct ipv6hdr *iph = (const struct ipv6hdr *)skb->data; |
434 struct ip_esp_hdr *esph = (struct ip_esp_hdr *)(skb->data + offset); 435 struct xfrm_state *x; 436 437 if (type != ICMPV6_DEST_UNREACH && 438 type != ICMPV6_PKT_TOOBIG) 439 return; 440 | 434 struct ip_esp_hdr *esph = (struct ip_esp_hdr *)(skb->data + offset); 435 struct xfrm_state *x; 436 437 if (type != ICMPV6_DEST_UNREACH && 438 type != ICMPV6_PKT_TOOBIG) 439 return; 440 |
441 x = xfrm_state_lookup(net, skb->mark, (xfrm_address_t *)&iph->daddr, esph->spi, IPPROTO_ESP, AF_INET6); | 441 x = xfrm_state_lookup(net, skb->mark, (const xfrm_address_t *)&iph->daddr, 442 esph->spi, IPPROTO_ESP, AF_INET6); |
442 if (!x) 443 return; 444 printk(KERN_DEBUG "pmtu discovery on SA ESP/%08x/%pI6\n", 445 ntohl(esph->spi), &iph->daddr); 446 xfrm_state_put(x); 447} 448 449static void esp6_destroy(struct xfrm_state *x) --- 228 unchanged lines hidden --- | 443 if (!x) 444 return; 445 printk(KERN_DEBUG "pmtu discovery on SA ESP/%08x/%pI6\n", 446 ntohl(esph->spi), &iph->daddr); 447 xfrm_state_put(x); 448} 449 450static void esp6_destroy(struct xfrm_state *x) --- 228 unchanged lines hidden --- |