|
@@ -931,14 +931,23 @@ out_put_peer:
|
|
|
|
|
|
static int ip_error(struct sk_buff *skb)
|
|
static int ip_error(struct sk_buff *skb)
|
|
{
|
|
{
|
|
- struct in_device *in_dev = __in_dev_get_rcu(skb->dev);
|
|
|
|
struct rtable *rt = skb_rtable(skb);
|
|
struct rtable *rt = skb_rtable(skb);
|
|
|
|
+ struct net_device *dev = skb->dev;
|
|
|
|
+ struct in_device *in_dev;
|
|
struct inet_peer *peer;
|
|
struct inet_peer *peer;
|
|
unsigned long now;
|
|
unsigned long now;
|
|
struct net *net;
|
|
struct net *net;
|
|
bool send;
|
|
bool send;
|
|
int code;
|
|
int code;
|
|
|
|
|
|
|
|
+ if (netif_is_l3_master(skb->dev)) {
|
|
|
|
+ dev = __dev_get_by_index(dev_net(skb->dev), IPCB(skb)->iif);
|
|
|
|
+ if (!dev)
|
|
|
|
+ goto out;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ in_dev = __in_dev_get_rcu(dev);
|
|
|
|
+
|
|
/* IP on this device is disabled. */
|
|
/* IP on this device is disabled. */
|
|
if (!in_dev)
|
|
if (!in_dev)
|
|
goto out;
|
|
goto out;
|