git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' into forward-port
[sliver-openvswitch.git]
/
datapath
/
vport-internal_dev.c
diff --git
a/datapath/vport-internal_dev.c
b/datapath/vport-internal_dev.c
index
46b78d2
..
4dc2eb4
100644
(file)
--- a/
datapath/vport-internal_dev.c
+++ b/
datapath/vport-internal_dev.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2007-2012 Nicira
Networks
.
+ * Copyright (c) 2007-2012 Nicira
, Inc
.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of version 2 of the GNU General Public
@@
-25,6
+25,9
@@
#include <linux/skbuff.h>
#include <linux/version.h>
#include <linux/skbuff.h>
#include <linux/version.h>
+#include <net/dst.h>
+#include <net/xfrm.h>
+
#include "checksum.h"
#include "datapath.h"
#include "vlan.h"
#include "checksum.h"
#include "datapath.h"
#include "vlan.h"
@@
-87,6
+90,9
@@
static int internal_dev_mac_addr(struct net_device *dev, void *p)
if (!is_valid_ether_addr(addr->sa_data))
return -EADDRNOTAVAIL;
if (!is_valid_ether_addr(addr->sa_data))
return -EADDRNOTAVAIL;
+#ifdef NET_ADDR_RANDOM
+ dev->addr_assign_type &= ~NET_ADDR_RANDOM;
+#endif
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
return 0;
}
memcpy(dev->dev_addr, addr->sa_data, dev->addr_len);
return 0;
}
@@
-213,7
+219,7
@@
static void do_setup(struct net_device *netdev)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)
netdev->hw_features = netdev->features & ~NETIF_F_LLTX;
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)
netdev->hw_features = netdev->features & ~NETIF_F_LLTX;
#endif
-
random_ether_addr(netdev->dev_addr
);
+
eth_hw_addr_random(netdev
);
}
static struct vport *internal_dev_create(const struct vport_parms *parms)
}
static struct vport *internal_dev_create(const struct vport_parms *parms)
@@
-286,6
+292,11
@@
static int internal_dev_recv(struct vport *vport, struct sk_buff *skb)
#endif
len = skb->len;
#endif
len = skb->len;
+
+ skb_dst_drop(skb);
+ nf_reset(skb);
+ secpath_reset(skb);
+
skb->dev = netdev;
skb->pkt_type = PACKET_HOST;
skb->protocol = eth_type_trans(skb, netdev);
skb->dev = netdev;
skb->pkt_type = PACKET_HOST;
skb->protocol = eth_type_trans(skb, netdev);