#define IF_GET_IFACE 0x0001 /* for querying only */
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
-@@ -1752,6 +1752,10 @@ static inline int pskb_trim(struct sk_bu
+@@ -1757,6 +1757,10 @@ static inline int pskb_trim(struct sk_bu
return (len < skb->len) ? __pskb_trim(skb, len) : 0;
}
/**
* pskb_trim_unique - remove end from a paged unique (not cloned) buffer
* @skb: buffer to alter
-@@ -1854,16 +1858,6 @@ static inline struct sk_buff *dev_alloc_
+@@ -1877,16 +1881,6 @@ static inline struct sk_buff *dev_alloc_
}
help
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -2361,9 +2361,19 @@ int dev_hard_start_xmit(struct sk_buff *
+@@ -2364,9 +2364,19 @@ int dev_hard_start_xmit(struct sk_buff *
if (!list_empty(&ptype_all))
dev_queue_xmit_nit(skb, dev);
if (rc == NETDEV_TX_OK)
txq_trans_update(txq);
return rc;
-@@ -2386,9 +2396,19 @@ gso:
+@@ -2389,9 +2399,19 @@ gso:
if (!list_empty(&ptype_all))
dev_queue_xmit_nit(nskb, dev);
+ struct sk_buff *skb = __netdev_alloc_skb(dev, length + NET_IP_ALIGN, gfp);
+
+#ifdef CONFIG_ETHERNET_PACKET_MANGLE
-+ if (dev->priv_flags & IFF_NO_IP_ALIGN)
++ if (dev && (dev->priv_flags & IFF_NO_IP_ALIGN))
+ return skb;
+#endif
+