tun.c (5a84d159061d914c8dd4aa372ac6e9529c2be453) | tun.c (4c13eb6657fe9ef7b4dc8f1a405c902e9e5234e0) |
---|---|
1/* 2 * TUN - Universal TUN/TAP device driver. 3 * Copyright (C) 1999-2002 Maxim Krasnyansky <maxk@qualcomm.com> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 240 unchanged lines hidden (view full) --- 249 if (align) 250 skb_reserve(skb, align); 251 if (memcpy_fromiovec(skb_put(skb, len), iv, len)) { 252 tun->stats.rx_dropped++; 253 kfree_skb(skb); 254 return -EFAULT; 255 } 256 | 1/* 2 * TUN - Universal TUN/TAP device driver. 3 * Copyright (C) 1999-2002 Maxim Krasnyansky <maxk@qualcomm.com> 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 240 unchanged lines hidden (view full) --- 249 if (align) 250 skb_reserve(skb, align); 251 if (memcpy_fromiovec(skb_put(skb, len), iv, len)) { 252 tun->stats.rx_dropped++; 253 kfree_skb(skb); 254 return -EFAULT; 255 } 256 |
257 skb->dev = tun->dev; | |
258 switch (tun->flags & TUN_TYPE_MASK) { 259 case TUN_TUN_DEV: 260 skb->mac.raw = skb->data; 261 skb->protocol = pi.proto; | 257 switch (tun->flags & TUN_TYPE_MASK) { 258 case TUN_TUN_DEV: 259 skb->mac.raw = skb->data; 260 skb->protocol = pi.proto; |
261 skb->dev = tun->dev; |
|
262 break; 263 case TUN_TAP_DEV: 264 skb->protocol = eth_type_trans(skb, tun->dev); 265 break; 266 }; 267 268 if (tun->flags & TUN_NOCHECKSUM) 269 skb->ip_summed = CHECKSUM_UNNECESSARY; --- 616 unchanged lines hidden --- | 262 break; 263 case TUN_TAP_DEV: 264 skb->protocol = eth_type_trans(skb, tun->dev); 265 break; 266 }; 267 268 if (tun->flags & TUN_NOCHECKSUM) 269 skb->ip_summed = CHECKSUM_UNNECESSARY; --- 616 unchanged lines hidden --- |