aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/ip_output.c3
-rw-r--r--net/ipv6/ip6_output.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 83c73bab2c3d..d54abc097800 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1045,7 +1045,8 @@ alloc_new_skb:
1045 if (copy > length) 1045 if (copy > length)
1046 copy = length; 1046 copy = length;
1047 1047
1048 if (!(rt->dst.dev->features&NETIF_F_SG)) { 1048 if (!(rt->dst.dev->features&NETIF_F_SG) &&
1049 skb_tailroom(skb) >= copy) {
1049 unsigned int off; 1050 unsigned int off;
1050 1051
1051 off = skb->len; 1052 off = skb->len;
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
index 2e891d2c30ef..7b6d1689087b 100644
--- a/net/ipv6/ip6_output.c
+++ b/net/ipv6/ip6_output.c
@@ -1503,7 +1503,8 @@ alloc_new_skb:
1503 if (copy > length) 1503 if (copy > length)
1504 copy = length; 1504 copy = length;
1505 1505
1506 if (!(rt->dst.dev->features&NETIF_F_SG)) { 1506 if (!(rt->dst.dev->features&NETIF_F_SG) &&
1507 skb_tailroom(skb) >= copy) {
1507 unsigned int off; 1508 unsigned int off;
1508 1509
1509 off = skb->len; 1510 off = skb->len;