Bug 227450

Summary: [patch] Should not all packets processed by gif_output be deleted, when an running instance of if_gif(4) is member of an instance of if_bridge(4)?
Product: Base System Reporter: henning.matyschok
Component: kernAssignee: freebsd-net (Nobody) <net>
Status: Closed FIXED    
Severity: Affects Only Me Keywords: patch
Priority: ---    
Version: 11.1-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch for if_gif(4). none

Description henning.matyschok 2018-04-11 21:57:51 UTC
Created attachment 192442 [details]
Patch for if_gif(4).

First, I want to apologize for my bad English, because I'm not a native speaker.

Should not all packets processed by gif_output be deleted, when an running instance of if_gif(4) is member of an instance of if_bridge(4)?

This question opened to me as I tried to understand the internal structure of gif_transmit in the context of encapsulating Ethernet frames as service data units of EtherIP prtocol. 

If I understood correctly, then gif_transmit would be called by bridge_enqueue at runtime, if an instance of if_gif(4) is member interface of if_bridge(4)?
Comment 1 commit-hook freebsd_committer freebsd_triage 2023-07-26 11:29:42 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=8a0308722372a3ac6a94967ae4fe3123842309e2

commit 8a0308722372a3ac6a94967ae4fe3123842309e2
Author:     Marius Strobl <marius@FreeBSD.org>
AuthorDate: 2023-07-23 16:58:42 +0000
Commit:     Marius Strobl <marius@FreeBSD.org>
CommitDate: 2023-07-26 11:14:22 +0000

    gif(4): Assert that gif_output() isn't called for EtherIP

    With the current implementation of if_bridge(4), bridge_enqueue()
    calls gif_transmit() only. Ensure it stays that way so that the
    expectations in both drivers are either met or changed accordingly.

    PR:             227450

 sys/net/if_gif.c | 3 +++
 1 file changed, 3 insertions(+)
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-08-06 20:36:56 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=b59b3443f39d2b7d6c631094fde7723e0aec1319

commit b59b3443f39d2b7d6c631094fde7723e0aec1319
Author:     Marius Strobl <marius@FreeBSD.org>
AuthorDate: 2023-07-23 16:58:42 +0000
Commit:     Marius Strobl <marius@FreeBSD.org>
CommitDate: 2023-08-06 17:17:30 +0000

    gif(4): Assert that gif_output() isn't called for EtherIP

    With the current implementation of if_bridge(4), bridge_enqueue()
    calls gif_transmit() only. Ensure it stays that way so that the
    expectations in both drivers are either met or changed accordingly.

    PR:             227450
    (cherry picked from commit 8a0308722372a3ac6a94967ae4fe3123842309e2)

 sys/net/if_gif.c | 3 +++
 1 file changed, 3 insertions(+)