[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] Non-broadcast interfaces (patch)
From: |
Mountifield, Tony |
Subject: |
[lwip-devel] Non-broadcast interfaces (patch) |
Date: |
Wed, 18 Feb 2004 13:54:45 -0000 |
Hi,
I've recently started working with lwip, porting it to the STi5516 processor
under STlite.
Initially I set up a SLIP interface, which I connected to a SLIP port on a
Linux box. The standard subnet mask for a SLIP link is 255.255.255.255, so I
specified this in lwip when setting up the interface. With this subnet mask,
the test macro ip_addr_isbroadcast() always evaluates to TRUE, which was
causing all incoming packets to be discarded. I think this test should only
be done if the interface is broadcast-capable (e.g. ethernet), e.g.
if (((inp->flags & NETIF_FLAG_BROADCAST) &&
ip_addr_isbroadcast(&(iphdr->dest), &(inp->netmask))) ||
ip_addr_ismulticast(&(iphdr->dest))) {
Also, slipif_init() should include:
netif->flags = NETIF_FLAG_POINTTOPOINT;
I have attached a patch file with changes for this to icmp.c, tcp_in.c,
udp.c and slipif.c - please could someone evaluate it and add to CVS? Thanks
Cheers,
Tony
--
Tony Mountifield
Contractor @ Tandberg TV
Strategic Park, ext 3390
Tel: 023 8057 3390
***********************************************************************************
This email, its content and any attachments is PRIVATE AND
CONFIDENTIAL to TANDBERG Television. If received in error please
notify the sender and destroy the original message and attachments.
www.tandbergtv.com
***********************************************************************************
lwip.diff
Description: Binary data
- [lwip-devel] Non-broadcast interfaces (patch),
Mountifield, Tony <=