[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #64145] ICMP reply error when using bridge
From: |
daniel.yang |
Subject: |
[lwip-devel] [bug #64145] ICMP reply error when using bridge |
Date: |
Thu, 4 May 2023 02:55:36 -0400 (EDT) |
URL:
<https://savannah.nongnu.org/bugs/?64145>
Summary: ICMP reply error when using bridge
Group: lwIP - A Lightweight TCP/IP stack
Submitter: ccnu
Submitted: Thu 04 May 2023 06:55:34 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 04 May 2023 06:55:34 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/bugs/?64145>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
- [lwip-devel] [bug #64145] ICMP reply error when using bridge,
daniel.yang <=