kern/115019: [netgraph] ng_ether upper hook packet flow stops on adding ethernet interface to ifconfig bridge

Kirill Nuzhdin kirill at rad.chem.msu.ru
Sun Jul 29 20:40:02 UTC 2007


>Number:         115019
>Category:       kern
>Synopsis:       [netgraph] ng_ether upper hook packet flow stops on adding ethernet interface to ifconfig bridge
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 29 20:40:01 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Kirill Nuzhdin
>Release:        6.2-STABLE
>Organization:
>Environment:
FreeBSD pile.local 6.2-STABLE FreeBSD 6.2-STABLE #0: Mon Jul  9 15:25:08 MSD 2007     root at pile.local:/usr/obj/usr/.amd_mount/src/sys/PILE  amd64

>Description:
If we add ethernet interface to ifconfig bridge, a packet flow from the upper hook of the ether node of a netgraph construction disappears. Meanwhile, packet flow from the lower hook is not effected.

Following tests show that on adding ethernet interface to an ifconfig bridge, corresponding netgraph node "forgets" about its upper hook.


Without loss of generality one can use instead of an arbitrary netgraph construction a tee netgraph node. 

Initial position:
1. bce1 - ethernet interface (or fxp, does not matter)

2. netgraph construction:
ngctl mkpeer bce1: tee lower right
ngctl connect bce1:lower bce1: left upper

3. traffic monitoring with NGM_TEE_GET_STATS:
ngctl msg bce1:lower getstats
or
ngctl msg bce1:upper getstats

4. traffic flow from external net to bce1 interface and vice versa

initial position, action: 
no action
result:
- left2right hook shows traffic flow
- right2left hook shows traffic flow
- traffic through bce1 flows normally

initial position, action: 
# ifconfig bridge0 create
# ifconfig bridge0 addm bce1
result:
- left2right hook shows no traffic
- right2left hook shows traffic flow
- traffic through bce1 flows normally

initial position, action: 
# ifconfig bridge0 create
# ifconfig bridge0 addm bce1
# ngctl rmhook bce1: lower
result:
- left2right hook shows no traffic
- right2left hook shows no traffic
- traffic through bce1 flows stops

initial position, action: 
# ifconfig bridge0 create
# ifconfig bridge0 addm bce1
# ngctl rmhook bce1: upper
result:
- left2right hook shows no traffic
- right2left hook shows traffic flow
- traffic through bce1 flows normally


Also reproducible in this environment: FreeBSD gw.local 6.2-STABLE FreeBSD 6.2-STABLE #0: Sat Jun 16 13:24:55 MSD 2007     root at gw.local:/usr/obj/usr/src/sys/GW  i386
>How-To-Repeat:
- kldload ng_tee
  kldload ng_ether
  ngctl mkpeer if0: tee lower right
  ngctl connect if0:lower if0: left upper
- ngctl msg if0:lower getstats
  make sure left->right and right->left hooks traffic is fine
- ifconfig bridge0 create
  ifconfig bridge0 addm if0
- ngctl msg if0:lower getstats
- make sure there is no left->right hooks traffic
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list