[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sr #110877] ICMP reply error when using bridge
From: |
daniel.yang |
Subject: |
[sr #110877] ICMP reply error when using bridge |
Date: |
Wed, 3 May 2023 23:17:32 -0400 (EDT) |
URL:
<https://savannah.nongnu.org/support/?110877>
Summary: ICMP reply error when using bridge
Group: Savannah Administration
Submitter: ccnu
Submitted: Thu 04 May 2023 03:17:30 AM UTC
Category: Savannah trackers - bugs, tasks, etc.
Priority: 5 - Normal
Severity: 3 - Normal
Status: None
Assigned to: None
Originator Email: w472862133@126.com
Operating System: GNU/Linux
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Thu 04 May 2023 03:17:30 AM UTC By: daniel.yang <ccnu>
when I use lwIP netif implementing an IEEE 802.1D MAC Bridge,I add two
portif eth0(192.168.1.6) and eth1(192.168.1.7),also I set address and mac to
bridge as host netif(192.168.1.5).
But,when I ping host(192.168.1.5) from eth1(192.168.1.7),I get no
reply.Then I debuged and found the issue point at function
icmp_input(icmp.c#198) and bridgeif_send_to_port(bridgeif.c #257).
In this case, icmp request from eth1(input pbuf->if_idx = netif->num +
1,here is 1,default is 0),but in function icmp_input,it reuse the input pbuf
rather than alloc new one,so this pbuf->if_idx = netif->num + 1 = 1.
Then function bridgeif_send_to_port use the pbuf->if_idx to prevent sending
out to rx port(if (netif_get_index(portif) != p->if_idx)),at this time,icmp
reply would never be forward to eth1,so icmp error.
icmp replied success when I added statement(p->if_idx = 0) at icmp.c#248
before ip4_output_if.
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/support/?110877>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
- [sr #110877] ICMP reply error when using bridge,
daniel.yang <=