mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 05:05:12 +02:00
psd: byteswap constant value instead
htons(CONSTANT) is computed at compile time. reduces .text by 4 bytes on x86. Signed-off-by: Florian Westphal <fwestphal@astaro.com>
This commit is contained in:

committed by
Jan Engelhardt

parent
adabd647b1
commit
342ccf62b2
@@ -118,7 +118,7 @@ xt_psd_match(const struct sk_buff *pskb, const struct xt_match_param *match)
|
||||
iph = ip_hdr(pskb);
|
||||
|
||||
/* Sanity check */
|
||||
if (ntohs(iph->frag_off) & IP_OFFSET) {
|
||||
if (iph->frag_off & htons(IP_OFFSET)) {
|
||||
pr_debug("sanity check failed\n");
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user