Merge lp:~gandelman-a/ubuntu/precise/openvswitch/lp1044318 into lp:ubuntu/precise-proposed/openvswitch
- Precise (12.04)
- lp1044318
- Merge into precise-proposed
Proposed by
Adam Gandelman
Status: | Merged |
---|---|
Merge reported by: | Stéphane Graber |
Merged at revision: | not available |
Proposed branch: | lp:~gandelman-a/ubuntu/precise/openvswitch/lp1044318 |
Merge into: | lp:ubuntu/precise-proposed/openvswitch |
Diff against target: |
454 lines (+402/-0) 6 files modified
.pc/applied-patches (+1/-0) .pc/lp1044318-Reset-upper-layer-protocol-info.patch/datapath/vport-internal_dev.c (+330/-0) datapath/vport-internal_dev.c (+8/-0) debian/changelog (+10/-0) debian/patches/lp1044318-Reset-upper-layer-protocol-info.patch (+52/-0) debian/patches/series (+1/-0) |
To merge this branch: | bzr merge lp:~gandelman-a/ubuntu/precise/openvswitch/lp1044318 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Development Team | Pending | ||
Review via email: mp+123379@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
- 27. By Adam Gandelman
-
* Temporary PPA build to allow early RC1 testing while fix makes its way
out to precise-updates.
- debian/patches/ lp1044318- Reset-upper- layer-protocol- info.patch: Cherry - 28. By Adam Gandelman
-
Add .pc/lp1044318-
Reset-upper- layer-protocol- info.patch.
Revision history for this message
Stéphane Graber (stgraber) wrote : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.pc/applied-patches' | |||
2 | --- .pc/applied-patches 2012-07-26 11:23:06 +0000 | |||
3 | +++ .pc/applied-patches 2012-09-12 17:06:26 +0000 | |||
4 | @@ -1,2 +1,3 @@ | |||
5 | 1 | update_odputil_key_bytes.patch | 1 | update_odputil_key_bytes.patch |
6 | 2 | fix_ftbfs_big_endian.patch | 2 | fix_ftbfs_big_endian.patch |
7 | 3 | lp1044318-Reset-upper-layer-protocol-info.patch | ||
8 | 3 | 4 | ||
9 | === added directory '.pc/lp1044318-Reset-upper-layer-protocol-info.patch' | |||
10 | === added file '.pc/lp1044318-Reset-upper-layer-protocol-info.patch/.timestamp' | |||
11 | === added directory '.pc/lp1044318-Reset-upper-layer-protocol-info.patch/datapath' | |||
12 | === added file '.pc/lp1044318-Reset-upper-layer-protocol-info.patch/datapath/vport-internal_dev.c' | |||
13 | --- .pc/lp1044318-Reset-upper-layer-protocol-info.patch/datapath/vport-internal_dev.c 1970-01-01 00:00:00 +0000 | |||
14 | +++ .pc/lp1044318-Reset-upper-layer-protocol-info.patch/datapath/vport-internal_dev.c 2012-09-12 17:06:26 +0000 | |||
15 | @@ -0,0 +1,330 @@ | |||
16 | 1 | /* | ||
17 | 2 | * Copyright (c) 2007-2011 Nicira Networks. | ||
18 | 3 | * | ||
19 | 4 | * This program is free software; you can redistribute it and/or | ||
20 | 5 | * modify it under the terms of version 2 of the GNU General Public | ||
21 | 6 | * License as published by the Free Software Foundation. | ||
22 | 7 | * | ||
23 | 8 | * This program is distributed in the hope that it will be useful, but | ||
24 | 9 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
25 | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
26 | 11 | * General Public License for more details. | ||
27 | 12 | * | ||
28 | 13 | * You should have received a copy of the GNU General Public License | ||
29 | 14 | * along with this program; if not, write to the Free Software | ||
30 | 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | ||
31 | 16 | * 02110-1301, USA | ||
32 | 17 | */ | ||
33 | 18 | |||
34 | 19 | #include <linux/hardirq.h> | ||
35 | 20 | #include <linux/if_vlan.h> | ||
36 | 21 | #include <linux/kernel.h> | ||
37 | 22 | #include <linux/netdevice.h> | ||
38 | 23 | #include <linux/etherdevice.h> | ||
39 | 24 | #include <linux/ethtool.h> | ||
40 | 25 | #include <linux/skbuff.h> | ||
41 | 26 | #include <linux/version.h> | ||
42 | 27 | |||
43 | 28 | #include "checksum.h" | ||
44 | 29 | #include "datapath.h" | ||
45 | 30 | #include "vlan.h" | ||
46 | 31 | #include "vport-generic.h" | ||
47 | 32 | #include "vport-internal_dev.h" | ||
48 | 33 | #include "vport-netdev.h" | ||
49 | 34 | |||
50 | 35 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0) | ||
51 | 36 | #define HAVE_NET_DEVICE_OPS | ||
52 | 37 | #endif | ||
53 | 38 | |||
54 | 39 | struct internal_dev { | ||
55 | 40 | struct vport *vport; | ||
56 | 41 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) | ||
57 | 42 | struct net_device_stats stats; | ||
58 | 43 | #endif | ||
59 | 44 | }; | ||
60 | 45 | |||
61 | 46 | static struct internal_dev *internal_dev_priv(struct net_device *netdev) | ||
62 | 47 | { | ||
63 | 48 | return netdev_priv(netdev); | ||
64 | 49 | } | ||
65 | 50 | |||
66 | 51 | /* This function is only called by the kernel network layer.*/ | ||
67 | 52 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) | ||
68 | 53 | static struct rtnl_link_stats64 *internal_dev_get_stats(struct net_device *netdev, | ||
69 | 54 | struct rtnl_link_stats64 *stats) | ||
70 | 55 | { | ||
71 | 56 | #else | ||
72 | 57 | static struct net_device_stats *internal_dev_sys_stats(struct net_device *netdev) | ||
73 | 58 | { | ||
74 | 59 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22) | ||
75 | 60 | struct net_device_stats *stats = &internal_dev_priv(netdev)->stats; | ||
76 | 61 | #else | ||
77 | 62 | struct net_device_stats *stats = &netdev->stats; | ||
78 | 63 | #endif | ||
79 | 64 | #endif | ||
80 | 65 | struct vport *vport = ovs_internal_dev_get_vport(netdev); | ||
81 | 66 | struct ovs_vport_stats vport_stats; | ||
82 | 67 | |||
83 | 68 | ovs_vport_get_stats(vport, &vport_stats); | ||
84 | 69 | |||
85 | 70 | /* The tx and rx stats need to be swapped because the | ||
86 | 71 | * switch and host OS have opposite perspectives. */ | ||
87 | 72 | stats->rx_packets = vport_stats.tx_packets; | ||
88 | 73 | stats->tx_packets = vport_stats.rx_packets; | ||
89 | 74 | stats->rx_bytes = vport_stats.tx_bytes; | ||
90 | 75 | stats->tx_bytes = vport_stats.rx_bytes; | ||
91 | 76 | stats->rx_errors = vport_stats.tx_errors; | ||
92 | 77 | stats->tx_errors = vport_stats.rx_errors; | ||
93 | 78 | stats->rx_dropped = vport_stats.tx_dropped; | ||
94 | 79 | stats->tx_dropped = vport_stats.rx_dropped; | ||
95 | 80 | |||
96 | 81 | return stats; | ||
97 | 82 | } | ||
98 | 83 | |||
99 | 84 | static int internal_dev_mac_addr(struct net_device *dev, void *p) | ||
100 | 85 | { | ||
101 | 86 | struct sockaddr *addr = p; | ||
102 | 87 | |||
103 | 88 | if (!is_valid_ether_addr(addr->sa_data)) | ||
104 | 89 | return -EADDRNOTAVAIL; | ||
105 | 90 | memcpy(dev->dev_addr, addr->sa_data, dev->addr_len); | ||
106 | 91 | return 0; | ||
107 | 92 | } | ||
108 | 93 | |||
109 | 94 | /* Called with rcu_read_lock_bh. */ | ||
110 | 95 | static int internal_dev_xmit(struct sk_buff *skb, struct net_device *netdev) | ||
111 | 96 | { | ||
112 | 97 | if (unlikely(compute_ip_summed(skb, true))) { | ||
113 | 98 | kfree_skb(skb); | ||
114 | 99 | return 0; | ||
115 | 100 | } | ||
116 | 101 | |||
117 | 102 | vlan_copy_skb_tci(skb); | ||
118 | 103 | OVS_CB(skb)->flow = NULL; | ||
119 | 104 | |||
120 | 105 | rcu_read_lock(); | ||
121 | 106 | ovs_vport_receive(internal_dev_priv(netdev)->vport, skb); | ||
122 | 107 | rcu_read_unlock(); | ||
123 | 108 | return 0; | ||
124 | 109 | } | ||
125 | 110 | |||
126 | 111 | static int internal_dev_open(struct net_device *netdev) | ||
127 | 112 | { | ||
128 | 113 | netif_start_queue(netdev); | ||
129 | 114 | return 0; | ||
130 | 115 | } | ||
131 | 116 | |||
132 | 117 | static int internal_dev_stop(struct net_device *netdev) | ||
133 | 118 | { | ||
134 | 119 | netif_stop_queue(netdev); | ||
135 | 120 | return 0; | ||
136 | 121 | } | ||
137 | 122 | |||
138 | 123 | static void internal_dev_getinfo(struct net_device *netdev, | ||
139 | 124 | struct ethtool_drvinfo *info) | ||
140 | 125 | { | ||
141 | 126 | strcpy(info->driver, "openvswitch"); | ||
142 | 127 | } | ||
143 | 128 | |||
144 | 129 | static const struct ethtool_ops internal_dev_ethtool_ops = { | ||
145 | 130 | .get_drvinfo = internal_dev_getinfo, | ||
146 | 131 | .get_link = ethtool_op_get_link, | ||
147 | 132 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39) | ||
148 | 133 | .get_sg = ethtool_op_get_sg, | ||
149 | 134 | .set_sg = ethtool_op_set_sg, | ||
150 | 135 | .get_tx_csum = ethtool_op_get_tx_csum, | ||
151 | 136 | .set_tx_csum = ethtool_op_set_tx_hw_csum, | ||
152 | 137 | .get_tso = ethtool_op_get_tso, | ||
153 | 138 | .set_tso = ethtool_op_set_tso, | ||
154 | 139 | #endif | ||
155 | 140 | }; | ||
156 | 141 | |||
157 | 142 | static int internal_dev_change_mtu(struct net_device *netdev, int new_mtu) | ||
158 | 143 | { | ||
159 | 144 | if (new_mtu < 68) | ||
160 | 145 | return -EINVAL; | ||
161 | 146 | |||
162 | 147 | netdev->mtu = new_mtu; | ||
163 | 148 | return 0; | ||
164 | 149 | } | ||
165 | 150 | |||
166 | 151 | static int internal_dev_do_ioctl(struct net_device *dev, | ||
167 | 152 | struct ifreq *ifr, int cmd) | ||
168 | 153 | { | ||
169 | 154 | if (ovs_dp_ioctl_hook) | ||
170 | 155 | return ovs_dp_ioctl_hook(dev, ifr, cmd); | ||
171 | 156 | |||
172 | 157 | return -EOPNOTSUPP; | ||
173 | 158 | } | ||
174 | 159 | |||
175 | 160 | static void internal_dev_destructor(struct net_device *dev) | ||
176 | 161 | { | ||
177 | 162 | struct vport *vport = ovs_internal_dev_get_vport(dev); | ||
178 | 163 | |||
179 | 164 | ovs_vport_free(vport); | ||
180 | 165 | free_netdev(dev); | ||
181 | 166 | } | ||
182 | 167 | |||
183 | 168 | #ifdef HAVE_NET_DEVICE_OPS | ||
184 | 169 | static const struct net_device_ops internal_dev_netdev_ops = { | ||
185 | 170 | .ndo_open = internal_dev_open, | ||
186 | 171 | .ndo_stop = internal_dev_stop, | ||
187 | 172 | .ndo_start_xmit = internal_dev_xmit, | ||
188 | 173 | .ndo_set_mac_address = internal_dev_mac_addr, | ||
189 | 174 | .ndo_do_ioctl = internal_dev_do_ioctl, | ||
190 | 175 | .ndo_change_mtu = internal_dev_change_mtu, | ||
191 | 176 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36) | ||
192 | 177 | .ndo_get_stats64 = internal_dev_get_stats, | ||
193 | 178 | #else | ||
194 | 179 | .ndo_get_stats = internal_dev_sys_stats, | ||
195 | 180 | #endif | ||
196 | 181 | }; | ||
197 | 182 | #endif | ||
198 | 183 | |||
199 | 184 | static void do_setup(struct net_device *netdev) | ||
200 | 185 | { | ||
201 | 186 | ether_setup(netdev); | ||
202 | 187 | |||
203 | 188 | #ifdef HAVE_NET_DEVICE_OPS | ||
204 | 189 | netdev->netdev_ops = &internal_dev_netdev_ops; | ||
205 | 190 | #else | ||
206 | 191 | netdev->do_ioctl = internal_dev_do_ioctl; | ||
207 | 192 | netdev->get_stats = internal_dev_sys_stats; | ||
208 | 193 | netdev->hard_start_xmit = internal_dev_xmit; | ||
209 | 194 | netdev->open = internal_dev_open; | ||
210 | 195 | netdev->stop = internal_dev_stop; | ||
211 | 196 | netdev->set_mac_address = internal_dev_mac_addr; | ||
212 | 197 | netdev->change_mtu = internal_dev_change_mtu; | ||
213 | 198 | #endif | ||
214 | 199 | |||
215 | 200 | netdev->priv_flags &= ~IFF_TX_SKB_SHARING; | ||
216 | 201 | netdev->destructor = internal_dev_destructor; | ||
217 | 202 | SET_ETHTOOL_OPS(netdev, &internal_dev_ethtool_ops); | ||
218 | 203 | netdev->tx_queue_len = 0; | ||
219 | 204 | |||
220 | 205 | netdev->features = NETIF_F_LLTX | NETIF_F_SG | NETIF_F_FRAGLIST | | ||
221 | 206 | NETIF_F_HIGHDMA | NETIF_F_HW_CSUM | NETIF_F_TSO; | ||
222 | 207 | |||
223 | 208 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27) | ||
224 | 209 | netdev->vlan_features = netdev->features; | ||
225 | 210 | netdev->features |= NETIF_F_HW_VLAN_TX; | ||
226 | 211 | #endif | ||
227 | 212 | |||
228 | 213 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39) | ||
229 | 214 | netdev->hw_features = netdev->features & ~NETIF_F_LLTX; | ||
230 | 215 | #endif | ||
231 | 216 | random_ether_addr(netdev->dev_addr); | ||
232 | 217 | } | ||
233 | 218 | |||
234 | 219 | static struct vport *internal_dev_create(const struct vport_parms *parms) | ||
235 | 220 | { | ||
236 | 221 | struct vport *vport; | ||
237 | 222 | struct netdev_vport *netdev_vport; | ||
238 | 223 | struct internal_dev *internal_dev; | ||
239 | 224 | int err; | ||
240 | 225 | |||
241 | 226 | vport = ovs_vport_alloc(sizeof(struct netdev_vport), | ||
242 | 227 | &ovs_internal_vport_ops, parms); | ||
243 | 228 | if (IS_ERR(vport)) { | ||
244 | 229 | err = PTR_ERR(vport); | ||
245 | 230 | goto error; | ||
246 | 231 | } | ||
247 | 232 | |||
248 | 233 | netdev_vport = netdev_vport_priv(vport); | ||
249 | 234 | |||
250 | 235 | netdev_vport->dev = alloc_netdev(sizeof(struct internal_dev), | ||
251 | 236 | parms->name, do_setup); | ||
252 | 237 | if (!netdev_vport->dev) { | ||
253 | 238 | err = -ENOMEM; | ||
254 | 239 | goto error_free_vport; | ||
255 | 240 | } | ||
256 | 241 | |||
257 | 242 | internal_dev = internal_dev_priv(netdev_vport->dev); | ||
258 | 243 | internal_dev->vport = vport; | ||
259 | 244 | |||
260 | 245 | err = register_netdevice(netdev_vport->dev); | ||
261 | 246 | if (err) | ||
262 | 247 | goto error_free_netdev; | ||
263 | 248 | |||
264 | 249 | dev_set_promiscuity(netdev_vport->dev, 1); | ||
265 | 250 | netif_start_queue(netdev_vport->dev); | ||
266 | 251 | |||
267 | 252 | return vport; | ||
268 | 253 | |||
269 | 254 | error_free_netdev: | ||
270 | 255 | free_netdev(netdev_vport->dev); | ||
271 | 256 | error_free_vport: | ||
272 | 257 | ovs_vport_free(vport); | ||
273 | 258 | error: | ||
274 | 259 | return ERR_PTR(err); | ||
275 | 260 | } | ||
276 | 261 | |||
277 | 262 | static void internal_dev_destroy(struct vport *vport) | ||
278 | 263 | { | ||
279 | 264 | struct netdev_vport *netdev_vport = netdev_vport_priv(vport); | ||
280 | 265 | |||
281 | 266 | netif_stop_queue(netdev_vport->dev); | ||
282 | 267 | dev_set_promiscuity(netdev_vport->dev, -1); | ||
283 | 268 | |||
284 | 269 | /* unregister_netdevice() waits for an RCU grace period. */ | ||
285 | 270 | unregister_netdevice(netdev_vport->dev); | ||
286 | 271 | } | ||
287 | 272 | |||
288 | 273 | static int internal_dev_recv(struct vport *vport, struct sk_buff *skb) | ||
289 | 274 | { | ||
290 | 275 | struct net_device *netdev = netdev_vport_priv(vport)->dev; | ||
291 | 276 | int len; | ||
292 | 277 | |||
293 | 278 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) | ||
294 | 279 | if (unlikely(vlan_deaccel_tag(skb))) | ||
295 | 280 | return 0; | ||
296 | 281 | #endif | ||
297 | 282 | |||
298 | 283 | len = skb->len; | ||
299 | 284 | skb->dev = netdev; | ||
300 | 285 | skb->pkt_type = PACKET_HOST; | ||
301 | 286 | skb->protocol = eth_type_trans(skb, netdev); | ||
302 | 287 | forward_ip_summed(skb, false); | ||
303 | 288 | |||
304 | 289 | netif_rx(skb); | ||
305 | 290 | |||
306 | 291 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,29) | ||
307 | 292 | netdev->last_rx = jiffies; | ||
308 | 293 | #endif | ||
309 | 294 | |||
310 | 295 | return len; | ||
311 | 296 | } | ||
312 | 297 | |||
313 | 298 | const struct vport_ops ovs_internal_vport_ops = { | ||
314 | 299 | .type = OVS_VPORT_TYPE_INTERNAL, | ||
315 | 300 | .flags = VPORT_F_REQUIRED | VPORT_F_FLOW, | ||
316 | 301 | .create = internal_dev_create, | ||
317 | 302 | .destroy = internal_dev_destroy, | ||
318 | 303 | .set_addr = ovs_netdev_set_addr, | ||
319 | 304 | .get_name = ovs_netdev_get_name, | ||
320 | 305 | .get_addr = ovs_netdev_get_addr, | ||
321 | 306 | .get_kobj = ovs_netdev_get_kobj, | ||
322 | 307 | .get_dev_flags = ovs_netdev_get_dev_flags, | ||
323 | 308 | .is_running = ovs_netdev_is_running, | ||
324 | 309 | .get_operstate = ovs_netdev_get_operstate, | ||
325 | 310 | .get_ifindex = ovs_netdev_get_ifindex, | ||
326 | 311 | .get_mtu = ovs_netdev_get_mtu, | ||
327 | 312 | .send = internal_dev_recv, | ||
328 | 313 | }; | ||
329 | 314 | |||
330 | 315 | int ovs_is_internal_dev(const struct net_device *netdev) | ||
331 | 316 | { | ||
332 | 317 | #ifdef HAVE_NET_DEVICE_OPS | ||
333 | 318 | return netdev->netdev_ops == &internal_dev_netdev_ops; | ||
334 | 319 | #else | ||
335 | 320 | return netdev->open == internal_dev_open; | ||
336 | 321 | #endif | ||
337 | 322 | } | ||
338 | 323 | |||
339 | 324 | struct vport *ovs_internal_dev_get_vport(struct net_device *netdev) | ||
340 | 325 | { | ||
341 | 326 | if (!ovs_is_internal_dev(netdev)) | ||
342 | 327 | return NULL; | ||
343 | 328 | |||
344 | 329 | return internal_dev_priv(netdev)->vport; | ||
345 | 330 | } | ||
346 | 0 | 331 | ||
347 | === modified file 'datapath/vport-internal_dev.c' | |||
348 | --- datapath/vport-internal_dev.c 2012-01-30 23:36:00 +0000 | |||
349 | +++ datapath/vport-internal_dev.c 2012-09-12 17:06:26 +0000 | |||
350 | @@ -25,6 +25,9 @@ | |||
351 | 25 | #include <linux/skbuff.h> | 25 | #include <linux/skbuff.h> |
352 | 26 | #include <linux/version.h> | 26 | #include <linux/version.h> |
353 | 27 | 27 | ||
354 | 28 | #include <net/dst.h> | ||
355 | 29 | #include <net/xfrm.h> | ||
356 | 30 | |||
357 | 28 | #include "checksum.h" | 31 | #include "checksum.h" |
358 | 29 | #include "datapath.h" | 32 | #include "datapath.h" |
359 | 30 | #include "vlan.h" | 33 | #include "vlan.h" |
360 | @@ -281,6 +284,11 @@ | |||
361 | 281 | #endif | 284 | #endif |
362 | 282 | 285 | ||
363 | 283 | len = skb->len; | 286 | len = skb->len; |
364 | 287 | |||
365 | 288 | skb_dst_drop(skb); | ||
366 | 289 | nf_reset(skb); | ||
367 | 290 | secpath_reset(skb); | ||
368 | 291 | |||
369 | 284 | skb->dev = netdev; | 292 | skb->dev = netdev; |
370 | 285 | skb->pkt_type = PACKET_HOST; | 293 | skb->pkt_type = PACKET_HOST; |
371 | 286 | skb->protocol = eth_type_trans(skb, netdev); | 294 | skb->protocol = eth_type_trans(skb, netdev); |
372 | 287 | 295 | ||
373 | === modified file 'debian/changelog' | |||
374 | --- debian/changelog 2012-07-26 11:23:06 +0000 | |||
375 | +++ debian/changelog 2012-09-12 17:06:26 +0000 | |||
376 | @@ -1,3 +1,13 @@ | |||
377 | 1 | openvswitch (1.4.0-1ubuntu1.3~ppa) precise; urgency=low | ||
378 | 2 | |||
379 | 3 | * Temporary PPA build to allow early RC1 testing while fix makes its way | ||
380 | 4 | out to precise-updates. | ||
381 | 5 | - debian/patches/lp1044318-Reset-upper-layer-protocol-info.patch: Cherry | ||
382 | 6 | picked upstream patch to avoid critical issues with SNAT/DNAT when OVS | ||
383 | 7 | is chained with other Linux components. (LP: #1044318) | ||
384 | 8 | |||
385 | 9 | -- Adam Gandelman <adamg@canonical.com> Fri, 07 Sep 2012 15:38:56 -0700 | ||
386 | 10 | |||
387 | 1 | openvswitch (1.4.0-1ubuntu1.2) precise-proposed; urgency=low | 11 | openvswitch (1.4.0-1ubuntu1.2) precise-proposed; urgency=low |
388 | 2 | 12 | ||
389 | 3 | * debian/patches/fix_ftbfs_big_endian.patch: Fix FTBFS on PPC. | 13 | * debian/patches/fix_ftbfs_big_endian.patch: Fix FTBFS on PPC. |
390 | 4 | 14 | ||
391 | === added file 'debian/patches/lp1044318-Reset-upper-layer-protocol-info.patch' | |||
392 | --- debian/patches/lp1044318-Reset-upper-layer-protocol-info.patch 1970-01-01 00:00:00 +0000 | |||
393 | +++ debian/patches/lp1044318-Reset-upper-layer-protocol-info.patch 2012-09-12 17:06:26 +0000 | |||
394 | @@ -0,0 +1,52 @@ | |||
395 | 1 | From: Adam Gandelman <adamg@canonical.com> | ||
396 | 2 | Author: Jesse Gross <jesse@nicira.com> | ||
397 | 3 | Date: Fri Sep 7 12:10:58 PDT 2012 | ||
398 | 4 | Bug-Ubuntu: https://bugs.launchpad.net/quantum/+bug/1044318 | ||
399 | 5 | X-Git-Url: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff_plain;h=53e6421bc83918ac2d00ba5516f205fa7e394140 | ||
400 | 6 | Subject: datapath: Reset upper layer protocol info on internal devices. | ||
401 | 7 | |||
402 | 8 | datapath: Reset upper layer protocol info on internal devices. | ||
403 | 9 | |||
404 | 10 | It's possible that packets that are sent on internal devices (from | ||
405 | 11 | the OVS perspective) have already traversed the local IP stack. | ||
406 | 12 | After they go through the internal device, they will again travel | ||
407 | 13 | through the IP stack which may get confused by the presence of | ||
408 | 14 | existing information in the skb. The problem can be observed | ||
409 | 15 | when switching between namespaces. This clears out that information | ||
410 | 16 | to avoid problems but deliberately leaves other metadata alone. | ||
411 | 17 | This is to provide maximum flexibility in chaining together OVS | ||
412 | 18 | and other Linux components. | ||
413 | 19 | |||
414 | 20 | Bug #10995 | ||
415 | 21 | |||
416 | 22 | Signed-off-by: Jesse Gross <jesse@nicira.com> | ||
417 | 23 | Acked-by: Ben Pfaff <blp@nicira.com> | ||
418 | 24 | --- | ||
419 | 25 | |||
420 | 26 | |||
421 | 27 | Index: openvswitch/datapath/vport-internal_dev.c | ||
422 | 28 | =================================================================== | ||
423 | 29 | --- openvswitch.orig/datapath/vport-internal_dev.c 2012-09-07 12:06:26.436795000 -0700 | ||
424 | 30 | +++ openvswitch/datapath/vport-internal_dev.c 2012-09-07 12:09:09.223267544 -0700 | ||
425 | 31 | @@ -25,6 +25,9 @@ | ||
426 | 32 | #include <linux/skbuff.h> | ||
427 | 33 | #include <linux/version.h> | ||
428 | 34 | |||
429 | 35 | +#include <net/dst.h> | ||
430 | 36 | +#include <net/xfrm.h> | ||
431 | 37 | + | ||
432 | 38 | #include "checksum.h" | ||
433 | 39 | #include "datapath.h" | ||
434 | 40 | #include "vlan.h" | ||
435 | 41 | @@ -281,6 +284,11 @@ | ||
436 | 42 | #endif | ||
437 | 43 | |||
438 | 44 | len = skb->len; | ||
439 | 45 | + | ||
440 | 46 | + skb_dst_drop(skb); | ||
441 | 47 | + nf_reset(skb); | ||
442 | 48 | + secpath_reset(skb); | ||
443 | 49 | + | ||
444 | 50 | skb->dev = netdev; | ||
445 | 51 | skb->pkt_type = PACKET_HOST; | ||
446 | 52 | skb->protocol = eth_type_trans(skb, netdev); | ||
447 | 0 | 53 | ||
448 | === modified file 'debian/patches/series' | |||
449 | --- debian/patches/series 2012-07-26 11:23:06 +0000 | |||
450 | +++ debian/patches/series 2012-09-12 17:06:26 +0000 | |||
451 | @@ -1,2 +1,3 @@ | |||
452 | 1 | update_odputil_key_bytes.patch | 1 | update_odputil_key_bytes.patch |
453 | 2 | fix_ftbfs_big_endian.patch | 2 | fix_ftbfs_big_endian.patch |
454 | 3 | lp1044318-Reset-upper-layer-protocol-info.patch |
I'm seeing this in -proposed, marking it as merged.