Skip to contentSkip to conversation

Add unknown-unicast flooding to p2mp tap bridge.

PATCH In review Gert Doering 1 participant 3 messages Feb 8, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add unknown-unicast flooding to p2mp tap bridge.

Enable flooding of "unknown-unicast" packets from the server to all connected clients (+tap).

These are packets that are sent to an unknown destination MAC address and which are not broadcast/multicast packets. "Normal" switches also flood these packets, which allows client-to-client MAC learning without having to have an initial broadcast packet.

Without the patch, the p2mp tap server will only forward such packets to the tap interface on the host.

This is only active if --client-to-client is configured on the server.

---
 src/openvpn/multi.c | 7 +++++++
 1 file changed, 7 insertions(+)
src/openvpn/multi.c +7 -0
index 55c167b..aa5ae26 100644
@@ -2689,6 +2689,13 @@ multi_process_incoming_link(struct multi_context *m, struct multi_instance *inst
                                     }
                                     c->c2.to_tun.len = 0;
                                 }
+				else
+				{
+                                    /* flood "unknown unicast" packets */
+                                    msg(D_MULTI_LOW, "MULTI: unknown unicast destination [%s], flood",
+                                        mroute_addr_print(&src, &gc));
+                                    multi_bcast(m, &c->c2.to_tun, m->pending, NULL);
+				}
                             }
                         }
 #ifdef ENABLE_PF
Signature · 1 line
2.7.3
#1 lore raw

Hi,

Quoted 2 lines · Gert Doering

Enable flooding of "unknown-unicast" packets from the server to all connected clients (+tap).

Hrmph, this is incomplete.

While it enables flooding of UU-Packets "from client 1 to client 2", packets coming in from the TAP interface towards an UU MAC will still be dropped.

"More code paths in multi.c".

But I still like feedback on this patch. As I said, normal switches behave like this (UU is flooded, as is broad- and multicast) but it seems James was afraid of flooding clients with "stuff they do not want".

So, we could have an option here. Options! We need more options! :-)

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...
#2 lore raw

Hi,

Quoted 5 lines · Gert Doering
Quoted 2 lines · Gert Doering

Enable flooding of "unknown-unicast" packets from the server to all connected clients (+tap).

Hrmph, this is incomplete.

And broken.

Packets coming in "from TAP" do not trigger MAC learning, so if you ping "from client 1" to "out the tap", every single ping packet client 1 -> tap will trigger an

Fri Feb 8 20:47:39 2019 us=707460 freebsd-82-amd64/2001:608:0:814::f000:2 MULTI: unknown unicast destination [00:bd:50:58:45:00], flood

... we do have a trac ticket regarding MAC learning and TAP interface, so it seems I need to revisit this...

"Now I see why our code does not do UU flooding".

gert

Signature · 6 lines
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             [email protected]...