* [heads-up] bridge in kernel 3.0~ and dhcp from kvm guest on tap device
@ 2011-07-07 9:44 Michael Tokarev
2011-07-07 9:49 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Michael Tokarev @ 2011-07-07 9:44 UTC (permalink / raw)
To: netdev, KVM list
The combination in $subject apparently stopped working --
I'm running 3.0-rc6 kernel on host where it doesn't work.
The setup is -- a bridge, br0, to which host eth0 and guest
tap devices are connected.
When KVM guest boots, it tries to send DHCP requests to
its ethernet device (it does not matter which device it
uses - be it virtio or e1000 or rtl8139, all work the
same). These requests appears (can be seen) on the tap
device, but they never propagate to bridge.
Example of a packet as seen on the tap device from a
windows7 guest:
# tcpdump -npvi tap-kvm port bootpc
tcpdump: WARNING: tap-kvm: no IPv4 address assigned
tcpdump: listening on tap-kvm, link-type EN10MB (Ethernet), capture size 65535 bytes
13:38:21.435032 IP (tos 0x0, ttl 128, id 109, offset 0, flags [none], proto UDP (17), length 328)
0.0.0.0.68 > 255.255.255.255.67: BOOTP/DHCP, Request from 52:54:00:12:34:56, length 300, xid 0xdc8f28b1, secs 7168, Flags [Broadcast]
Client-Ethernet-Address 52:54:00:12:34:56
Vendor-rfc1048 Extensions
Magic Cookie 0x63825363
DHCP-Message Option 53, length 1: Discover
Client-ID Option 61, length 7: ether 52:54:00:12:34:56
Hostname Option 12, length 7: "mjt-006"
Vendor-Class Option 60, length 8: "MSFT 5.0"
Parameter-Request Option 55, length 12:
Subnet-Mask, Domain-Name, Default-Gateway, Domain-Name-Server
Netbios-Name-Server, Netbios-Node, Netbios-Scope, Router-Discovery
Static-Route, Classless-Static-Route, Classless-Static-Route-Microsoft, Vendor-Option
Exactly the same thing happens with 4 different DHCP
clients: it's ipxe boot rom (network booting of a KVM
guest), win7 built-in DHCP client, udhcpc and dhcp3.
All other traffic - so far anyway - works correcty.
Right now I don't have time to debug the issue, will try
to bisect later. But if anyone have pointers or thoughts,
please shot away ;)
Thanks!
/mjt
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [heads-up] bridge in kernel 3.0~ and dhcp from kvm guest on tap device
2011-07-07 9:44 [heads-up] bridge in kernel 3.0~ and dhcp from kvm guest on tap device Michael Tokarev
@ 2011-07-07 9:49 ` David Miller
2011-07-07 9:55 ` lists+linux-netdev
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2011-07-07 9:49 UTC (permalink / raw)
To: mjt; +Cc: netdev, kvm
From: Michael Tokarev <mjt@tls.msk.ru>
Date: Thu, 07 Jul 2011 13:44:57 +0400
> The combination in $subject apparently stopped working --
> I'm running 3.0-rc6 kernel on host where it doesn't work.
Already fixed in net-2.6:
>From 44661462ee1ee3c922754fc1f246867f0d01e7ea Mon Sep 17 00:00:00 2001
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Tue, 5 Jul 2011 13:58:33 +0000
Subject: [PATCH 24/30] bridge: Always flood broadcast packets
As is_multicast_ether_addr returns true on broadcast packets as
well, we need to explicitly exclude broadcast packets so that
they're always flooded. This wasn't an issue before as broadcast
packets were considered to be an unregistered multicast group,
which were always flooded. However, as we now only flood such
packets to router ports, this is no longer acceptable.
Reported-by: Michael Guntsche <mike@it-loops.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
net/bridge/br_device.c | 4 +++-
net/bridge/br_input.c | 6 ++++--
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c
index c188c80..32b8f9f 100644
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -49,7 +49,9 @@ netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
skb_pull(skb, ETH_HLEN);
rcu_read_lock();
- if (is_multicast_ether_addr(dest)) {
+ if (is_broadcast_ether_addr(dest))
+ br_flood_deliver(br, skb);
+ else if (is_multicast_ether_addr(dest)) {
if (unlikely(netpoll_tx_running(dev))) {
br_flood_deliver(br, skb);
goto out;
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index f3ac1e8..f06ee39 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -60,7 +60,7 @@ int br_handle_frame_finish(struct sk_buff *skb)
br = p->br;
br_fdb_update(br, p, eth_hdr(skb)->h_source);
- if (is_multicast_ether_addr(dest) &&
+ if (!is_broadcast_ether_addr(dest) && is_multicast_ether_addr(dest) &&
br_multicast_rcv(br, p, skb))
goto drop;
@@ -77,7 +77,9 @@ int br_handle_frame_finish(struct sk_buff *skb)
dst = NULL;
- if (is_multicast_ether_addr(dest)) {
+ if (is_broadcast_ether_addr(dest))
+ skb2 = skb;
+ else if (is_multicast_ether_addr(dest)) {
mdst = br_mdb_get(br, skb);
if (mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb)) {
if ((mdst && mdst->mglist) ||
--
1.7.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [heads-up] bridge in kernel 3.0~ and dhcp from kvm guest on tap device
2011-07-07 9:49 ` David Miller
@ 2011-07-07 9:55 ` lists+linux-netdev
0 siblings, 0 replies; 3+ messages in thread
From: lists+linux-netdev @ 2011-07-07 9:55 UTC (permalink / raw)
To: David Miller; +Cc: netdev, kvm
07.07.2011 13:49, David Miller wrote:
> From: Michael Tokarev <mjt@tls.msk.ru>
> Date: Thu, 07 Jul 2011 13:44:57 +0400
>
>> The combination in $subject apparently stopped working --
>> I'm running 3.0-rc6 kernel on host where it doesn't work.
>
> Already fixed in net-2.6:
>
> From 44661462ee1ee3c922754fc1f246867f0d01e7ea Mon Sep 17 00:00:00 2001
> From: Herbert Xu <herbert@gondor.apana.org.au>
> Date: Tue, 5 Jul 2011 13:58:33 +0000
> Subject: [PATCH 24/30] bridge: Always flood broadcast packets
Thank you very much for the quick response! I was preparing
myself for another painful bisection session for tonight
already.. ;)
I just verified - this patch fixes this issue (I rebuilt and
re-loaded the module) -- hopefully the fix will be in 3.0
kernel ;)
Thanks!
/mjt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-07 9:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-07 9:44 [heads-up] bridge in kernel 3.0~ and dhcp from kvm guest on tap device Michael Tokarev
2011-07-07 9:49 ` David Miller
2011-07-07 9:55 ` lists+linux-netdev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox