sg.tweak@gmail.com ef5c89967d drivers/net/macvlan.c: fix cloning of tagged VLAN interfaces
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13348

akpm: the reporter disappeared, so I typed it in again.

It is not possible to make clone of tagged VLAN interface to be used as
mac-based vlan interfave.

How reproducible:
Use any 802.1q tagged vlan interface, e.g. eth2.700 and clone it:

  ip link add link eth2.700 address 00:04:75:cb:38:09 macvlan0 type macvlan
  ip link set dev macvlan0 up
  ip addr add 10.195.1.1/24 dev macvlan0

So far, so good. Now try to ping anything via macvlan0:

  ping 10.195.1.2

Actual results:
For every attempted packet tx kernel writes to console:

------------[ cut here ]------------
WARNING: at net/8021q/vlan_dev.c:254 vlan_dev_hard_header+0x36/0x126 [8021q]()
Hardware name: M22ES
Modules linked in: arptable_filter arp_tables bridge veth macvlan arc4 ecb
ppp_mppe ppp_async crc_ccitt ppp_generic slhc autofs4 sunrpc 8021q garp stp
ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack xt_tcpudp
x_tables dm_mirror dm_region_hash dm_log dm_multipath dm_mod sbs sbshc lp
floppy snd_intel8x0 joydev snd_seq_dummy snd_intel8x0m snd_ac97_codec
ide_cd_mod ac97_bus snd_seq_oss cdrom snd_seq_midi_event serio_raw snd_seq
snd_seq_device snd_pcm_oss snd_mixer_oss parport_pc snd_pcm parport battery
8139cp snd_timer i2c_sis96x ac button snd rtc_cmos rtc_core 8139too soundcore
rtc_lib mii i2c_core pcspkr snd_page_alloc pata_sis libata sd_mod scsi_mod ext3
jbd ehci_hcd ohci_hcd uhci_hcd [last unloaded: ip_tables]
Pid: 0, comm: swapper Tainted: G        W  2.6.29.3 #1
Call Trace:
 [<c0425f48>] warn_slowpath+0x60/0x9f
 [<c0425f6f>] warn_slowpath+0x87/0x9f
 [<dffb850d>] vlan_dev_hard_header+0x0/0x126 [8021q]
 [<dffb8543>] vlan_dev_hard_header+0x36/0x126 [8021q]
 [<dffb850d>] vlan_dev_hard_header+0x0/0x126 [8021q]
 [<df83155d>] macvlan_hard_header+0x3c/0x47 [macvlan]
 [<df831521>] macvlan_hard_header+0x0/0x47 [macvlan]
 [<c062bf3f>] arp_create+0xef/0x1ff
 [<c062c08c>] arp_send+0x3d/0x54
 [<c062c916>] arp_solicit+0x16c/0x177
 [<c05fadd2>] neigh_timer_handler+0x227/0x269
 [<c05fabab>] neigh_timer_handler+0x0/0x269
 [<c042ce4d>] run_timer_softirq+0xf0/0x141
 [<c0429e5a>] __do_softirq+0x76/0xf8
 [<c0429de4>] __do_softirq+0x0/0xf8
 <IRQ>  [<c044fb67>] handle_level_irq+0x0/0xad
 [<c0429db7>] irq_exit+0x35/0x62
 [<c04046bb>] do_IRQ+0xdf/0xf4
 [<c04035a7>] common_interrupt+0x27/0x2c
 [<c04079c5>] default_idle+0x2a/0x3d
 [<c0401bb6>] cpu_idle+0x57/0x70

Macvlan driver always uses standard ethernet header length for all types
of interface to which it is linked.  This patch fixes this problem.

