TEE: make skb writable before attempting checksum update

This also adds the compat function xtnu_skb_make_writable().
This commit is contained in:
Jan Engelhardt
2008-04-09 20:06:17 +02:00
parent 37e51dc44d
commit f34be8445f
4 changed files with 17 additions and 0 deletions

View File

@@ -158,6 +158,9 @@ tee_tg(struct sk_buff *skb, const struct net_device *in,
}
#endif
if (!skb_make_writable(skb, sizeof(struct iphdr)))
return NF_DROP;
/*
* If we are in INPUT, the checksum must be recalculated since
* the length could have changed as a result of defragmentation.