IPV6 Fixes
Subsystems (4)
PATCH 1/1 IPV6 Fixes
Hello.
Please pull following changesets from <bk://bk.skbuff.net:20609/linux-2.6-inet6-20040928/>
Thanks.
HEADLINES
---------
[email protected], 2004-09-28 11:25:48+09:00, [email protected]
[IPV6] Fix routing header handling.
[email protected], 2004-09-28 13:55:20+09:00, [email protected]
[IPV6] Fix skb allocation size for RST and ACK.
CHANGESETS
----------
[email protected], 2004-09-28 11:25:48+09:00, [email protected]
[IPV6] Fix routing header handling.
We need to rewind skb pointers when we forward a packet to other host because dst_input() assumes that skb->data points head of ipv6 protocol header.
net/ipv6/exthdrs.c +3 -0
@@ -314,9 +314,11 @@dst_release (xchg (&skb->dst,NULL ));ip6_route_input (skb);if (skb->dst->error) { +skb_push (skb, skb->data - skb->nh.raw);dst_input (skb);return -1 ; } +if (skb->dst->dev->flags&IFF_LOOPBACK ) {if (skb->nh.ipv6h->hop_limit <=1 ) {IP6_INC_STATS_BH (IPSTATS_MIB_INHDRERRORS );
@@ -329,6 +331,7 @@ goto looped_back; } +skb_push (skb, skb->data - skb->nh.raw);dst_input (skb);return -1 ; }
[email protected], 2004-09-28 13:55:20+09:00, [email protected]
[IPV6] Fix skb allocation size for RST and ACK.
net/ipv6/tcp_ipv6.c +9 -7
@@ -1003,11 +1003,12 @@* and then put it into the queue to be sent. */ - buff =alloc_skb (MAX_HEADER +sizeof (struct ipv6hdr ),GFP_ATOMIC ); + buff =alloc_skb (MAX_HEADER +sizeof (struct ipv6hdr ) +sizeof (struct tcphdr ), +GFP_ATOMIC );if (buff ==NULL )return ; -skb_reserve (buff,MAX_HEADER +sizeof (struct ipv6hdr )); +skb_reserve (buff,MAX_HEADER +sizeof (struct ipv6hdr ) +sizeof (struct tcphdr )); t1 = (struct tcphdr *)skb_push (buff,sizeof (struct tcphdr ));
@@ -1065,14 +1066,15 @@struct flowi fl;int tot_len =sizeof (struct tcphdr ); - buff =alloc_skb (MAX_HEADER +sizeof (struct ipv6hdr ),GFP_ATOMIC ); +if (ts) + tot_len +=3 *4 ; + + buff =alloc_skb (MAX_HEADER +sizeof (struct ipv6hdr ) + tot_len, +GFP_ATOMIC );if (buff ==NULL )return ; -skb_reserve (buff,MAX_HEADER +sizeof (struct ipv6hdr )); - -if (ts) - tot_len +=3 *4 ; +skb_reserve (buff,MAX_HEADER +sizeof (struct ipv6hdr ) + tot_len); t1 = (struct tcphdr *)skb_push (buff,tot_len);
Signature · 2 lines
Hideaki YOSHIFUJI @ USAGI Project <[email protected]> GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
David S. Miller
maintainerQuoted 1 line · On Tue, 28 Sep 2004 15:23:06 +0900 (JST) YOSHIFUJI Hideaki / $B5HF#1QL@(B…
bk://bk.skbuff.net:20609/linux-2.6-inet6-20040928/
...
Quoted 1 line
bk://bk.skbuff.net:20428/linux-2.4-inet6-20040928/
Both pulled, thank you Yoshifuji-san.