Date: Mon, 7 Sep 2009 22:30:19 GMT From: Sten Spans <sten@blinkenlights.nl> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/138620: lagg port bpf-writes blocked Message-ID: <200909072230.n87MUJEC075679@www.freebsd.org> Resent-Message-ID: <200909072240.n87Me1Au016788@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 138620 >Category: kern >Synopsis: lagg port bpf-writes blocked >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Sep 07 22:40:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Sten Spans >Release: 8.0-BETA4 >Organization: >Environment: FreeBSD towel.blinkenlights.nl 8.0-BETA4 FreeBSD 8.0-BETA4 #0: Sun Sep 6 04:44:31 UTC 2009 root@mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: I have an application which sends link-layer advertisements on physical interfaces. This daemon also informs switches about lacp settings via LLDP. Because this daemon sends link-layer advertisements it needs to transmit on physical interfaces. However the lagg driver blocks bpf-writes on member interfaces, which makes it impossible for my software to do what it needs to do. The load-balancing / failover algorithms implemented by lagg make it impossible to send on all physical interfaces via the parent lagg interface. Please note that the bridge driver on FreeBSD doesn't implement the same restrictions. Please consider allowing bpf-writes via lagg_port_output for the people who know what they're doing. In general allowing pseudo_AF_HDRCMPLT should be a reasonable compromise. >How-To-Repeat: ifconfig lagg0 create up ifconfig tap0 create up ifconfig lagg0 laggport tap0 ifconfig tap1 create up ifconfig lagg0 laggport tap1 child_send: starting loop with interface lagg0 child_send: fetching tap1 media details netif_media: media detection not supported on tap1 child_send: building LLDP packet for tap1 child_send: sending LLDP packet (225 bytes) on tap1 master_send: only -1 bytes written: Device busy child_send: fetching tap0 media details netif_media: media detection not supported on tap0 child_send: building LLDP packet for tap0 child_send: sending LLDP packet (225 bytes) on tap0 master_send: only -1 bytes written: Device busy >Fix: Patch attached with submission follows: --- if_lagg.c.orig 2009-09-08 00:17:17.000000000 +0200 +++ if_lagg.c 2009-09-08 00:18:22.000000000 +0200 @@ -702,6 +702,7 @@ switch (dst->sa_family) { case pseudo_AF_HDRCMPLT: + return ((*lp->lp_output)(ifp, m, dst, rt0)); case AF_UNSPEC: eh = (struct ether_header *)dst->sa_data; type = eh->ether_type; >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909072230.n87MUJEC075679>