Reported-by: <sg.tweak@gmail.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-06-11 02:32:39 -07:00
..
2009-06-03 02:51:02 -07:00
2009-04-13 15:16:33 -07:00
2009-06-03 21:01:50 -07:00
2009-06-08 00:21:48 -07:00
2009-04-28 02:05:21 -07:00
2009-06-08 00:21:48 -07:00
2009-06-08 00:21:48 -07:00
2009-05-29 22:12:33 -07:00
2009-06-08 00:21:48 -07:00
2009-06-10 13:28:39 -04:00
2009-05-26 20:35:03 -07:00
2009-05-26 20:35:02 -07:00
2008-12-08 01:14:16 -08:00
2009-05-26 20:35:02 -07:00
2009-05-26 20:35:02 -07:00
2009-05-26 20:35:02 -07:00
2009-05-26 20:35:03 -07:00
2009-05-26 20:35:03 -07:00
2009-05-26 20:35:03 -07:00
2009-05-26 20:35:04 -07:00
2008-11-25 18:12:49 -08:00
2009-04-24 04:45:33 -07:00
2009-05-17 11:59:51 -07:00
2009-04-14 21:57:00 -07:00
2009-05-29 01:46:27 -07:00
2008-11-25 18:25:32 -08:00
2009-04-11 02:53:46 -07:00
2009-01-07 18:10:24 -08:00
2009-04-14 21:57:02 -07:00
2009-04-16 02:20:06 -07:00
2009-04-04 16:51:14 -07:00
2009-06-09 05:25:38 -07:00
2009-05-17 20:47:44 -07:00
2009-03-02 22:32:48 -08:00
2009-02-15 23:32:01 -08:00
2009-02-15 23:32:01 -08:00
2009-02-15 23:32:01 -08:00
2009-03-02 22:32:43 -08:00
2009-04-27 03:27:43 -07:00
2008-09-22 19:27:10 -07:00
2009-05-17 21:03:45 -07:00
2009-05-29 01:46:27 -07:00
2008-02-01 20:54:03 +11:00
2009-04-16 02:20:08 -07:00
2008-11-20 20:28:00 -08:00
2009-06-11 02:32:39 -07:00
2009-01-07 17:30:09 -08:00
2009-01-21 14:33:50 -08:00
2008-11-25 18:23:59 -08:00
2009-04-16 02:34:48 -07:00
2009-02-04 16:43:44 -08:00
2009-05-29 01:46:27 -07:00
2009-02-26 21:02:19 -08:00
2008-11-25 18:24:57 -08:00
2009-04-16 02:20:08 -07:00
2009-05-17 15:19:36 -07:00
2009-01-06 10:47:44 -08:00
2009-04-13 15:16:31 -07:00
2008-08-14 04:26:38 -04:00
2009-05-29 01:46:27 -07:00
2009-05-29 01:51:22 -07:00
2009-06-08 00:20:20 -07:00
2009-03-27 00:46:48 -07:00
2009-04-16 02:20:15 -07:00
2008-11-25 18:24:38 -08:00
2009-05-17 21:03:46 -07:00
2009-05-04 11:08:41 -07:00
2009-04-16 02:20:16 -07:00
2009-04-16 02:20:16 -07:00
2009-04-13 15:16:26 -07:00
2009-06-08 00:20:20 -07:00
2009-04-16 02:20:18 -07:00
2009-05-29 22:12:32 -07:00
2009-04-16 02:20:21 -07:00
2009-04-04 16:38:42 -07:00
2009-04-16 02:20:22 -07:00
2009-03-27 00:46:53 -07:00
2008-03-26 00:18:00 -04:00
2009-03-27 00:46:53 -07:00
2009-03-28 23:37:27 -07:00
2009-05-29 22:12:32 -07:00
2009-05-29 01:46:27 -07:00
2009-01-07 17:26:48 -08:00
2009-03-13 16:09:12 -07:00
2008-01-28 15:11:27 -08:00
2009-03-13 16:09:12 -07:00
2009-06-03 02:51:04 -07:00
2008-11-10 15:11:56 -05:00
2009-05-29 01:46:27 -07:00
2009-05-27 15:46:53 -07:00
2009-04-16 02:20:24 -07:00
2009-04-29 17:32:34 -07:00
2009-01-07 17:56:54 -08:00
2009-04-16 02:20:25 -07:00
2009-05-25 22:49:56 -07:00
2009-06-08 00:15:14 -07:00
2009-05-29 01:46:27 -07:00
2009-05-29 01:46:27 -07:00
2008-08-07 01:55:50 -04:00
2008-01-28 15:11:27 -08:00
2009-01-07 18:09:36 -08:00
2009-04-16 02:20:25 -07:00
2009-03-27 00:46:48 -07:00
2008-04-16 20:06:50 -04:00
2008-11-25 18:25:49 -08:00
2008-08-29 02:13:33 -07:00
2008-08-29 02:14:29 -07:00
2008-08-29 02:14:43 -07:00
2009-03-20 00:51:22 -07:00
2009-06-08 00:21:48 -07:00
2008-05-30 22:18:02 -04:00
2009-06-08 00:44:31 -07:00
2009-01-11 00:06:36 -08:00
2009-04-13 15:16:21 -07:00
2009-05-29 01:46:27 -07:00
2009-01-21 14:02:31 -08:00