WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] mini-os: free dropped lwip packets

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] mini-os: free dropped lwip packets
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 25 Mar 2008 17:30:08 -0700
Delivery-date: Tue, 25 Mar 2008 17:30:04 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1206467769 0
# Node ID 01686f69f48b229155b3f16848587fca330b5202
# Parent  a16f7a9f8ea272b40bb01694c8fd33a1bbe5fe43
mini-os: free dropped lwip packets
When lwIP can not accept a packet, it is up to us to free it.

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
 extras/mini-os/lwip-net.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -r a16f7a9f8ea2 -r 01686f69f48b extras/mini-os/lwip-net.c
--- a/extras/mini-os/lwip-net.c Tue Mar 25 17:55:39 2008 +0000
+++ b/extras/mini-os/lwip-net.c Tue Mar 25 17:56:09 2008 +0000
@@ -206,13 +206,16 @@ netfront_input(struct netif *netif, unsi
     /* skip Ethernet header */
     pbuf_header(p, -(s16)sizeof(struct eth_hdr));
     /* pass to network layer */
-    tcpip_input(p, netif);
+    if (tcpip_input(p, netif) == ERR_MEM)
+      /* Could not store it, drop */
+      pbuf_free(p);
     break;
       
   case ETHTYPE_ARP:
     /* pass p to ARP module  */
     etharp_arp_input(netif, (struct eth_addr *) netif->hwaddr, p);
     break;
+
   default:
     pbuf_free(p);
     p = NULL;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] mini-os: free dropped lwip packets, Xen patchbot-unstable <=