[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #64211] ICMP reply error when using bridge
From: |
daniel.yang |
Subject: |
[lwip-devel] [bug #64211] ICMP reply error when using bridge |
Date: |
Wed, 17 May 2023 22:45:34 -0400 (EDT) |
URL:
<https://savannah.nongnu.org/bugs/?64211>
Summary: ICMP reply error when using bridge
Group: lwIP - A Lightweight TCP/IP stack
Submitter: ccnu
Submitted: Thu 18 May 2023 02:45:32 AM UTC
Category: IPv4
Severity: 3 - Normal
Item Group: Faulty Behaviour
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
lwIP version: 2.1.3
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Thu 18 May 2023 02:45:32 AM UTC By: daniel.yang <ccnu>
I may have a mistake because of my Inaccurate expression in bug #64145: ICMP
reply error when using bridge.
Now i illustrate again.
when I use lwIP netif implementing an IEEE 802.1D MAC Bridge,I add two portif
eth0 and eth1 ,also I set address and mac to bridge0 as host
netif(192.168.1.5) when i set NULL address to portif eth0 and eth1.
I connected two devices to portif eth0 and eth1 in outside, the address are
192.168.1.6 and 192.168.1.7.
But,when I ping host(192.168.1.5) from device(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.
You can see the network structure at file network structure.jpg.
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Thu 18 May 2023 02:45:32 AM UTC Name: network@structure.jpg Size:
50KiB By: ccnu
<http://savannah.nongnu.org/bugs/download.php?file_id=54756>
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/bugs/?64211>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] [bug #64211] ICMP reply error when using bridge,
daniel.yang <=