]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
ECHO: Catch skb_linearize out-of-memory condition
authorJan Engelhardt <jengelh@computergmbh.de>
Mon, 31 Mar 2008 04:40:29 +0000 (06:40 +0200)
committerJan Engelhardt <jengelh@computergmbh.de>
Mon, 31 Mar 2008 04:40:29 +0000 (06:40 +0200)
extensions/xt_ECHO.c

index f1483f7ed859430ee42216b9147ecf576a64da8d..10b9a22fd99660dc49196312002d514714d8c8e4 100644 (file)
@@ -30,7 +30,8 @@ static unsigned int echo_tg4(struct sk_buff *oldskb,
        void *payload;
 
        /* This allows us to do the copy operation in fewer lines of code. */
-       skb_linearize(oldskb);
+       if (skb_linearize(oldskb) < 0)
+               return NF_DROP;
 
        oldip  = ip_hdr(oldskb);
        oldudp = skb_header_pointer(oldskb, ip_hdrlen(oldskb),