Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 59036
b: refs/heads/master
c: cfbba49
h: refs/heads/master
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jul 11, 2007
1 parent 9a61c26 commit d40463f
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4839c52b01ca91be1c62761e08fb3deb3881e857
refs/heads/master: cfbba49d80be6cf8d3872b66fc5421f119843b36
3 changes: 2 additions & 1 deletion trunk/net/ipv4/ip_gre.c
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,8 @@ static int ipgre_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)

max_headroom = LL_RESERVED_SPACE(tdev) + gre_hlen;

if (skb_headroom(skb) < max_headroom || skb_cloned(skb) || skb_shared(skb)) {
if (skb_headroom(skb) < max_headroom || skb_shared(skb)||
(skb_cloned(skb) && !skb_clone_writable(skb, 0))) {
struct sk_buff *new_skb = skb_realloc_headroom(skb, max_headroom);
if (!new_skb) {
ip_rt_put(rt);
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/ipv4/ipip.c
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,8 @@ static int ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
*/
max_headroom = (LL_RESERVED_SPACE(tdev)+sizeof(struct iphdr));

if (skb_headroom(skb) < max_headroom || skb_cloned(skb) || skb_shared(skb)) {
if (skb_headroom(skb) < max_headroom || skb_shared(skb) ||
(skb_cloned(skb) && !skb_clone_writable(skb, 0))) {
struct sk_buff *new_skb = skb_realloc_headroom(skb, max_headroom);
if (!new_skb) {
ip_rt_put(rt);
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/ipv6/ip6_tunnel.c
Original file line number Diff line number Diff line change
Expand Up @@ -883,8 +883,8 @@ static int ip6_tnl_xmit2(struct sk_buff *skb,
*/
max_headroom += LL_RESERVED_SPACE(tdev);

if (skb_headroom(skb) < max_headroom ||
skb_cloned(skb) || skb_shared(skb)) {
if (skb_headroom(skb) < max_headroom || skb_shared(skb) ||
(skb_cloned(skb) && !skb_clone_writable(skb, 0))) {
struct sk_buff *new_skb;

if (!(new_skb = skb_realloc_headroom(skb, max_headroom)))
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/ipv6/sit.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,8 @@ static int ipip6_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
*/
max_headroom = LL_RESERVED_SPACE(tdev)+sizeof(struct iphdr);

if (skb_headroom(skb) < max_headroom || skb_cloned(skb) || skb_shared(skb)) {
if (skb_headroom(skb) < max_headroom || skb_shared(skb) ||
(skb_cloned(skb) && !skb_clone_writable(skb, 0))) {
struct sk_buff *new_skb = skb_realloc_headroom(skb, max_headroom);
if (!new_skb) {
ip_rt_put(rt);
Expand Down

0 comments on commit d40463f

Please sign in to comment.