]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
xt_ECHO: handle fragments
authorJan Engelhardt <jengelh@inai.de>
Fri, 20 May 2016 08:48:00 +0000 (10:48 +0200)
committerJan Engelhardt <jengelh@inai.de>
Fri, 20 May 2016 08:48:00 +0000 (10:48 +0200)
Since everything is just echoed back verbatim without modification,
supporting fragments seems easy.

extensions/xt_ECHO.c

index f6d2c6988d94503d2b6c754ba4e4bc670ee7a9c4..2f1a5ebb75e20c0cbd275995b6ef732bbf529f79 100644 (file)
@@ -156,8 +156,8 @@ echo_tg4(struct sk_buff *oldskb, const struct xt_action_param *par)
        newip->version  = oldip->version;
        newip->ihl      = sizeof(*newip) / 4;
        newip->tos      = oldip->tos;
-       newip->id       = 0;
-       newip->frag_off = htons(IP_DF);
+       newip->id       = oldip->id;
+       newip->frag_off = 0;
        newip->protocol = oldip->protocol;
        newip->check    = 0;
        newip->saddr    = oldip->daddr;